Skip to content

Commit 2db5188

Browse files
authored
Merge pull request #48 from deepikahr/GFDropdown
changes in description and properties key names in few components
2 parents d898db8 + 434ba0e commit 2db5188

File tree

10 files changed

+102
-93
lines changed

10 files changed

+102
-93
lines changed

lib/components/checkbox/gf_checkbox.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class GFCheckbox extends StatefulWidget {
88
this.size = GFSize.MEDIUM,
99
this.type = GFCheckboxType.basic,
1010
this.checkColor = GFColors.WHITE,
11-
this.activebgColor = GFColors.PRIMARY,
12-
this.inactivebgColor = GFColors.WHITE,
11+
this.activeBgColor = GFColors.PRIMARY,
12+
this.inactiveBgColor = GFColors.WHITE,
1313
this.activeBorderColor = GFColors.WHITE,
1414
this.inactiveBorderColor = GFColors.DARK,
1515
this.onChanged,
@@ -20,7 +20,7 @@ class GFCheckbox extends StatefulWidget {
2020
color: GFColors.WHITE,
2121
),
2222
this.inactiveIcon,
23-
this.custombgColor = GFColors.SUCCESS,
23+
this.customBgColor = GFColors.SUCCESS,
2424
this.autofocus = false,
2525
this.focusNode})
2626
: assert(autofocus != null),
@@ -32,14 +32,14 @@ class GFCheckbox extends StatefulWidget {
3232
/// type of [double] which is GFSize ie, small, medium and large and can use any double value
3333
final double size;
3434

35-
/// type of [Color] used to change the checkcolor when the checkbox is active
35+
/// type of [Color] used to change the checkColor when the checkbox is active
3636
final Color checkColor;
3737

3838
/// type of [Color] used to change the backgroundColor of the active checkbox
39-
final Color activebgColor;
39+
final Color activeBgColor;
4040

4141
/// type of [Color] used to change the backgroundColor of the inactive checkbox
42-
final Color inactivebgColor;
42+
final Color inactiveBgColor;
4343

4444
/// type of [Color] used to change the border color of the active checkbox
4545
final Color activeBorderColor;
@@ -60,7 +60,7 @@ class GFCheckbox extends StatefulWidget {
6060
final Widget inactiveIcon;
6161

6262
/// type of [Color] used to change the background color of the custom active checkbox only
63-
final Color custombgColor;
63+
final Color customBgColor;
6464

6565
/// on true state this widget will be selected as the initial focus
6666
/// when no other node in its scope is currently focused
@@ -101,8 +101,8 @@ class _GFCheckboxState extends State<GFCheckbox> {
101101
? widget.value
102102
? widget.type == GFCheckboxType.custom
103103
? Colors.white
104-
: widget.activebgColor
105-
: widget.inactivebgColor
104+
: widget.activeBgColor
105+
: widget.inactiveBgColor
106106
: Colors.grey,
107107
borderRadius: widget.type == GFCheckboxType.basic
108108
? BorderRadius.circular(3)
@@ -129,7 +129,7 @@ class _GFCheckboxState extends State<GFCheckbox> {
129129
height: widget.size * 0.8,
130130
decoration: BoxDecoration(
131131
shape: BoxShape.rectangle,
132-
color: widget.custombgColor),
132+
color: widget.customBgColor),
133133
)
134134
],
135135
)

lib/components/checkbox_list_tile/gf_checkbox_list_tile.dart

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
22
import 'package:getwidget/getwidget.dart';
33

