@@ -197,15 +197,19 @@ class Switch extends StatelessWidget {
197
197
/// ```
198
198
final ValueChanged <bool >? onChanged;
199
199
200
+ /// {@template flutter.material.switch.activeColor}
200
201
/// The color to use when this switch is on.
202
+ /// {@endtemplate}
201
203
///
202
204
/// Defaults to [ColorScheme.secondary] .
203
205
///
204
206
/// If [thumbColor] returns a non-null color in the [MaterialState.selected]
205
207
/// state, it will be used instead of this color.
206
208
final Color ? activeColor;
207
209
210
+ /// {@template flutter.material.switch.activeTrackColor}
208
211
/// The color to use on the track when this switch is on.
212
+ /// {@endtemplate}
209
213
///
210
214
/// Defaults to [ColorScheme.secondary] with the opacity set at 50%.
211
215
///
@@ -215,7 +219,9 @@ class Switch extends StatelessWidget {
215
219
/// state, it will be used instead of this color.
216
220
final Color ? activeTrackColor;
217
221
222
+ /// {@template flutter.material.switch.inactiveThumbColor}
218
223
/// The color to use on the thumb when this switch is off.
224
+ /// {@endtemplate}
219
225
///
220
226
/// Defaults to the colors described in the Material design specification.
221
227
///
@@ -225,7 +231,9 @@ class Switch extends StatelessWidget {
225
231
/// used instead of this color.
226
232
final Color ? inactiveThumbColor;
227
233
234
+ /// {@template flutter.material.switch.inactiveTrackColor}
228
235
/// The color to use on the track when this switch is off.
236
+ /// {@endtemplate}
229
237
///
230
238
/// Defaults to the colors described in the Material design specification.
231
239
///
@@ -235,22 +243,30 @@ class Switch extends StatelessWidget {
235
243
/// used instead of this color.
236
244
final Color ? inactiveTrackColor;
237
245
246
+ /// {@template flutter.material.switch.activeThumbImage}
238
247
/// An image to use on the thumb of this switch when the switch is on.
248
+ /// {@endtemplate}
239
249
///
240
250
/// Ignored if this switch is created with [Switch.adaptive] .
241
251
final ImageProvider ? activeThumbImage;
242
252
253
+ /// {@template flutter.material.switch.onActiveThumbImageError}
243
254
/// An optional error callback for errors emitted when loading
244
255
/// [activeThumbImage] .
256
+ /// {@endtemplate}
245
257
final ImageErrorListener ? onActiveThumbImageError;
246
258
259
+ /// {@template flutter.material.switch.inactiveThumbImage}
247
260
/// An image to use on the thumb of this switch when the switch is off.
261
+ /// {@endtemplate}
248
262
///
249
263
/// Ignored if this switch is created with [Switch.adaptive] .
250
264
final ImageProvider ? inactiveThumbImage;
251
265
266
+ /// {@template flutter.material.switch.onInactiveThumbImageError}
252
267
/// An optional error callback for errors emitted when loading
253
268
/// [inactiveThumbImage] .
269
+ /// {@endtemplate}
254
270
final ImageErrorListener ? onInactiveThumbImageError;
255
271
256
272
/// {@template flutter.material.switch.thumbColor}
0 commit comments