Giter Site home page Giter Site logo

omerbyrk / add_to_cart_animation Goto Github PK

View Code? Open in Web Editor NEW
30.0 1.0 16.0 472 KB

flutter plugin which provide you add to cart animation.

License: Apache License 2.0

Kotlin 2.31% Ruby 1.37% Swift 2.63% Objective-C 1.21% Dart 25.38% HTML 2.81% Java 0.80% CMake 28.91% C++ 32.36% C 2.21%
add-to-cart android-app animation dart flutter ios

add_to_cart_animation's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

add_to_cart_animation's Issues

how to Init Badge

How to initialize badges (default badge is 0). i need to use badge with list.length

Animation Exception Error

════════ Exception caught by widgets library ═══════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
setState() called after dispose(): _AnimationActionSheetSelectSericeState#60076(lifecycle state: defunct)
This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().


My step:
Step1: Using bottom sheet view have using lib.
Step2: Action tap to many item.
Step3: Don't waiting animation end. I close bottom sheet.
Step4: Error show it

Problem with ticker dispose

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.
image

Can't animate a container with borderRadius

Hello,

The package is working fine, however I can't manage to animate a container with borderRadius, the animated container (floating) has no borderRadius afterward :

Container(
  key: widget.imageKey,
  decoration: BoxDecoration(
    borderRadius: BorderRadius.only(
      topLeft: Radius.circular(
        SmartBarStyle.appBorderRadius,
      ),
      topRight: Radius.circular(
        SmartBarStyle.appBorderRadius,
      ),
    ),
  ),
// Basically an Image.network
  child: _buildProductImage(context),
),

image

Tyvm

animation running throw exception

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):

runAddToCartAnimation Exception

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.