@@ -333,83 +333,79 @@ class _GFButtonState extends State<GFButton> {
333333 borderRadius: BorderRadius .circular (50.0 ), side: shapeBorder);
334334 }
335335
336- return Semantics (
337- container: true ,
338- button: true ,
339- enabled: widget.enabled,
340- child: _InputPadding (
341- minSize: minSize,
342- child: Focus (
343- focusNode: widget.focusNode,
344- onFocusChange: _handleFocusedChanged,
345- autofocus: widget.autofocus,
346- child: Container (
347- constraints: this .icon == null
348- ? BoxConstraints (minHeight: 26.0 , minWidth: 88.0 )
349- : BoxConstraints (minHeight: 26.0 , minWidth: 98.0 ),
350- decoration: BoxDecoration (
351- borderRadius: widget.shape == GFShape .pills
352- ? BorderRadius .circular (50.0 )
353- : widget.shape == GFShape .standard
354- ? BorderRadius .circular (5.0 )
355- : BorderRadius .zero,
356- boxShadow: [
357- widget.boxShadow == null && widget.buttonBoxShadow == true
358- ? BoxShadow (
359- color: this .color.withOpacity (0.4 ),
360- blurRadius: 1.5 ,
361- spreadRadius: 2.0 ,
362- offset: Offset .zero,
363- )
364- : widget.boxShadow != null
365- ? widget.boxShadow
366- : BoxShadow (
367- color: Theme .of (context).canvasColor,
368- blurRadius: 0.0 ,
369- spreadRadius: 0.0 ,
370- offset: Offset .zero,
371- )
372- ]),
373- child: Material (
374- textStyle: widget.textStyle == null
375- ? TextStyle (color: this .textColor, fontSize: 14 )
376- : widget.textStyle,
377- shape: widget.type == GFType .transparent
378- ? null
379- : widget.borderShape == null ? shape : widget.borderShape,
380- color: widget.type != GFType .outline || widget.type == null
381- ? this .color
382- : Theme .of (context).canvasColor,
383- type: widget.type == GFType .transparent
384- ? MaterialType .transparency
385- : MaterialType .button,
386- animationDuration: widget.animationDuration,
387- clipBehavior: widget.clipBehavior,
388- child: InkWell (
389- onHighlightChanged: _handleHighlightChanged,
390- splashColor: widget.splashColor,
391- highlightColor: widget.highlightColor,
392- focusColor: widget.focusColor,
393- hoverColor: widget.hoverColor,
394- onHover: _handleHoveredChanged,
395- onTap: widget.onPressed,
396- customBorder:
397- widget.borderShape == null ? shape : widget.borderShape,
398- child: IconTheme .merge (
399- data: IconThemeData (color: effectiveTextColor),
400- child: Container (
401- height: widget.blockButton == true
402- ? BLOCK
403- : widget.fullWidthButton == true ? BLOCK : this .size,
404- width: buttonWidth (),
405- padding: widget.padding,
406- child: Center (
407- widthFactor: 1.0 ,
408- heightFactor: 1.0 ,
409- child: this .icon != null &&
410- (this .position == GFPosition .start ||
411- this .position == null )
412- ? Row (
336+ // Color _getFillColor() {
337+ // if (widget.highlightElevation == null || widget.highlightElevation == 0.0)
338+ // return Colors.transparent;
339+ // final Color color = widget.color ?? Theme.of(context).canvasColor;
340+ // final Tween<Color> colorTween = ColorTween(
341+ // begin: color.withAlpha(0x00),
342+ // end: color.withAlpha(0xFF),
343+ // );
344+ // return colorTween.evaluate(_fillAnimation);
345+ // }
346+
347+
348+ return Semantics (
349+ container: true ,
350+ button: true ,
351+ enabled: widget.enabled,
352+ child: _InputPadding (
353+ minSize: minSize,
354+ child: Focus (
355+ focusNode: widget.focusNode,
356+ onFocusChange: _handleFocusedChanged,
357+ autofocus: widget.autofocus,
358+ child: Container (
359+ constraints: this .icon == null ? BoxConstraints (minHeight: 26.0 , minWidth: 88.0 ) :
360+ BoxConstraints (minHeight: 26.0 , minWidth: 98.0 ),
361+ decoration: BoxDecoration (
362+ borderRadius: widget.shape == GFShape .pills ? BorderRadius .circular (50.0 ) :
363+ widget.shape == GFShape .standard ? BorderRadius .circular (5.0 ) : BorderRadius .zero,
364+ boxShadow: [
365+ widget.boxShadow == null && widget.buttonBoxShadow == true ? BoxShadow (
366+ color: this .color.withOpacity (0.4 ),
367+ blurRadius: 1.5 ,
368+ spreadRadius: 2.0 ,
369+ offset: Offset .zero,
370+ ) :
371+ widget.boxShadow != null ? widget.boxShadow :
372+ BoxShadow (
373+ color: Theme .of (context).canvasColor,
374+ blurRadius: 0.0 ,
375+ spreadRadius: 0.0 ,
376+ offset: Offset .zero,
377+ )
378+ ]
379+ ),
380+ child: Material (
381+ textStyle: widget.textStyle == null ? TextStyle (color: this .textColor, fontSize: 14 ) : widget.textStyle,
382+ shape: widget.type == GFType .transparent ? null : widget.borderShape== null ? shape : widget.borderShape,
383+ color: widget.type != GFType .outline || widget.type == null ? this .color : Theme .of (context).canvasColor,
384+ type: widget.type == GFType .transparent ? MaterialType .transparency : MaterialType .button,
385+ animationDuration: widget.animationDuration,
386+ clipBehavior: widget.clipBehavior,
387+ child: InkWell (
388+ onHighlightChanged: _handleHighlightChanged,
389+ splashColor: widget.splashColor,
390+ highlightColor: widget.highlightColor,
391+ focusColor: widget.focusColor,
392+ hoverColor: widget.hoverColor,
393+ onHover: _handleHoveredChanged,
394+ onTap: widget.onPressed,
395+ customBorder: widget.borderShape == null ? shape : widget.borderShape,
396+ child: IconTheme .merge (
397+ data: IconThemeData (color: effectiveTextColor),
398+ child: Container (
399+ height: widget.blockButton == true ? BLOCK
400+ : widget.fullWidthButton == true ? BLOCK
401+ : this .size,
402+ width: buttonWidth (),
403+ padding: widget.padding,
404+ child: Center (
405+ widthFactor: 1.0 ,
406+ heightFactor: 1.0 ,
407+ child: this .icon != null && (this .position == GFPosition .start || this .position == null )?
408+ Row (
413409 mainAxisSize: MainAxisSize .min,
414410 children: < Widget > [
415411 this .icon,
0 commit comments