Skip to content

Commit 17897d7

Browse files
committed
changes done in gfintro screen and gf radio
1 parent cdf4ffb commit 17897d7

File tree

8 files changed

+53
-47
lines changed

8 files changed

+53
-47
lines changed

lib/components/border/gf_border.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class GFBorder extends StatelessWidget {
1414
this.radius = const Radius.circular(0),
1515
this.customPath,
1616
}) : assert(child != null),
17-
assert(_isValiddashedLine(dashedLine), 'Invalid dash pattern');
17+
assert(_isValidDashedLine(dashedLine), 'Invalid dash pattern');
1818

1919
/// child of type [Widget] which can be any component or text , etc
2020
final Widget child;
@@ -61,7 +61,7 @@ class GFBorder extends StatelessWidget {
6161
}
6262

6363
/// the value of dashedLine cannot be 0 or null, it should have some definite and proper value
64-
bool _isValiddashedLine(List<double> dash) {
64+
bool _isValidDashedLine(List<double> dash) {
6565
final Set<double> _dashSet = dash.toSet();
6666
if (_dashSet == null) {
6767
return false;

lib/components/checkbox/gf_checkbox.dart

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ class GFCheckbox extends StatefulWidget {
2525
: assert(autofocus != null),
2626
super(key: key);
2727

28-
/// type of [GFCheckboxType] which is of four type is basic, sqaure, circular and custom
28+
/// type of [GFCheckboxType] which is of four type is basic, square, circular and custom
2929
final GFCheckboxType type;
3030

3131
/// type of [double] which is GFSize ie, small, medium and large and can use any double value
3232
final double size;
3333

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

3737
/// type of [Color] used to change the backgroundColor of the active checkbox
@@ -49,22 +49,23 @@ class GFCheckbox extends StatefulWidget {
4949
/// Called when the user checks or unchecks the checkbox.
5050
final ValueChanged<bool> onChanged;
5151

52-
///Used to set the current state of the checkbox
52+
/// Used to set the current state of the checkbox
5353
final bool value;
5454

55-
///type of Widget used to change the checkbox's active icon
55+
/// type of [Widget] used to change the checkbox's active icon
5656
final Widget activeIcon;
5757

58-
///type of [Widget] used to change the checkbox's inactive icon
58+
/// type of [Widget] used to change the checkbox's inactive icon
5959
final Widget inactiveIcon;
6060

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

64-
/// {@macro flutter.widgets.Focus.autofocus}
64+
/// on true state this widget will be selected as the initial focus
65+
/// when no other node in its scope is currently focused
6566
final bool autofocus;
6667

67-
/// {@macro flutter.widgets.Focus.focusNode}
68+
/// an optional focus node to use as the focus node for this widget.
6869
final FocusNode focusNode;
6970

7071
@override

lib/components/intro_screen/gf_intro_screen.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:flutter/material.dart';
2-
import 'package:getwidget/components/intro_screen/gf__intro_bottom_navigation.dart';
2+
import 'package:getwidget/components/intro_screen/gf_intro_bottom_navigation.dart';
33
import 'package:getwidget/components/intro_screen/gf_intro_slide.dart';
44
import 'package:getwidget/types/gf_intro_type.dart';
55

@@ -9,8 +9,9 @@ class GFIntroScreen extends StatefulWidget {
99
this.slides,
1010
this.pageController,
1111
this.gfIntroBottomNavigation,
12-
this.type,
13-
this.color = Colors.white})
12+
this.type = GFIntroType.fullWidth,
13+
this.color = Colors.white
14+
})
1415
: super(key: key);
1516

1617
/// if the type as [GFIntroType.fullWidth],[GFIntroType.half],[GFIntroType.rounded] use [GFIntroSlide]'s or customWidgets

lib/components/intro_screen/gf_intro_slide.dart

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@ import 'package:getwidget/components/image/gf_image_overlay.dart';
55
class GFIntroSlide extends StatelessWidget {
66
const GFIntroSlide({
77
Key key,
8-
@required this.image,
9-
this.imageHeight = 100,
10-
this.imageWidth = 100,
8+
this.child,
9+
this.image,
1110
this.title,
1211
this.subTitle,
1312
this.titleStyle = const TextStyle(fontSize: 20, color: GFColors.DARK),
1413
this.subTitleStyle = const TextStyle(fontSize: 16, color: GFColors.DARK),
1514
this.backgroundColor = GFColors.PRIMARY,
1615
}) : super(key: key);
17-
final double imageHeight;
18-
final double imageWidth;
19-
final ImageProvider image;
16+
17+
final Widget child;
18+
final Image image;
2019
final String title;
2120
final TextStyle titleStyle;
2221
final String subTitle;
@@ -30,25 +29,22 @@ class GFIntroSlide extends StatelessWidget {
3029
mainAxisAlignment: MainAxisAlignment.center,
3130
crossAxisAlignment: CrossAxisAlignment.center,
3231
children: <Widget>[
33-
GFImageOverlay(
34-
height: imageHeight,
35-
colorFilter: const ColorFilter.mode(null, null),
36-
width: imageWidth,
37-
image: image),
32+
image != null ? image : Container(),
33+
child != null ? child : Container(),
3834
const SizedBox(
3935
height: 20,
4036
),
41-
Text(
42-
title ?? 'Title',
37+
title != null ? Text(
38+
title,
4339
style: titleStyle,
44-
),
40+
) : Container(),
4541
const SizedBox(
4642
height: 40,
4743
),
48-
Text(
49-
subTitle ?? 'Sub Title',
44+
subTitle != null ? Text(
45+
subTitle,
5046
style: subTitleStyle,
51-
)
47+
) : Container()
5248
],
5349
),
5450
);

lib/components/radio/gf_radio.dart

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,39 +41,40 @@ class GFRadio<T> extends StatefulWidget {
4141
/// type of [double] which is GFSize ie, small, medium and large and can use any double value
4242
final double size;
4343

44-
/// type pf [Color] used to change the checkcolor when the checkbox is active
44+
/// type pf [Color] used to change the checkcolor when the radio button is active
4545
final Color radioColor;
4646

47-
/// type of [Color] used to change the backgroundColor of the active checkbox
47+
/// type of [Color] used to change the backgroundColor of the active radio button
4848
final Color activebgColor;
4949

50-
/// type of [Color] used to change the backgroundColor of the inactive checkbox
50+
/// type of [Color] used to change the backgroundColor of the inactive radio button
5151
final Color inactivebgColor;
5252

53-
/// type of [Color] used to change the border color of the active checkbox
53+
/// type of [Color] used to change the border color of the active radio button
5454
final Color activeBorderColor;
5555

56-
/// type of [Color] used to change the border color of the inactive checkbox
56+
/// type of [Color] used to change the border color of the inactive radio button
5757
final Color inactiveBorderColor;
5858

59-
/// Called when the user checks or unchecks the checkbox.
59+
/// Called when the user checks or unchecks the radio button
6060
final ValueChanged<T> onChanged;
6161

62-
///type of Widget used to change the checkbox's active icon
62+
///type of Widget used to change the radio button's active icon
6363
final Widget activeIcon;
6464

65-
///type of [Widget] used to change the checkbox's inactive icon
65+
///type of [Widget] used to change the radio button's inactive icon
6666
final Widget inactiveIcon;
6767

68-
/// type of [Color] used to change the background color of the custom active checkbox only
68+
/// type of [Color] used to change the background color of the custom active radio button only
6969
final Color custombgColor;
7070

71-
/// {@macro flutter.widgets.Focus.focusNode}
72-
final FocusNode focusNode;
73-
74-
/// {@macro flutter.widgets.Focus.autofocus}
71+
/// on true state this widget will be selected as the initial focus
72+
/// when no other node in its scope is currently focused
7573
final bool autofocus;
7674

75+
/// an optional focus node to use as the focus node for this widget.
76+
final FocusNode focusNode;
77+
7778
/// The value represented by this radio button.
7879
final T value;
7980

lib/components/radio_list_tile/gf_radio_list_tile.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,13 @@ class GFRadioListTile<T> extends StatelessWidget {
109109
/// The color for the tile's [Material] when a pointer is hovering over it.
110110
final Color hoverColor;
111111

112-
/// {@macro flutter.widgets.Focus.focusNode}
113-
final FocusNode focusNode;
114-
115-
/// {@macro flutter.widgets.Focus.autofocus}
112+
/// on true state this widget will be selected as the initial focus
113+
/// when no other node in its scope is currently focused
116114
final bool autofocus;
117115

116+
/// an optional focus node to use as the focus node for this widget.
117+
final FocusNode focusNode;
118+
118119
/// type of [GFRadioType] which is of four type is basic, sqaure, circular and custom
119120
final GFRadioType type;
120121

lib/getwidget.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ library getwidget;
33
//exports components
44
export 'package:getwidget/components/accordian/gf_accordian.dart';
55
export 'package:getwidget/components/alert/gf_alert.dart';
6+
export 'package:getwidget/components/animation/gf_animation.dart';
67
export 'package:getwidget/components/appbar/gf_appbar.dart';
78
export 'package:getwidget/components/avatar/gf_avatar.dart';
89
export 'package:getwidget/components/badge/gf_badge.dart';
@@ -23,6 +24,9 @@ export 'package:getwidget/components/drawer/gf_drawer.dart';
2324
export 'package:getwidget/components/drawer/gf_drawer_header.dart';
2425
export 'package:getwidget/components/floating_widget/gf_floating_widget.dart';
2526
export 'package:getwidget/components/image/gf_image_overlay.dart';
27+
export 'package:getwidget/components/intro_screen/gf_intro_bottom_navigation.dart';
28+
export 'package:getwidget/components/intro_screen/gf_intro_screen.dart';
29+
export 'package:getwidget/components/intro_screen/gf_intro_slide.dart';
2630
export 'package:getwidget/components/list_tile/gf_list_tile.dart';
2731
export 'package:getwidget/components/loader/gf_loader.dart';
2832
export 'package:getwidget/components/progress_bar/gf_progress_bar.dart';
@@ -52,9 +56,11 @@ export 'shape/gf_button_shape.dart';
5256
export 'shape/gf_icon_button_shape.dart';
5357
export 'size/gf_size.dart';
5458
export 'types/gf_alert_type.dart';
59+
export 'types/gf_animation_type.dart';
5560
export 'types/gf_border_type.dart';
5661
export 'types/gf_button_type.dart';
5762
export 'types/gf_checkbox_type.dart';
63+
export 'types/gf_intro_type.dart';
5864
export 'types/gf_loader_type.dart';
5965
export 'types/gf_progress_type.dart';
6066
export 'types/gf_radio_type.dart';

0 commit comments

Comments
 (0)