Skip to content

Commit 3a97200

Browse files
authored
Merge pull request #189 from ionicfirebaseapp/revert-188-GFIntroScreen
Revert "Gf intro screen completed"
2 parents b097790 + 6be00a3 commit 3a97200

File tree

15 files changed

+320
-594
lines changed

15 files changed

+320
-594
lines changed

lib/components/animation/gf_animation.dart

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ class GFAnimation extends StatefulWidget {
3434
this.reverseDuration,
3535
}) : super(key: key);
3636

37-
/// `The duration for animation to perform`
37+
/// The duration for animations of the [Decoration].
3838
final Duration duration;
3939

40-
/// The duration for animation to perform
40+
/// The duration for animations of the type[Size].
4141
final Duration reverseDuration;
4242

4343
/// Defines how the animated widget is aligned within the Animation.
@@ -49,7 +49,7 @@ class GFAnimation extends StatefulWidget {
4949
/// The child of type [Widget] to display animation effect.
5050
final Widget child;
5151

52-
/// Determines the animation curve. Defaults to [Curves.linear].
52+
/// Determines the animation curve physics. Defaults to [Curves.linear].
5353
final Curve curve;
5454

5555
///type of [GFAnimation] which takes the type ie, align, size, container, rotateTransition, scaleTransition, slideTransition, and textStyle for the [GFAnimation]
@@ -58,66 +58,51 @@ class GFAnimation extends StatefulWidget {
5858
/// [AnimatedContainer] initial width
5959
final double width;
6060

61-
/// defines the width of [AnimatedContainer] upto which it can extend during animation
61+
/// [AnimatedContainer] changed width
6262
final double changedWidth;
6363

6464
/// [AnimatedContainer] initial height
6565
final double height;
6666

67-
/// defines the height of [AnimatedContainer] upto which it can extend during animation
67+
/// [AnimatedContainer] changed height
6868
final double changedHeight;
6969

70-
/// defines the color of [AnimatedContainer] when onTap triggers
70+
/// defines the color of items when onTap triggers
7171
final Color activeColor;
7272

73-
/// defines the color of [AnimatedContainer]
73+
/// defines the color of items
7474
final Color color;
7575

76-
/// defines [child]'s or [AnimatedContainer] padding
76+
/// The empty space that surrounds the animation. Defines the animation outer [Container.padding]..
7777
final EdgeInsetsGeometry padding;
7878

79-
/// defines [child]'s or [AnimatedContainer] margin
79+
/// The empty space that surrounds the animation. Defines the animation outer [Container.margin].
8080
final EdgeInsetsGeometry margin;
81-
82-
/// Called when the user taps the [child]
8381
final Function onTap;
8482

8583
/// Here's an illustration of the [RotationTransition] widget, with it's [turnsAnimation]
86-
/// animated by a stuckValue set to animate
84+
/// animated by a [Tween] set to [animate]:
8785
final Animation<double> turnsAnimation;
8886

8987
/// Here's an illustration of the [ScaleTransition] widget, with it's [scaleAnimation]
90-
/// animated by a [CurvedAnimation] set to [Curves.linear]
88+
/// animated by a [CurvedAnimation] set to [Curves.linear]:
9189
final Animation<double> scaleAnimation;
9290

93-
/// controls animation
9491
final AnimationController controller;
9592

9693
///direction of the [AnimatedDefaultTextStyle] TextDirection for [ltr,rtl]
9794
final TextDirection textDirection;
9895

99-
/// [ScaleTransition], which animates the scale of a widget.
96+
/// * [ScaleTransition], which animates the scale of a widget.
10097
final Animation<Offset> slidePosition;
101-
102-
/// defines the [TextStyle] of [AnimatedDefaultTextStyle]
10398
final TextStyle style;
104-
105-
/// defines the [TextAlign] of [AnimatedDefaultTextStyle]
10699
final TextAlign textAlign;
107-
108-
/// defines the [TextOverflow] of [AnimatedDefaultTextStyle]
109100
final TextOverflow textOverflow;
110101

111-
/// defines the [maxLines] of [AnimatedDefaultTextStyle]
102+
/// [AnimatedDefaultTextStyle] maxlines
112103
final int maxLines;
113-
114-
/// defines the [TextWidthBasis] of [AnimatedDefaultTextStyle]
115104
final TextWidthBasis textWidthBasis;
116-
117-
/// defines the [fontSize] of [AnimatedDefaultTextStyle]
118105
final double fontSize;
119-
120-
/// defines the [fontWeight] of [AnimatedDefaultTextStyle]
121106
final FontWeight fontWeight;
122107

123108
@override

lib/components/border/gf_border.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ 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

19-
/// child of type [Widget] which can be any component or text, etc
19+
/// child of type [Widget] which can be any component or text , etc
2020
final Widget child;
2121

2222
/// padding of time [EdgeInsets] where in padding is given to the border types
@@ -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/button/gf_button_bar.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class GFButtonBar extends StatelessWidget {
4545
/// are placed relative to each other in the cross axis.
4646
final WrapAlignment alignment;
4747

48-
/// How much space to place bestuckValue children in a run in the main axis.
48+
/// How much space to place between children in a run in the main axis.
4949
///
5050
/// For example, if [spacing] is 10.0, the children will be spaced at least
5151
/// 10.0 logical pixels apart in the main axis.
@@ -73,7 +73,7 @@ class GFButtonBar extends StatelessWidget {
7373
/// are placed relative to each other in the cross axis.
7474
final WrapAlignment runAlignment;
7575

76-
/// How much space to place bestuckValue the runs themselves in the cross axis.
76+
/// How much space to place between the runs themselves in the cross axis.
7777
///
7878
/// For example, if [runSpacing] is 10.0, the runs will be spaced at least
7979
/// 10.0 logical pixels apart in the cross axis.

lib/components/carousel/gf_carousel.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class GFCarousel extends StatefulWidget {
7575
/// Sets Duration to determent the frequency of slides when [autoPlay] is set to true. Defaults to 4 seconds.
7676
final Duration autoPlayInterval;
7777

78-
/// The animation duration bestuckValue two transitioning pages while in auto playback. Defaults to 800 ms.
78+
/// The animation duration between two transitioning pages while in auto playback. Defaults to 800 ms.
7979
final Duration autoPlayAnimationDuration;
8080

8181
/// Determines the animation curve physics. Defaults to [Curves.fastOutSlowIn].
@@ -344,7 +344,7 @@ class _GFCarouselState extends State<GFCarousel> with TickerProviderStateMixin {
344344
/// For example; We have a Carousel of 10000(simulating infinity) but only 6 images.
345345
/// We need to repeat the images to give the illusion of a never ending stream.
346346
/// By calling _getRealIndex with position and base we get an offset.
347-
/// This offset modulo our length, 6, will return a number bestuckValue 0 and 5, which represent the image
347+
/// This offset modulo our length, 6, will return a number between 0 and 5, which represent the image
348348
/// to be placed in the given position.
349349
int _getRealIndex(int position, int base, int length) {
350350
final int offset = position - base;

lib/components/checkbox/gf_checkbox.dart

Lines changed: 8 additions & 9 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, square, circular and custom
28+
/// type of [GFCheckboxType] which is of four type is basic, sqaure, 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 of [Color] used to change the checkcolor when the checkbox is active
34+
/// type pf [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,23 +49,22 @@ 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-
/// on true state this widget will be selected as the initial focus
65-
/// when no other node in its scope is currently focused
64+
/// {@macro flutter.widgets.Focus.autofocus}
6665
final bool autofocus;
6766

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

7170
@override

lib/components/image/gf_image_overlay.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ class GFImageOverlay extends StatelessWidget {
6767
///
6868
/// If this is [BoxShape.circle] then [borderRadius] is ignored.
6969
///
70-
/// The [shape] cannot be interpolated; animating bestuckValue two [BoxDecoration]s
70+
/// The [shape] cannot be interpolated; animating between two [BoxDecoration]s
7171
/// with different [shape]s will result in a discontinuity in the rendering.
72-
/// To interpolate bestuckValue two shapes, consider using [ShapeDecoration] and
72+
/// To interpolate between two shapes, consider using [ShapeDecoration] and
7373
/// different [ShapeBorder]s; in particular, [CircleBorder] instead of
7474
/// [BoxShape.circle] and [RoundedRectangleBorder] instead of
7575
/// [BoxShape.rectangle].
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
import 'package:flutter/cupertino.dart';
2+
import 'package:flutter/material.dart';
3+
4+
class GFIntroBottomNavigation extends StatelessWidget {
5+
const GFIntroBottomNavigation({
6+
Key key,
7+
this.rightText = 'NEXT',
8+
this.pageNumber = 0,
9+
this.onNext,
10+
this.showDivider = true,
11+
this.dividerColor = Colors.grey,
12+
this.dividerHeight = 1,
13+
this.dividerThickness = 0.0,
14+
this.child,
15+
this.padding = const EdgeInsets.all(8),
16+
this.margin = const EdgeInsets.all(8),
17+
this.pagesCount = 0,
18+
this.skipText = 'SKIP',
19+
this.onSkipTap,
20+
this.skipWidget,
21+
this.rightWidget,
22+
this.dotShape = BoxShape.circle,
23+
this.defaultColor,
24+
this.activeColor,
25+
this.dotHeight,
26+
this.dotWidth,
27+
this.dotMargin,
28+
this.skipStyle,
29+
this.rightStyle,
30+
this.onDoneTap,
31+
this.doneText = 'GO',
32+
}) : super(key: key);
33+
34+
final String rightText;
35+
final int pageNumber;
36+
final VoidCallback onNext;
37+
final bool showDivider;
38+
final double dividerHeight;
39+
final double dividerThickness;
40+
final Color dividerColor;
41+
final Widget child;
42+
final int pagesCount;
43+
final String skipText;
44+
final VoidCallback onSkipTap;
45+
final VoidCallback onDoneTap;
46+
final EdgeInsets padding;
47+
final EdgeInsets margin;
48+
final Widget skipWidget;
49+
final Widget rightWidget;
50+
final TextStyle skipStyle;
51+
final TextStyle rightStyle;
52+
final String doneText;
53+
54+
///dot
55+
final BoxShape dotShape;
56+
final Color defaultColor;
57+
final Color activeColor;
58+
final double dotHeight;
59+
final double dotWidth;
60+
final EdgeInsets dotMargin;
61+
62+
@override
63+
Widget build(BuildContext context) => Container(
64+
child: DefaultTextStyle(
65+
style: const TextStyle(
66+
color: Colors.black,
67+
fontSize: 16,
68+
),
69+
child: Column(
70+
mainAxisAlignment: MainAxisAlignment.end,
71+
children: <Widget>[
72+
showDivider
73+
? Divider(
74+
height: dividerHeight,
75+
thickness: dividerThickness,
76+
color: dividerColor,
77+
)
78+
: Container(),
79+
Container(
80+
padding: padding,
81+
margin: margin,
82+
child: Row(
83+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
84+
children: <Widget>[
85+
GestureDetector(
86+
behavior: HitTestBehavior.translucent,
87+
child: Padding(
88+
padding: const EdgeInsets.only(
89+
top: 8,
90+
bottom: 8,
91+
left: 24,
92+
right: 32,
93+
),
94+
child: skipWidget ??
95+
Text(
96+
skipText,
97+
style: skipStyle ??
98+
const TextStyle(
99+
color: Colors.black,
100+
fontSize: 16,
101+
),
102+
)),
103+
onTap: onSkipTap,
104+
),
105+
Expanded(
106+
child: Container(
107+
child: Stack(
108+
children: [
109+
Row(
110+
mainAxisAlignment: MainAxisAlignment.center,
111+
children: getDotsList(),
112+
)
113+
],
114+
),
115+
),
116+
),
117+
GestureDetector(
118+
behavior: HitTestBehavior.translucent,
119+
child: Padding(
120+
padding: const EdgeInsets.only(
121+
top: 8, bottom: 8, left: 32, right: 24),
122+
child: rightWidget ??
123+
Text(
124+
pageNumber == pagesCount - 1
125+
? doneText
126+
: rightText,
127+
style: rightStyle ??
128+
const TextStyle(
129+
color: Colors.black,
130+
fontSize: 16,
131+
)),
132+
),
133+
onTap: pageNumber == pagesCount - 1 ? onDoneTap : onNext,
134+
),
135+
],
136+
),
137+
)
138+
],
139+
),
140+
),
141+
);
142+
143+
List<Widget> getDotsList() {
144+
final List<Widget> list = [];
145+
for (int i = 0; i < pagesCount; i++) {
146+
list.add(Container(
147+
width: dotWidth ?? 12,
148+
height: dotHeight ?? 12,
149+
margin: dotMargin ?? const EdgeInsets.symmetric(horizontal: 4),
150+
decoration: BoxDecoration(
151+
shape: dotShape,
152+
color: pageNumber == i
153+
? activeColor ?? Colors.blue
154+
: defaultColor ?? Colors.grey.withOpacity(0.5),
155+
),
156+
));
157+
}
158+
return list;
159+
}
160+
}

0 commit comments

Comments
 (0)