Skip to content

Commit 2d05612

Browse files
committed
add description in gf animation
1 parent 17897d7 commit 2d05612

File tree

9 files changed

+70
-37
lines changed

9 files changed

+70
-37
lines changed

lib/components/animation/gf_animation.dart

Lines changed: 28 additions & 13 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 animations of the [Decoration].
37+
/// `The duration for animation to perform`
3838
final Duration duration;
3939

40-
/// The duration for animations of the type[Size].
40+
/// The duration for animation to perform
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 physics. Defaults to [Curves.linear].
52+
/// Determines the animation curve. 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,51 +58,66 @@ class GFAnimation extends StatefulWidget {
5858
/// [AnimatedContainer] initial width
5959
final double width;
6060

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

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

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

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

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

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

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

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

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

93+
/// controls animation
9194
final AnimationController controller;
9295

9396
///direction of the [AnimatedDefaultTextStyle] TextDirection for [ltr,rtl]
9497
final TextDirection textDirection;
9598

96-
/// * [ScaleTransition], which animates the scale of a widget.
99+
/// [ScaleTransition], which animates the scale of a widget.
97100
final Animation<Offset> slidePosition;
101+
102+
/// defines the [TextStyle] of [AnimatedDefaultTextStyle]
98103
final TextStyle style;
104+
105+
/// defines the [TextAlign] of [AnimatedDefaultTextStyle]
99106
final TextAlign textAlign;
107+
108+
/// defines the [TextOverflow] of [AnimatedDefaultTextStyle]
100109
final TextOverflow textOverflow;
101110

102-
/// [AnimatedDefaultTextStyle] maxlines
111+
/// defines the [maxLines] of [AnimatedDefaultTextStyle]
103112
final int maxLines;
113+
114+
/// defines the [TextWidthBasis] of [AnimatedDefaultTextStyle]
104115
final TextWidthBasis textWidthBasis;
116+
117+
/// defines the [fontSize] of [AnimatedDefaultTextStyle]
105118
final double fontSize;
119+
120+
/// defines the [fontWeight] of [AnimatedDefaultTextStyle]
106121
final FontWeight fontWeight;
107122

108123
@override

lib/components/border/gf_border.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class GFBorder extends StatelessWidget {
1616
}) : assert(child != null),
1717
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

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 between children in a run in the main axis.
48+
/// How much space to place bestuckValue 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 between the runs themselves in the cross axis.
76+
/// How much space to place bestuckValue 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 between two transitioning pages while in auto playback. Defaults to 800 ms.
78+
/// The animation duration bestuckValue 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 between 0 and 5, which represent the image
347+
/// This offset modulo our length, 6, will return a number bestuckValue 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/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 between two [BoxDecoration]s
70+
/// The [shape] cannot be interpolated; animating bestuckValue two [BoxDecoration]s
7171
/// with different [shape]s will result in a discontinuity in the rendering.
72-
/// To interpolate between two shapes, consider using [ShapeDecoration] and
72+
/// To interpolate bestuckValue 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].

lib/components/intro_screen/gf_intro_screen.dart

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

