@@ -4,117 +4,36 @@ import 'package:getwidget/getwidget.dart';
44class GFRadioListTile <T > extends StatelessWidget {
55 const GFRadioListTile ({
66 Key key,
7- @required this .value,
8- @required this .groupValue,
9- @required this .onChanged,
10- this .titleText,
11- this .subtitleText,
12- this .color,
13- this .avatar,
14- this .title,
15- this .subTitle,
16- this .description,
17- this .padding = const EdgeInsets .all (8 ),
18- this .margin = const EdgeInsets .all (16 ),
19- this .size = GFSize .MEDIUM ,
20- this .type = GFCheckboxType .basic,
21- this .checkColor = GFColors .WHITE ,
22- this .activebgColor = GFColors .PRIMARY ,
23- this .inactivebgColor = GFColors .WHITE ,
24- this .activeBorderColor = GFColors .WHITE ,
25- this .inactiveBorderColor = GFColors .DARK ,
26- this .activeIcon = const Icon (
27- Icons .check,
28- size: 20 ,
29- color: GFColors .WHITE ,
30- ),
31- this .inactiveIcon = const Icon (Icons .close),
32- this .custombgColor = GFColors .SUCCESS ,
33- this .selected = false ,
34- this .autofocus = false ,
35- this .toggleable
36- }) : assert (value != null ),
37- assert (selected != null ),
38- assert (autofocus != null ),
39- super (key: key);
40-
41- ///type of [String] used to pass text, alternative to title property and gets higher priority than title
42- final String titleText;
43-
44- ///type of [String] used to pass text, alternative to subtitle property and gets higher priority than subtitle
45- final String subtitleText;
46-
47- /// The GFListTile's background color. Can be given [Color] or [GFColors]
48- final Color color;
49-
50- /// type of [Widget] or [GFAvatar] used to create rounded user profile
51- final Widget avatar;
52-
53- /// The title to display inside the [GFListTile] . see [Text]
54- final Widget title;
55-
56- /// The subTitle to display inside the [GFListTile] . see [Text]
57- final Widget subTitle;
58-
59- /// The description to display inside the [GFListTile] . see [Text]
60- final Widget description;
61-
62- /// defines the margin of GFListTile
63- final EdgeInsets margin;
64-
65- /// defines the padding of GFListTile
66- final EdgeInsets padding;
67-
68- /// type of [GFCheckboxType] which is of four type is basic, sqaure, circular and custom
69- final GFCheckboxType type;
70-
71- /// type of [double] which is GFSize ie, small, medium and large and can use any double value
72- final double size;
73-
74- /// type pf [Color] used to change the checkcolor when the checkbox is active
75- final Color checkColor;
76-
77- /// type of [Color] used to change the backgroundColor of the active checkbox
78- final Color activebgColor;
79-
80- /// type of [Color] used to change the backgroundColor of the inactive checkbox
81- final Color inactivebgColor;
82-
83- /// type of [Color] used to change the border color of the active checkbox
84- final Color activeBorderColor;
85-
86- /// type of [Color] used to change the border color of the inactive checkbox
87- final Color inactiveBorderColor;
88-
89- ///type of Widget used to change the checkbox's active icon
90- final Widget activeIcon;
91-
92- ///type of [Widget] used to change the checkbox's inactive icon
93- final Widget inactiveIcon;
94-
95- /// type of [Color] used to change the background color of the custom active checkbox only
96- final Color custombgColor;
97-
98- /// To have the list tile appear selected when the checkbox is checked, pass the same value to both.
99- /// Normally, this property is left to its default value, false.
100- final bool selected;
101-
102- /// {@macro flutter.widgets.Focus.autofocus}
103- final bool autofocus;
104-
105- /// The value represented by this radio button.
106- final T value;
107-
108- /// The currently selected value for a group of radio buttons.
109- ///
110- /// This radio button is considered selected if its [value] matches the
111- /// [groupValue] .
112- final T groupValue;
7+ @required this .value,
8+ @required this .groupValue,
9+ @required this .onChanged,
10+ this .size = GFSize .SMALL ,
11+ this .type = GFRadioType .basic,
12+ this .radioColor = GFColors .SUCCESS ,
13+ this .activebgColor = GFColors .WHITE ,
14+ this .inactivebgColor = GFColors .WHITE ,
15+ this .activeBorderColor = GFColors .DARK ,
16+ this .inactiveBorderColor = GFColors .DARK ,
17+ this .activeIcon = const Icon (
18+ Icons .check,
19+ size: 20 ,
20+ color: GFColors .DARK ,
21+ ),
22+ this .inactiveIcon = const Icon (
23+ Icons .close,
24+ size: 20 ,
25+ color: GFColors .DARK ,
26+ ),
27+ this .custombgColor = GFColors .SUCCESS ,
28+ this .autofocus = false ,
29+ this .focusNode,
30+ this .toggleable = false
31+ })
32+ : assert (autofocus != null ),
33+ assert (toggleable != null ),
34+ super (key: key);
11335
114- final bool toggleable;
11536
116- /// Called when the user checks or unchecks the checkbox.
117- final ValueChanged <T > onChanged;
11837
11938 /// Whether this radio button is checked.
12039 ///
0 commit comments