Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/components/accordian/gf_accordian.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ class _GFAccordionState extends State<GFAccordion>
showAccordion = widget.showAccordion;
animationController = AnimationController(
duration: const Duration(seconds: 2),
vsync: this
);
controller = AnimationController(
duration: const Duration(milliseconds: 300),
vsync: this
);
offset = Tween(
begin: const Offset(0, -0.06),
Expand Down
1 change: 1 addition & 0 deletions lib/components/alert/gf_alert.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class _GFAlertState extends State<GFAlert> with TickerProviderStateMixin {
void initState() {
animationController = AnimationController(
duration: const Duration(milliseconds: 300),
vsync: this
);
animation = CurvedAnimation(
parent: animationController,
Expand Down
8 changes: 4 additions & 4 deletions lib/components/animation/gf_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class _GFAnimationState extends State<GFAnimation>
if (widget.type == GFAnimationType.rotateTransition) {
controller = widget.controller ??
AnimationController(
duration: widget.duration ?? const Duration(seconds: 2));
duration: widget.duration ?? const Duration(seconds: 2), vsync: this);
animation = widget.turnsAnimation ??
Tween<double>(begin: 0, end: 20).animate(controller);
if (widget.turnsAnimation == null) {
Expand All @@ -127,14 +127,14 @@ class _GFAnimationState extends State<GFAnimation>
} else if (widget.type == GFAnimationType.scaleTransition) {
controller = widget.controller ??
AnimationController(
duration: widget.duration ?? const Duration(seconds: 2));
duration: widget.duration ?? const Duration(seconds: 2), vsync: this);
animation = widget.scaleAnimation ??
CurvedAnimation(
parent: controller, curve: widget.curve ?? Curves.ease);
controller.forward();
} else if (widget.type == GFAnimationType.slideTransition) {
controller = AnimationController(
duration: widget.duration ?? const Duration(seconds: 2),
duration: widget.duration ?? const Duration(seconds: 2), vsync: this
)..repeat(reverse: true);
offsetAnimation = Tween<Offset>(
begin: Offset.zero,
Expand Down Expand Up @@ -252,7 +252,7 @@ class _GFAnimationState extends State<GFAnimation>
fontWeight: widget.fontWeight ?? FontWeight.normal,
fontSize: widget.fontSize ?? 16,
color: widget.color ?? Colors.blue),
textWidthBasis: widget.textWidthBasis ?? TextWidthBasis.parent,
// textWidthBasis: widget.textWidthBasis ?? TextWidthBasis.parent,
textAlign: widget.textAlign ?? TextAlign.start,
curve: widget.curve ?? Curves.linear,
duration: widget.duration ?? const Duration(seconds: 2),
Expand Down
12 changes: 6 additions & 6 deletions lib/components/appbar/gf_appbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ class _GFAppBarState extends State<GFAppBar> {
IconThemeData actionsIconTheme = widget.actionsIconTheme ??
appBarTheme.actionsIconTheme ??
overallIconTheme;
TextStyle centerStyle = widget.textTheme?.headline5 ??
appBarTheme.textTheme?.headline5 ??
theme.primaryTextTheme.headline5;
TextStyle sideStyle = widget.textTheme?.bodyText1 ??
appBarTheme.textTheme?.bodyText1 ??
theme.primaryTextTheme.bodyText1;
TextStyle centerStyle = widget.textTheme?.headline ??
appBarTheme.textTheme?.headline ??
theme.primaryTextTheme.headline;
TextStyle sideStyle = widget.textTheme?.body1 ??
appBarTheme.textTheme?.body1 ??
theme.primaryTextTheme.body1;

if (widget.toolbarOpacity != 1.0) {
final double opacity = const Interval(
Expand Down
2 changes: 1 addition & 1 deletion lib/components/avatar/gf_avatar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class GFAvatar extends StatelessWidget {
final Color foregroundColor = this.foregroundColor;
assert(debugCheckHasMediaQuery(context));
final ThemeData theme = Theme.of(context);
TextStyle textStyle = theme.primaryTextTheme.subtitle1.copyWith(
TextStyle textStyle = theme.primaryTextTheme.subtitle.copyWith(
color: foregroundColor,
);
Color effectiveBackgroundColor = backgroundColor;
Expand Down
3 changes: 3 additions & 0 deletions lib/components/carousel/gf_items_carousel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class _GFItemsCarouselState extends State<GFItemsCarousel>
offset = 0;
animationController = AnimationController(
duration: const Duration(milliseconds: dragAnimationDuration),
vsync: this
);
Future.delayed(Duration.zero, () {
setState(() {
Expand Down Expand Up @@ -132,6 +133,7 @@ class _GFItemsCarouselState extends State<GFItemsCarousel>

animationController = AnimationController(
duration: const Duration(milliseconds: dragAnimationDuration),
vsync: this
);

final Tween tween =
Expand Down Expand Up @@ -163,6 +165,7 @@ class _GFItemsCarouselState extends State<GFItemsCarousel>
final double endAnimation = size * (offset / size).round().toDouble();
animationController = AnimationController(
duration: const Duration(milliseconds: shiftAnimationDuration),
vsync: this
);
final Tween tween = Tween<double>(begin: beginAnimation, end: endAnimation);
final Animation animation = tween.animate(animationController);
Expand Down
1 change: 1 addition & 0 deletions lib/components/loader/gf_loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class _GFLoaderState extends State<GFLoader>

controller = AnimationController(
duration: widget.duration,
vsync: this
);

loaderanimation1 = Tween<double>(begin: 0, end: 1).animate(
Expand Down
4 changes: 2 additions & 2 deletions lib/components/progress_bar/gf_progress_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class _GFProgressBarState extends State<GFProgressBar>
super.initState();
if (widget.animation) {
_animationController = AnimationController(
duration: Duration(milliseconds: widget.animationDuration));
duration: Duration(milliseconds: widget.animationDuration), vsync: this);
_animation =
Tween(begin: 0, end: widget.percentage).animate(_animationController)
..addListener(() {
Expand All @@ -145,7 +145,7 @@ class _GFProgressBarState extends State<GFProgressBar>

if (widget.animation) {
circularAnimationController = AnimationController(
duration: Duration(milliseconds: widget.animationDuration));
duration: Duration(milliseconds: widget.animationDuration), vsync: this);
circularAnimation = Tween(begin: 0, end: widget.percentage)
.animate(circularAnimationController)
..addListener(() {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/shimmer/gf_shimmer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class _GFShimmerState extends State<GFShimmer>
void initState() {
super.initState();
_count = 0;
_controller = AnimationController(duration: widget.duration)
_controller = AnimationController(duration: widget.duration, vsync: this)
..addStatusListener((AnimationStatus status) {
if (status != AnimationStatus.completed) {
return;
Expand Down
2 changes: 2 additions & 0 deletions lib/components/toast/gf_toast.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class _GFToastState extends State<GFToast> with TickerProviderStateMixin {
void initState() {
animationController = AnimationController(
duration: widget.duration,
vsync: this
);
animation = CurvedAnimation(
parent: animationController,
Expand All @@ -81,6 +82,7 @@ class _GFToastState extends State<GFToast> with TickerProviderStateMixin {
animationController.forward();
fadeanimationController = AnimationController(
duration: widget.animationDuration,
vsync: this
)..addListener(() => setState(() {}));
fadeanimation = Tween<double>(
begin: 0,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/toggle/gf_toggle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _GFToggleState extends State<GFToggle> with TickerProviderStateMixin {
setState(() {
isOn = widget.value ?? false;
});
controller = AnimationController(duration: widget.duration);
controller = AnimationController(duration: widget.duration, vsync: this);
offset = (isOn
? Tween<Offset>(
begin: const Offset(1, 0),
Expand Down
188 changes: 188 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.11"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
sdks:
dart: ">=2.4.0 <3.0.0"