omerbyrk / add_to_cart_animation Goto Github PK
View Code? Open in Web Editor NEWflutter plugin which provide you add to cart animation.
License: Apache License 2.0
flutter plugin which provide you add to cart animation.
License: Apache License 2.0
I use add_to_cart_animation in my project. When I go back from screen whree i used it to my second screen after correct dispose my screen I see error in debug console:
Exception has occurred.
FlutterError (CartIconKey#36ff4(ticker active but muted) was disposed with an active Ticker.
CartIconKey created a Ticker via its SingleTickerProviderStateMixin, but at the time dispose() was called on the mixin, that Ticker was still active. The Ticker must be disposed before calling super.dispose().
Tickers used by AnimationControllers should be disposed by calling dispose() on the AnimationController itself. Otherwise, the ticker will leak.
The offending ticker was:
Ticker(created by CartIconKey#36ff4)
version: 2.0.1
Fix for that is easy. Please change order this two function. I create special PR for that isuue.
Error used controller with ChangeNotifier
Cod:
void listClick(GlobalKey widgetKey) async {
try {
// here ***********
await runAddToCartAnimation(widgetKey);
} catch (e) {
print(e);
}
await cartKey.currentState!.runCartAnimation((++cartTotalItems).toString());
}
when i runAddToCartAnimation throw Exception
E/flutter (16483): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Null check operator used on a null value
E/flutter (16483): #0 _AddToCartAnimationState.runAddToCardAnimation (package:add_to_cart_animation/add_to_cart_animation.dart:173:42)
E/flutter (16483):
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value. Error thrown null.
at State.setState(framework.dart:1153)
at _AddToCartAnimationState.runAddToCartAnimation(add_to_cart_animation.dart:171)
at _ProductDetailPageState.build.(product_detail_page.dart:263)
This is what I saw above on firebase, where a user had this problem. But I can't reproduce it
How to initialize badges (default badge is 0). i need to use badge with list.length
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.