Code Monkey home page Code Monkey logo

local_hero's People

Contributors

letsar avatar snonky avatar

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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

local_hero's Issues

LocalHeroScope needed to use Local Hero

I noticed that I had to add a LocalHeroScope to my app, in order to make everything work.

Does it make sense to integrate that into LocalHeroController? Would make for much simpler implementation right?

Also, made a pull request, so that everything compiles neatly (at least for Android development) without warnings.

How to sponsor?

Love the package and would like to buy you a coffee. Do you mind adding a sponsor button to your repository?

Add new feature if possible

Hello i hope you are good Thank you for continuing the Package and fix the problems , i am very grateful for that , i have just one feature if possible you can add it make local_hero but not in straight line the transaction not in the straight line that we have right now it will be very helpful thank you and makefade aniamtion when change the item if it wasn't the same widget inside

local_hero for GridView items

Hello @letsar !

Great package as always ๐Ÿ‘๐Ÿพ I really think this can be a game changer for many use cases.

I can't make it run with GridView items though, do you have any idea why?

Greetings from an former colleague from OAB ๐Ÿ™‚

[Widgets are swapped] : Using this with different types of widgets produces weird result.

Let me know if I am missing something, but when I try to move between two different types of widgets, the widgets to be rendered is swapped in the next transition.

Top Widget
Container(
          key: ValueKey(tile),
          child: LocalHero(
            tag: tile.text,
            child: GestureDetector(
              onTap: () {
                setState(() {
                  colTiles.add(tile);
                  rowTiles.remove(tile);
                });
              },
              child: Container(
                color: tile.color,
                height: 60,
                width: 60,
                child: Padding(
                  padding: const EdgeInsets.all(16),
                  child: CircleAvatar(
                    backgroundColor: Colors.white70,
                    foregroundColor: Colors.black54,
                    child: Text(tile.text),
                  ),
                ),
              ),
            ),
          ),
        )
Bottom Widget
Container(
                  key: ValueKey(tile),
                  child: LocalHero(
                    tag: tile.text,
                    child: GestureDetector(
                      onTap: () {
                        setState(() {
                          rowTiles.add(tile);
                          colTiles.remove(tile);
                        });
                      },
                      child: Container(
                        width: 80,
                        height: 80,
                        color: tile.color,
                      ),
                    ),
                  ),
                )

So basically the top widget has text and the bottom doesn't.

The issue is TopWidget is rendered in the bottom column in the next transition if the item was previously a part of the top row.

Here is the code if you want to test it out yourself.

Would be great to have a callback on animationEnded

Sometimes, I want to do stuff after the local heroes are done animating.

Current flow is that I change the inflightbuilder to add False to an array, whenever a local hero starts animating, and to add True to the same array when the status is animationStatus == completed. Whenever the number of True == number of False, I do what I want to do next.

Does it make sense for the LocalHeroController to provide a callback to do, I guess that would be way more efficient than a bunch of setState commands?

Assertion failed in inn Animation Controller

The animation works just fine but in the logs it looks very bad. Don't know what to do. Can I leave It like that.

The following assertion was thrown while notifying status listeners for AnimationController:
Assertion failed: file:///Users/apatrck03/Developer/flutter/packages/flutter/lib/src/rendering/object.dart:2221:12
!_debugDisposed
is not true

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49  throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3    assertFailed
packages/flutter/src/rendering/object.dart 2221:13                            markNeedsPaint
packages/local_hero/src/rendering/local_hero_layer.dart 34:7                  [_onAnimationStatusChanged]
packages/flutter/src/animation/listener_helpers.dart 233:27                   notifyStatusListeners
packages/flutter/src/animation/animation_controller.dart 814:7                [_checkStatusChanged]
packages/flutter/src/animation/animation_controller.dart 367:5                set value
packages/local_hero/src/rendering/controller.dart 55:19                       [_onAnimationStatusChanged]
packages/flutter/src/animation/listener_helpers.dart 233:27                   notifyStatusListeners
packages/flutter/src/animation/animation_controller.dart 814:7                [_checkStatusChanged]
packages/flutter/src/animation/animation_controller.dart 830:5                [_tick]
packages/flutter/src/scheduler/ticker.dart 238:12                             [_tick]
packages/flutter/src/scheduler/binding.dart 1143:15                           [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1056:106                          <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/linked_hash_map.dart 21:13      forEach
packages/flutter/src/scheduler/binding.dart 1054:16                           handleBeginFrame
packages/flutter/src/scheduler/binding.dart 975:5                             [_handleBeginFrame]
lib/_engine/engine/platform_dispatcher.dart 1018:13                           invoke1
lib/_engine/engine/platform_dispatcher.dart 136:5                             invokeOnBeginFrame
lib/_engine/engine.dart 431:45                                                <fn>
The AnimationController notifying status listeners was: AnimationController#2c63e(โฎ 0.000; paused)

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.