64
class GFIntroScreen extends StatefulWidget {
75
const GFIntroScreen(

lib/components/intro_screen/gf_intro_slide.dart

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'package:flutter/material.dart';
2-
import 'package:getwidget/colors/gf_color.dart';
3-
import 'package:getwidget/components/image/gf_image_overlay.dart';
2+
import 'package:getwidget/getwidget.dart';
43

54
class GFIntroSlide extends StatelessWidget {
65
const GFIntroSlide({
@@ -9,17 +8,38 @@ class GFIntroSlide extends StatelessWidget {
98
this.image,
109
this.title,
1110
this.subTitle,
11+
this.subTitleText,
12+
this.titleText,
1213
this.titleStyle = const TextStyle(fontSize: 20, color: GFColors.DARK),
1314
this.subTitleStyle = const TextStyle(fontSize: 16, color: GFColors.DARK),
1415
this.backgroundColor = GFColors.PRIMARY,
1516
}) : super(key: key);
1617

18+
/// defines [GFIntroSlide] [child], it takes nay widget
1719
final Widget child;
20+
21+
/// defines [GFIntroSlide] [image]
1822
final Image image;
19-
final String title;
23+
24+
/// defines [title]'s text string
25+
final String titleText;
26+
27+
/// defines [subTitle]'s text string
28+
final String subTitleText;
29+
30+
/// defines [title]'s text string
31+
final Text title;
32+
33+
/// defines [title]'s textStyle
2034
final TextStyle titleStyle;
21-
final String subTitle;
35+
36+
/// defines [subTitle]'s text
37+
final Text subTitle;
38+
39+
/// defines [subTitle]'s textStyle
2240
final TextStyle subTitleStyle;
41+
42+
/// defines [GFIntroSlide] backgroundColor
2343
final Color backgroundColor;
2444

2545
@override
@@ -35,16 +55,16 @@ class GFIntroSlide extends StatelessWidget {
3555
height: 20,
3656
),
3757
title != null ? Text(
38-
title,
58+
titleText,
3959
style: titleStyle,
40-
) : Container(),
60+
) : title,
4161
const SizedBox(
4262
height: 40,
4363
),
4464
subTitle != null ? Text(
45-
subTitle,
65+
subTitleText,
4666
style: subTitleStyle,
47-
) : Container()
67+
) : subTitle
4868
],
4969
),
5070
);

lib/components/progress_bar/gf_progress_bar.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class GFProgressBar extends StatefulWidget {
3636

3737
assert(circleStartAngle >= 0.0);
3838
if (percentage < 0.0 || percentage > 1.0) {
39-
throw Exception('Percentage value must be between 0.0 and 1.0');
39+
throw Exception('Percentage value must be be tween 0.0 and 1.0');
4040
}
4141
}
4242

@@ -133,7 +133,7 @@ class _GFProgressBarState extends State<GFProgressBar>
133133
duration: Duration(milliseconds: widget.animationDuration),
134134
vsync: this);
135135
_animation =
136-
Tween(begin: 0, end: widget.percentage).animate(_animationController)
136+
Tween(begin: 0, end: widget.percentage).animate(_animationController)
137137
..addListener(() {
138138
setState(() {
139139
_progressPercent = _animation.value;
@@ -148,7 +148,7 @@ class _GFProgressBarState extends State<GFProgressBar>
148148
circularAnimationController = AnimationController(
149149
duration: Duration(milliseconds: widget.animationDuration),
150150
vsync: this);
151-
circularAnimation = Tween(begin: 0, end: widget.percentage)
151+
circularAnimation = Tween(begin: 0, end: widget.percentage)
152152
.animate(circularAnimationController)
153153
..addListener(() {
154154
setState(() {
@@ -191,7 +191,7 @@ class _GFProgressBarState extends State<GFProgressBar>
191191
if (_animationController != null) {
192192
_animationController.duration =
193193
Duration(milliseconds: widget.animationDuration);
194-
_animation = Tween(
194+
_animation = Tween(
195195
begin: widget.animateFromLastPercentage
196196
? oldWidget.percentage
197197
: 0.0,
@@ -207,7 +207,7 @@ class _GFProgressBarState extends State<GFProgressBar>
207207
if (circularAnimationController != null) {
208208
circularAnimationController.duration =
209209
Duration(milliseconds: widget.animationDuration);
210-
circularAnimation = Tween(
210+
circularAnimation = Tween(
211211
begin: widget.animateFromLastPercentage
212212
? oldWidget.percentage
213213
: 0.0,

lib/components/rating/gf_rating.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class GFRating extends StatefulWidget {
4848
/// defines the default items, when having filledIcon && halfFilledIcon
4949
final Widget defaultIcon;
5050

51-
/// defines the space between items
51+
/// defines the space bestuckValue items
5252
final double spacing;
5353

5454
/// defines the rating value

0 commit comments

Comments
 (0)