@@ -30,9 +30,11 @@ import 'runtime.dart';
30
30
/// * [DropdownButton]
31
31
/// * [ElevatedButton]
32
32
/// * [FloatingActionButton]
33
+ /// * [InkResponse]
33
34
/// * [InkWell]
34
35
/// * [LinearProgressIndicator]
35
36
/// * [ListTile]
37
+ /// * [Material]
36
38
/// * [OutlinedButton]
37
39
/// * [Scaffold]
38
40
/// * [TextButton]
@@ -337,14 +339,58 @@ Map<String, LocalWidgetBuilder> get _materialWidgetsDefinitions => <String, Loca
337
339
);
338
340
},
339
341
342
+ 'InkResponse' : (BuildContext context, DataSource source) {
343
+ // not implemented: mouseCursor, overlayColor, splashFactory, focusNode.
344
+ return InkResponse (
345
+ onTap: source.voidHandler (['onTap' ]),
346
+ onTapDown: source.handler (['onTapDown' ], (VoidCallback trigger) => (TapDownDetails details) => trigger ()),
347
+ onTapUp: source.handler (['onTapUp' ], (VoidCallback trigger) => (TapUpDetails details) => trigger ()),
348
+ onTapCancel: source.voidHandler (['onTapCancel' ]),
349
+ onDoubleTap: source.voidHandler (['onDoubleTap' ]),
350
+ onLongPress: source.voidHandler (['onLongPress' ]),
351
+ onSecondaryTap: source.voidHandler (['onSecondaryTap' ]),
352
+ onSecondaryTapUp: source.handler (['onSecondaryTapUp' ], (VoidCallback trigger) => (TapUpDetails details) => trigger ()),
353
+ onSecondaryTapDown: source.handler (['onSecondaryTapDown' ], (VoidCallback trigger) => (TapDownDetails details) => trigger ()),
354
+ onSecondaryTapCancel: source.voidHandler (['onSecondaryTapCancel' ]),
355
+ onHighlightChanged: source.handler (['onHighlightChanged' ], (VoidCallback trigger) => (bool highlighted) => trigger ()),
356
+ onHover: source.handler (['onHover' ], (VoidCallback trigger) => (bool hovered) => trigger ()),
357
+ containedInkWell: source.v <bool >(['containedInkWell' ]) ?? false ,
358
+ highlightShape: ArgumentDecoders .enumValue <BoxShape >(BoxShape .values, source, ['highlightShape' ]) ?? BoxShape .circle,
359
+ radius: source.v <double >(['radius' ]),
360
+ borderRadius: ArgumentDecoders .borderRadius (source, ['borderRadius' ])? .resolve (Directionality .of (context)),
361
+ customBorder: ArgumentDecoders .shapeBorder (source, ['customBorder' ]),
362
+ focusColor: ArgumentDecoders .color (source, ['focusColor' ]),
363
+ hoverColor: ArgumentDecoders .color (source, ['hoverColor' ]),
364
+ highlightColor: ArgumentDecoders .color (source, ['highlightColor' ]),
365
+ splashColor: ArgumentDecoders .color (source, ['splashColor' ]),
366
+ enableFeedback: source.v <bool >(['enableFeedback' ]) ?? true ,
367
+ excludeFromSemantics: source.v <bool >(['excludeFromSemantics' ]) ?? false ,
368
+ canRequestFocus: source.v <bool >(['canRequestFocus' ]) ?? true ,
369
+ onFocusChange: source.handler (['onFocusChange' ], (VoidCallback trigger) => (bool focus) => trigger ()),
370
+ autofocus: source.v <bool >(['autofocus' ]) ?? false ,
371
+ hoverDuration: ArgumentDecoders .duration (source, ['hoverDuration' ], context),
372
+ child: source.optionalChild (['child' ]),
373
+ );
374
+ },
375
+
340
376
'InkWell' : (BuildContext context, DataSource source) {
341
- // not implemented: onHighlightChanged, onHover; mouseCursor; focusColor, hoverColor, highlightColor, overlayColor, splashColor; splashFactory; focusNode, onFocusChange
377
+ // not implemented: mouseCursor; overlayColor, splashFactory; focusNode, onFocusChange
342
378
return InkWell (
343
379
onTap: source.voidHandler (['onTap' ]),
344
380
onDoubleTap: source.voidHandler (['onDoubleTap' ]),
345
381
onLongPress: source.voidHandler (['onLongPress' ]),
346
382
onTapDown: source.handler (['onTapDown' ], (VoidCallback trigger) => (TapDownDetails details) => trigger ()),
347
383
onTapCancel: source.voidHandler (['onTapCancel' ]),
384
+ onSecondaryTap: source.voidHandler (['onSecondaryTap' ]),
385
+ onSecondaryTapUp: source.handler (['onSecondaryTapUp' ], (VoidCallback trigger) => (TapUpDetails details) => trigger ()),
386
+ onSecondaryTapDown: source.handler (['onSecondaryTapDown' ], (VoidCallback trigger) => (TapDownDetails details) => trigger ()),
387
+ onSecondaryTapCancel: source.voidHandler (['onSecondaryTapCancel' ]),
388
+ onHighlightChanged: source.handler (['onHighlightChanged' ], (VoidCallback trigger) => (bool highlighted) => trigger ()),
389
+ onHover: source.handler (['onHover' ], (VoidCallback trigger) => (bool hovered) => trigger ()),
390
+ focusColor: ArgumentDecoders .color (source, ['focusColor' ]),
391
+ hoverColor: ArgumentDecoders .color (source, ['hoverColor' ]),
392
+ highlightColor: ArgumentDecoders .color (source, ['highlightColor' ]),
393
+ splashColor: ArgumentDecoders .color (source, ['splashColor' ]),
348
394
radius: source.v <double >(['radius' ]),
349
395
borderRadius: ArgumentDecoders .borderRadius (source, ['borderRadius' ])? .resolve (Directionality .of (context)),
350
396
customBorder: ArgumentDecoders .shapeBorder (source, ['customBorder' ]),
@@ -395,6 +441,23 @@ Map<String, LocalWidgetBuilder> get _materialWidgetsDefinitions => <String, Loca
395
441
);
396
442
},
397
443
444
+ 'Material' : (BuildContext context, DataSource source) {
445
+ return Material (
446
+ type: ArgumentDecoders .enumValue <MaterialType >(MaterialType .values,source, ['type' ]) ?? MaterialType .canvas,
447
+ elevation: source.v <double >(['elevation' ]) ?? 0.0 ,
448
+ color: ArgumentDecoders .color (source, ['color' ]),
449
+ shadowColor: ArgumentDecoders .color (source, ['shadowColor' ]),
450
+ surfaceTintColor: ArgumentDecoders .color (source, ['surfaceTintColor' ]),
451
+ textStyle: ArgumentDecoders .textStyle (source, ['textStyle' ]),
452
+ borderRadius: ArgumentDecoders .borderRadius (source, ['borderRadius' ]),
453
+ shape: ArgumentDecoders .shapeBorder (source, ['shape' ]),
454
+ borderOnForeground: source.v <bool >(['borderOnForeground' ]) ?? true ,
455
+ clipBehavior: ArgumentDecoders .enumValue <Clip >(Clip .values, source, ['clipBehavior' ]) ?? Clip .none,
456
+ animationDuration: ArgumentDecoders .duration (source, ['animationDuration' ], context),
457
+ child: source.child (['child' ]),
458
+ );
459
+ },
460
+
398
461
'OutlinedButton' : (BuildContext context, DataSource source) {
399
462
// not implemented: buttonStyle, focusNode
400
463
return OutlinedButton (
0 commit comments