44
class GFCheckboxListTile extends StatelessWidget {
5-
/// [GFCheckboxListTile] is a tile with small box at right (as in a checklist) in which to place a check mark to make a selection with various customization options.
5+
/// [GFCheckboxListTile] is a tile with small box at right (as in a checklist)
6+
/// in which to place a check mark to make a selection with various customization options.
67
const GFCheckboxListTile({
78
Key key,
89
@required this.value,
@@ -12,16 +13,16 @@ class GFCheckboxListTile extends StatelessWidget {
1213
this.color,
1314
this.avatar,
1415
this.title,
15-
this.subTitle,
16+
this.subtitle,
1617
this.icon,
1718
this.description,
1819
this.padding = const EdgeInsets.all(8),
1920
this.margin = const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
2021
this.size = GFSize.MEDIUM,
2122
this.type = GFCheckboxType.basic,
2223
this.checkColor = GFColors.WHITE,
23-
this.activebgColor = GFColors.PRIMARY,
24-
this.inactivebgColor = GFColors.WHITE,
24+
this.activeBgColor = GFColors.PRIMARY,
25+
this.inactiveBgColor = GFColors.WHITE,
2526
this.activeBorderColor = GFColors.WHITE,
2627
this.inactiveBorderColor = GFColors.DARK,
2728
this.activeIcon = const Icon(
@@ -30,7 +31,7 @@ class GFCheckboxListTile extends StatelessWidget {
3031
color: GFColors.WHITE,
3132
),
3233
this.inactiveIcon,
33-
this.custombgColor = GFColors.SUCCESS,
34+
this.customBgColor = GFColors.SUCCESS,
3435
this.position = GFPosition.end,
3536
this.selected = false,
3637
this.autofocus = false,
@@ -48,14 +49,15 @@ class GFCheckboxListTile extends StatelessWidget {
4849
/// The GFListTile's background color. Can be given [Color] or [GFColors]
4950
final Color color;
5051

51-
/// If position is start Checkbox will come instead of avatar, type of [Widget] or [GFAvatar] used to create rounded user profile
52+
/// If position is start Checkbox will come instead of avatar,
53+
/// type of [Widget] or [GFAvatar] used to create rounded user profile
5254
final Widget avatar;
5355

5456
/// The title to display inside the [GFListTile]. see [Text]
5557
final Widget title;
5658

57-
/// The subTitle to display inside the [GFListTile]. see [Text]
58-
final Widget subTitle;
59+
/// The subtitle to display inside the [GFListTile]. see [Text]
60+
final Widget subtitle;
5961

6062
/// The description to display inside the [GFListTile]. see [Text]
6163
final Widget description;
@@ -76,10 +78,10 @@ class GFCheckboxListTile extends StatelessWidget {
7678
final Color checkColor;
7779

7880
/// type of [Color] used to change the backgroundColor of the active checkbox
79-
final Color activebgColor;
81+
final Color activeBgColor;
8082

8183
/// type of [Color] used to change the backgroundColor of the inactive checkbox
82-
final Color inactivebgColor;
84+
final Color inactiveBgColor;
8385

8486
/// type of [Color] used to change the border color of the active checkbox
8587
final Color activeBorderColor;
@@ -103,13 +105,14 @@ class GFCheckboxListTile extends StatelessWidget {
103105
final Widget inactiveIcon;
104106

105107
/// type of [Color] used to change the background color of the custom active checkbox only
106-
final Color custombgColor;
108+
final Color customBgColor;
107109

108110
/// To have the list tile appear selected when the checkbox is checked, pass the same value to both.
109111
/// Normally, this property is left to its default value, false.
110112
final bool selected;
111113

112-
/// {@macro flutter.widgets.Focus.autofocus}
114+
/// On true state it should focus itself if nothing else is already focused.
115+
/// Defaults to false
113116
final bool autofocus;
114117

115118
/// If position is end Checkbox will come instead of icon, The icon to display inside the [GFListTile]. see [Icon]
@@ -122,13 +125,13 @@ class GFCheckboxListTile extends StatelessWidget {
122125
onChanged: onChanged,
123126
value: value,
124127
size: size,
125-
activebgColor: activebgColor,
128+
activeBgColor: activeBgColor,
126129
inactiveIcon: inactiveIcon,
127130
activeBorderColor: activeBorderColor,
128-
inactivebgColor: inactivebgColor,
131+
inactiveBgColor: inactiveBgColor,
129132
activeIcon: activeIcon,
130133
inactiveBorderColor: inactiveBorderColor,
131-
custombgColor: custombgColor,
134+
customBgColor: customBgColor,
132135
checkColor: checkColor,
133136
type: type);
134137
return MergeSemantics(
@@ -143,7 +146,7 @@ class GFCheckboxListTile extends StatelessWidget {
143146
selected: selected,
144147
avatar: position == GFPosition.start ? checkbox : avatar,
145148
titleText: titleText,
146-
subTitle: subTitle,
149+
subtitle: subtitle,
147150
subtitleText: subtitleText,
148151
description: description,
149152
color: color,

lib/components/dropdown/gf_dropdown.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
22
import 'package:getwidget/getwidget.dart';
33

44
class GFDropdown<T> extends StatefulWidget {
5-
///
5+
/// GF Dropdown let user to select from the number of items and display selected
6+
/// item in the button. It displays list of items in the overlay dropdown fashion.
67
const GFDropdown(
78
{Key key,
89
@required this.items,

lib/components/dropdown/gf_multiselect.dart

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ import 'package:flutter/material.dart';
22
import 'package:getwidget/getwidget.dart';
33

44
class GFMultiSelect<T> extends StatefulWidget {
5-
///
5+
/// GF Multiselect let user to select multiple items from the number of
6+
/// Checkbox ListTile items and display selected items in the TitleTile box.
7+
/// It displays list of items in the overlay dropdown fashion.
68
const GFMultiSelect({
79
@required this.items,
810
@required this.onSelect,
9-
this.dropDownTitleTileText = 'Select : ',
10-
this.dropDownTitleTileTextStyle =
11+
this.dropdownTitleTileText = 'Select : ',
12+
this.dropdownTitleTileTextStyle =
1113
const TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
1214
this.color,
1315
this.avatar,
@@ -16,8 +18,8 @@ class GFMultiSelect<T> extends StatefulWidget {
1618
this.size = GFSize.SMALL,
1719
this.type = GFCheckboxType.basic,
1820
this.checkColor = GFColors.WHITE,
19-
this.activebgColor = GFColors.WHITE,
20-
this.inactivebgColor = GFColors.WHITE,
21+
this.activeBgColor = GFColors.WHITE,
22+
this.inactiveBgColor = GFColors.WHITE,
2123
this.activeBorderColor = GFColors.WHITE,
2224
this.inactiveBorderColor = GFColors.WHITE,
2325
this.submitButton,
@@ -31,14 +33,14 @@ class GFMultiSelect<T> extends StatefulWidget {
3133
color: Colors.black87,
3234
size: 30,
3335
),
34-
this.dropdownbgColor = Colors.white,
36+
this.dropdownBgColor = Colors.white,
3537
this.activeIcon = const Icon(
3638
Icons.check,
3739
size: 20,
3840
color: GFColors.DARK,
3941
),
4042
this.inactiveIcon,
41-
this.custombgColor = GFColors.SUCCESS,
43+
this.customBgColor = GFColors.SUCCESS,
4244
this.selected = false,
4345
this.dropdownTitleTileBorder,
4446
this.dropdownTitleTileBorderRadius =
@@ -49,8 +51,8 @@ class GFMultiSelect<T> extends StatefulWidget {
4951
const BorderSide(color: Colors.black12, width: 1),
5052
this.dropdownTitleTileMargin = const EdgeInsets.all(16),
5153
this.dropdownTitleTilePadding = const EdgeInsets.all(12),
52-
this.dropDownTitleTileHintText,
53-
this.dropDownTitleTileHintTextStyle =
54+
this.dropdownTitleTileHintText,
55+
this.dropdownTitleTileHintTextStyle =
5456
const TextStyle(fontSize: 12, fontWeight: FontWeight.w400),
5557
Key key,
5658
}) : assert(selected != null),
@@ -64,16 +66,16 @@ class GFMultiSelect<T> extends StatefulWidget {
6466
final ValueChanged<List<dynamic>> onSelect;
6567

6668
/// type of [String] to define the dropdownTitleTile title
67-
final String dropDownTitleTileText;
69+
final String dropdownTitleTileText;
6870

69-
/// type of [TextStyle] to define the textStyle of [dropDownTitleTileText]
70-
final TextStyle dropDownTitleTileTextStyle;
71+
/// type of [TextStyle] to define the textStyle of [dropdownTitleTileText]
72+
final TextStyle dropdownTitleTileTextStyle;
7173

7274
/// type of [String] to define the dropdownTitleTile hint text
73-
final String dropDownTitleTileHintText;
75+
final String dropdownTitleTileHintText;
7476

75-
/// type of [TextStyle] to define the textStyle of [dropDownTitleTileHintTextStyle]
76-
final TextStyle dropDownTitleTileHintTextStyle;
77+
/// type of [TextStyle] to define the textStyle of [dropdownTitleTileHintTextStyle]
78+
final TextStyle dropdownTitleTileHintTextStyle;
7779

7880
/// defines the border radius of the dropdownTitleTile
7981
final BorderRadius dropdownTitleTileBorderRadius;
@@ -132,11 +134,11 @@ class GFMultiSelect<T> extends StatefulWidget {
132134

133135
/// defines dropdown ListTile's checkbox background color when its active
134136
/// type of [Color] used to change the backgroundColor of the active checkbox
135-
final Color activebgColor;
137+
final Color activeBgColor;
136138

137139
/// defines dropdown ListTile's checkbox background color when its inactive
138140
/// type of [Color] used to change the backgroundColor of the inactive checkbox
139-
final Color inactivebgColor;
141+
final Color inactiveBgColor;
140142

141143
/// defines dropdown ListTile's checkbox border color when its active
142144
/// type of [Color] used to change the border color of the active checkbox
@@ -155,15 +157,14 @@ class GFMultiSelect<T> extends StatefulWidget {
155157
final Widget inactiveIcon;
156158

157159
/// type of [Color] used to change the background color of the custom active checkbox only
158-
final Color custombgColor;
160+
final Color customBgColor;
159161

160162
/// To have the list tile appear selected when the checkbox is checked, pass the same value to both.
161163
/// Normally, this property is left to its default value, false.
162164
final bool selected;
163165

164166
/// defines the background color of the dropdown. Can be given [Color] or [GFColors]
165-
final Color dropdownbgColor;
166-
167+
final Color dropdownBgColor;
167168

168169
@override
169170
_GFMultiSelectState createState() => _GFMultiSelectState();
@@ -205,11 +206,11 @@ class _GFMultiSelectState<T> extends State<GFMultiSelect<T>> {
205206
children: <Widget>[
206207
_selectedTitles.isEmpty
207208
? Expanded(
208-
child: Text(widget.dropDownTitleTileText,
209-
style: widget.dropDownTitleTileTextStyle))
209+
child: Text(widget.dropdownTitleTileText,
210+
style: widget.dropdownTitleTileTextStyle))
210211
: Expanded(
211212
child: Text(_selectedTitles.join(', ').toString(),
212-
style: widget.dropDownTitleTileTextStyle)),
213+
style: widget.dropdownTitleTileTextStyle)),
213214
!showDropdown ? widget.expandedIcon : widget.collapsedIcon,
214215
],
215216
);
@@ -235,14 +236,14 @@ class _GFMultiSelectState<T> extends State<GFMultiSelect<T>> {
235236
? const Border(bottom: BorderSide(color: Colors.white))
236237
: Border(bottom: widget.dropdownUnderlineBorder),
237238
),
238-
child: widget.dropDownTitleTileHintText == null
239+
child: widget.dropdownTitleTileHintText == null
239240
? dropdownTile()
240241
: Column(
241242
crossAxisAlignment: CrossAxisAlignment.start,
242243
children: [
243244
Text(
244-
'${widget.dropDownTitleTileHintText}',
245-
style: widget.dropDownTitleTileHintTextStyle,
245+
'${widget.dropdownTitleTileHintText}',
246+
style: widget.dropdownTitleTileHintTextStyle,
246247
),
247248
dropdownTile(),
248249
const SizedBox(
@@ -255,7 +256,7 @@ class _GFMultiSelectState<T> extends State<GFMultiSelect<T>> {
255256
? Container(
256257
padding: const EdgeInsets.symmetric(vertical: 6),
257258
decoration: BoxDecoration(
258-
color: widget.dropdownbgColor,
259+
color: widget.dropdownBgColor,
259260
boxShadow: const [
260261
BoxShadow(
261262
color: Colors.black12,
@@ -288,14 +289,14 @@ class _GFMultiSelectState<T> extends State<GFMultiSelect<T>> {
288289
padding: widget.padding,
289290
margin: widget.margin,
290291
size: widget.size,
291-
activebgColor: widget.activebgColor,
292+
activeBgColor: widget.activeBgColor,
292293
inactiveIcon: widget.inactiveIcon,
293294
activeBorderColor: widget.activeBorderColor,
294-
inactivebgColor: widget.inactivebgColor,
295+
inactiveBgColor: widget.inactiveBgColor,
295296
activeIcon: widget.activeIcon,
296297
inactiveBorderColor:
297298
widget.inactiveBorderColor,
298-
custombgColor: widget.custombgColor,
299+
customBgColor: widget.customBgColor,
299300
checkColor: widget.checkColor,
300301
type: widget.type,
301302
))),

0 commit comments

Comments
 (0)