@@ -4,7 +4,6 @@ import 'package:flutter/widgets.dart';
44import 'package:flutter/material.dart' ;
55import 'package:getflutter/getflutter.dart' ;
66
7-
87class GFButtonBadge extends StatefulWidget {
98 /// Create badges badges of all types. check out [GFIconButton] for icon badges, and [GFBadge] for badges
109 const GFButtonBadge ({
@@ -48,9 +47,9 @@ class GFButtonBadge extends StatefulWidget {
4847 this .disabledTextColor,
4948 this .icon,
5049 }) : materialTapTargetSize =
51- materialTapTargetSize ?? MaterialTapTargetSize .padded,
50+ materialTapTargetSize ?? MaterialTapTargetSize .padded,
5251 assert (shape != null , 'Button shape can not be null' ),
53- // assert(elevation != null && elevation >= 0.0),
52+ // assert(elevation != null && elevation >= 0.0),
5453 assert (focusElevation != null && focusElevation >= 0.0 ),
5554 assert (hoverElevation != null && hoverElevation >= 0.0 ),
5655 assert (highlightElevation != null && highlightElevation >= 0.0 ),
@@ -59,15 +58,17 @@ class GFButtonBadge extends StatefulWidget {
5958 assert (animationDuration != null ),
6059 assert (clipBehavior != null ),
6160 assert (autofocus != null ),
62- super (key: key, );
61+ super (
62+ key: key,
63+ );
6364
6465 /// Called when the button is tapped or otherwise activated.
6566 final VoidCallback onPressed;
6667
6768 /// Called by the underlying [InkWell] widget's InkWell.onHighlightChanged callback.
6869 final ValueChanged <bool > onHighlightChanged;
6970
70- /// Defines the default text style, with [Material.textStyle] , for the button's [ child] .
71+ /// Defines the default text style, with [Material.textStyle] , for the button's child.
7172 final TextStyle textStyle;
7273
7374 /// The border side for the badge's [Material] .
@@ -103,7 +104,7 @@ class GFButtonBadge extends StatefulWidget {
103104 /// The elevation for the badge's [Material] when the badge is not [enabled] .
104105 final double disabledElevation;
105106
106- /// The internal padding for the badge's [ child] .
107+ /// The internal padding for the badge's child.
107108 final EdgeInsetsGeometry padding;
108109
109110 /// Defines the badge's size.
@@ -227,53 +228,51 @@ class GFButtonBadge extends StatefulWidget {
227228class _GFButtonBadgeState extends State <GFButtonBadge > {
228229 @override
229230 Widget build (BuildContext context) => ConstrainedBox (
230- constraints: const BoxConstraints (
231- minHeight: 26 ,
232- minWidth: 98 ,
233- ),
234- child: Container (
235- height: widget.size,
236- child: GFButton (
237- onPressed: widget.onPressed,
238- onHighlightChanged: widget.onHighlightChanged,
239- textStyle: widget.textStyle,
240- boxShadow: widget.boxShadow,
241- buttonBoxShadow: widget.badgeBoxShadow,
242- focusColor: widget.focusColor,
243- hoverColor: widget.hoverColor,
244- highlightColor: widget.highlightColor,
245- splashColor: widget.splashColor,
246- elevation: widget.elevation,
247- focusElevation: widget.focusElevation,
248- hoverElevation: widget.hoverElevation,
249- highlightElevation: widget.highlightElevation,
250- disabledElevation: widget.disabledElevation,
251- constraints: widget.constraints,
252- borderShape: widget.borderShape,
253- animationDuration: widget.animationDuration,
254- clipBehavior: widget.clipBehavior,
255- focusNode: widget.focusNode,
256- autofocus: widget.autofocus,
257- type: widget.type,
258- shape: widget.shape,
259- color: widget.color,
260- textColor: widget.textColor,
261- position: widget.position,
262- size: widget.size,
263- borderSide: widget.borderSide,
264- text: widget.text,
265- icon: widget.icon,
266- blockButton: widget.blockButton,
267- fullWidthButton: widget.fullWidthButton,
268- disabledColor: widget.disabledTextColor,
269- disabledTextColor: widget.disabledColor,
270- ),
271- ),
272- );
231+ constraints: const BoxConstraints (
232+ minHeight: 26 ,
233+ minWidth: 98 ,
234+ ),
235+ child: Container (
236+ height: widget.size,
237+ child: GFButton (
238+ onPressed: widget.onPressed,
239+ onHighlightChanged: widget.onHighlightChanged,
240+ textStyle: widget.textStyle,
241+ boxShadow: widget.boxShadow,
242+ buttonBoxShadow: widget.badgeBoxShadow,
243+ focusColor: widget.focusColor,
244+ hoverColor: widget.hoverColor,
245+ highlightColor: widget.highlightColor,
246+ splashColor: widget.splashColor,
247+ elevation: widget.elevation,
248+ focusElevation: widget.focusElevation,
249+ hoverElevation: widget.hoverElevation,
250+ highlightElevation: widget.highlightElevation,
251+ disabledElevation: widget.disabledElevation,
252+ constraints: widget.constraints,
253+ borderShape: widget.borderShape,
254+ animationDuration: widget.animationDuration,
255+ clipBehavior: widget.clipBehavior,
256+ focusNode: widget.focusNode,
257+ autofocus: widget.autofocus,
258+ type: widget.type,
259+ shape: widget.shape,
260+ color: widget.color,
261+ textColor: widget.textColor,
262+ position: widget.position,
263+ size: widget.size,
264+ borderSide: widget.borderSide,
265+ text: widget.text,
266+ icon: widget.icon,
267+ blockButton: widget.blockButton,
268+ fullWidthButton: widget.fullWidthButton,
269+ disabledColor: widget.disabledTextColor,
270+ disabledTextColor: widget.disabledColor,
271+ ),
272+ ),
273+ );
273274}
274275
275-
276-
277276//
278277//class GFButtonBadge extends GFButton {
279278//
0 commit comments