Skip to content

Commit 82b87ce

Browse files
Merge pull request #180 from deepikahr/GFBottomsheet
issues fixed
2 parents aa8ab66 + f5c3ad5 commit 82b87ce

File tree

12 files changed

+212
-15
lines changed

12 files changed

+212
-15
lines changed

lib/components/accordian/gf_accordian.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ class _GFAccordionState extends State<GFAccordion>
9797
showAccordion = widget.showAccordion;
9898
animationController = AnimationController(
9999
duration: const Duration(seconds: 2),
100+
vsync: this
100101
);
101102
controller = AnimationController(
102103
duration: const Duration(milliseconds: 300),
104+
vsync: this
103105
);
104106
offset = Tween(
105107
begin: const Offset(0, -0.06),

lib/components/alert/gf_alert.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class _GFAlertState extends State<GFAlert> with TickerProviderStateMixin {
6868
void initState() {
6969
animationController = AnimationController(
7070
duration: const Duration(milliseconds: 300),
71+
vsync: this
7172
);
7273
animation = CurvedAnimation(
7374
parent: animationController,

lib/components/animation/gf_animation.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class _GFAnimationState extends State<GFAnimation>
118118
if (widget.type == GFAnimationType.rotateTransition) {
119119
controller = widget.controller ??
120120
AnimationController(
121-
duration: widget.duration ?? const Duration(seconds: 2));
121+
duration: widget.duration ?? const Duration(seconds: 2), vsync: this);
122122
animation = widget.turnsAnimation ??
123123
Tween<double>(begin: 0, end: 20).animate(controller);
124124
if (widget.turnsAnimation == null) {
@@ -127,14 +127,14 @@ class _GFAnimationState extends State<GFAnimation>
127127
} else if (widget.type == GFAnimationType.scaleTransition) {
128128
controller = widget.controller ??
129129
AnimationController(
130-
duration: widget.duration ?? const Duration(seconds: 2));
130+
duration: widget.duration ?? const Duration(seconds: 2), vsync: this);
131131
animation = widget.scaleAnimation ??
132132
CurvedAnimation(
133133
parent: controller, curve: widget.curve ?? Curves.ease);
134134
controller.forward();
135135
} else if (widget.type == GFAnimationType.slideTransition) {
136136
controller = AnimationController(
137-
duration: widget.duration ?? const Duration(seconds: 2),
137+
duration: widget.duration ?? const Duration(seconds: 2), vsync: this
138138
)..repeat(reverse: true);
139139
offsetAnimation = Tween<Offset>(
140140
begin: Offset.zero,
@@ -252,7 +252,7 @@ class _GFAnimationState extends State<GFAnimation>
252252
fontWeight: widget.fontWeight ?? FontWeight.normal,
253253
fontSize: widget.fontSize ?? 16,
254254
color: widget.color ?? Colors.blue),
255-
textWidthBasis: widget.textWidthBasis ?? TextWidthBasis.parent,
255+
// textWidthBasis: widget.textWidthBasis ?? TextWidthBasis.parent,
256256
textAlign: widget.textAlign ?? TextAlign.start,
257257
curve: widget.curve ?? Curves.linear,
258258
duration: widget.duration ?? const Duration(seconds: 2),

lib/components/appbar/gf_appbar.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,12 @@ class _GFAppBarState extends State<GFAppBar> {
322322
IconThemeData actionsIconTheme = widget.actionsIconTheme ??
323323
appBarTheme.actionsIconTheme ??
324324
overallIconTheme;
325-
TextStyle centerStyle = widget.textTheme?.headline5 ??
326-
appBarTheme.textTheme?.headline5 ??
327-
theme.primaryTextTheme.headline5;
328-
TextStyle sideStyle = widget.textTheme?.bodyText1 ??
329-
appBarTheme.textTheme?.bodyText1 ??
330-
theme.primaryTextTheme.bodyText1;
325+
TextStyle centerStyle = widget.textTheme?.headline ??
326+
appBarTheme.textTheme?.headline ??
327+
theme.primaryTextTheme.headline;
328+
TextStyle sideStyle = widget.textTheme?.body1 ??
329+
appBarTheme.textTheme?.body1 ??
330+
theme.primaryTextTheme.body1;
331331

332332
if (widget.toolbarOpacity != 1.0) {
333333
final double opacity = const Interval(

lib/components/avatar/gf_avatar.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class GFAvatar extends StatelessWidget {
8787
final Color foregroundColor = this.foregroundColor;
8888
assert(debugCheckHasMediaQuery(context));
8989
final ThemeData theme = Theme.of(context);
90-
TextStyle textStyle = theme.primaryTextTheme.subtitle1.copyWith(
90+
TextStyle textStyle = theme.primaryTextTheme.subtitle.copyWith(
9191
color: foregroundColor,
9292
);
9393
Color effectiveBackgroundColor = backgroundColor;

lib/components/carousel/gf_items_carousel.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class _GFItemsCarouselState extends State<GFItemsCarousel>
8383
offset = 0;
8484
animationController = AnimationController(
8585
duration: const Duration(milliseconds: dragAnimationDuration),
86+
vsync: this
8687
);
8788
Future.delayed(Duration.zero, () {
8889
setState(() {
@@ -132,6 +133,7 @@ class _GFItemsCarouselState extends State<GFItemsCarousel>
132133

133134
animationController = AnimationController(
134135
duration: const Duration(milliseconds: dragAnimationDuration),
136+
vsync: this
135137
);
136138

137139
final Tween tween =
@@ -163,6 +165,7 @@ class _GFItemsCarouselState extends State<GFItemsCarousel>
163165
final double endAnimation = size * (offset / size).round().toDouble();
164166
animationController = AnimationController(
165167
duration: const Duration(milliseconds: shiftAnimationDuration),
168+
vsync: this
166169
);
167170
final Tween tween = Tween<double>(begin: beginAnimation, end: endAnimation);
168171
final Animation animation = tween.animate(animationController);

lib/components/loader/gf_loader.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class _GFLoaderState extends State<GFLoader>
7373

7474
controller = AnimationController(
7575
duration: widget.duration,
76+
vsync: this
7677
);
7778

7879
loaderanimation1 = Tween<double>(begin: 0, end: 1).animate(

lib/components/progress_bar/gf_progress_bar.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class _GFProgressBarState extends State<GFProgressBar>
130130
super.initState();
131131
if (widget.animation) {
132132
_animationController = AnimationController(
133-
duration: Duration(milliseconds: widget.animationDuration));
133+
duration: Duration(milliseconds: widget.animationDuration), vsync: this);
134134
_animation =
135135
Tween(begin: 0, end: widget.percentage).animate(_animationController)
136136
..addListener(() {
@@ -145,7 +145,7 @@ class _GFProgressBarState extends State<GFProgressBar>
145145

146146
if (widget.animation) {
147147
circularAnimationController = AnimationController(
148-
duration: Duration(milliseconds: widget.animationDuration));
148+
duration: Duration(milliseconds: widget.animationDuration), vsync: this);
149149
circularAnimation = Tween(begin: 0, end: widget.percentage)
150150
.animate(circularAnimationController)
151151
..addListener(() {

lib/components/shimmer/gf_shimmer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class _GFShimmerState extends State<GFShimmer>
6565
void initState() {
6666
super.initState();
6767
_count = 0;
68-
_controller = AnimationController(duration: widget.duration)
68+
_controller = AnimationController(duration: widget.duration, vsync: this)
6969
..addStatusListener((AnimationStatus status) {
7070
if (status != AnimationStatus.completed) {
7171
return;

lib/components/toast/gf_toast.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class _GFToastState extends State<GFToast> with TickerProviderStateMixin {
7171
void initState() {
7272
animationController = AnimationController(
7373
duration: widget.duration,
74+
vsync: this
7475
);
7576
animation = CurvedAnimation(
7677
parent: animationController,
@@ -81,6 +82,7 @@ class _GFToastState extends State<GFToast> with TickerProviderStateMixin {
8182
animationController.forward();
8283
fadeanimationController = AnimationController(
8384
duration: widget.animationDuration,
85+
vsync: this
8486
)..addListener(() => setState(() {}));
8587
fadeanimation = Tween<double>(
8688
begin: 0,

0 commit comments

Comments
 (0)