Flexible and easy to use page transitions.

Overview

license stars forks Pub GitHub followers Twitter Follow Build Status

flutter_villains

What are heroes without villains?

profile-page

(Profile image from: https://unsplash.com/photos/pAs4IM6OGWI)

Check out the article.

What are villains?

You keep seeing beautiful page transitions but you think to yourself those are too much work?

Fear no more, villains are here to save you!

When doing animations when a page transition occurs you'd usally define an AnimationController in the initState() and start it there. You'd also have to wrap your widgets in AnimatedWidgets to react to the AnimationController. Besides this being a lot of boilerplate code which clogs up you precious widgets, animating on exit isn't as trivial.

Using this library you just wrap your widget you'd like to be animated when a page transition occurs in a Villain and everything is handled automatically.

Installation

dependencies:
  flutter_villains: "^1.2.1"

Run packages get and import:

import 'package:flutter_villains/villain.dart';

Assembling pages with style

Define animations to play when a page is opened.

Easy to use

      Villain(
        villainAnimation: VillainAnimation.fromBottom(
          relativeOffset: 0.4,
          from: Duration(milliseconds: 100),
          to: Duration(seconds: 1),
        ),
        animateExit: false,
        secondaryVillainAnimation: VillainAnimation.fade(),
        child: Divider(
          color: Colors.black,
          height: 32.0,
        ),
      ),

That's it. No TickerProviders, no AnimationControllers, no boilerplate, no worries. Remember the StaggeredAnimation tutorial? This is using SequenceAnimation internally and there is therefore no need to specify durations as portions of a time-frame. It just works.

With this basic setup the Divider fades in and moves up when a page transition occures (don't forget the VillainTransitionObserver more on that under Code).

Flexible

The animation you'd like to use is not premade? Make it yourself with a few lines of code!

  static VillainAnimation fade(
          {double fadeFrom = 0.0,
          double fadeTo = 1.0,
          Duration from = Duration.zero,
          Duration to: _kMaterialRouteTransitionLength,
          Curve curve: Curves.linear}) =>
      VillainAnimation(
          from: from,
          curve: curve,
          to: to,
          animatable: Tween<double>(begin: fadeFrom, end: fadeTo),
          animatedWidgetBuilder: (animation, child) {
            return FadeTransition(
              opacity: animation,
              child: child,
            );
          });

Every VillainAnimation needs an Animatable (most of the time it's a Tween) and an AnimatedWidget. Everything else is handled automatically.

Code

There are two way of playing your villains.

  1. If you want them to automatically play when a page transition occurs (you probably want that) then add this to your MaterialApp
    return new MaterialApp(
      navigatorObservers: [new VillainTransitionObserver()],
  1. Play villains in a given context manually.
    VillainController.playAllVillains(context);

Secondary Animation

You can play up to two animations per Villain. You can always wrap Villains inside each other for infinite animations!

    Villain(
      villainAnimation: VillainAnimation.fromBottomToTop(0.4, to: Duration(milliseconds: 150)),
      animateExit: false,
      secondaryVillainAnimation: VillainAnimation.fade,
      child: Text(
        "Hi",
        style: Theme.of(context).textTheme.body1,
      ),
    ),

Extras

Define whether the villain should play on entrance/ exit.

    animateEntrance: true,
    animateExit: true,

When using the VillainController manually, it checks this bool to determine whether it should animate.

  static Future playAllVillains(BuildContext context, {bool entrance = true})

Villains entering the page are decoupled from the page transition, meaning they can be as long as they want. On the other hand, if a villain leaves the page, the animation is driven by the page transition. This means:

  • The exit animation is always as long a the exit page transition
  • Setting the duration doesn't change anything

Examples

Take a look at the example folder for three nice examples.

Features:

The villain framework takes care of:

  • managing page transition callbacks
  • supplying animations
  • providing premade common animations

In contrast to real world villains, these villains are very easy to handle.

Controller

Currenty there are no controllers implemented to play individual villains by themselves. If you'd like to have that implemented I opened an issue discussing it. Check it out!

Icon from https://icons8.com/

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

Comments
  • Error building

    Error building

    After installing I get the following error when I try to build for Android. The weird thing is that for iOS it is building successfully.

    Compiler message:
    file:///Users/user/.pub-cache/hosted/pub.dartlang.org/flutter_villains-1.1.5/lib/villains/villains.dart:383:8: Error: The method 'VillainTransitionObserver::didStartUserGesture' has fewer positional arguments than those of overridden method 'NavigatorObserver::didStartUserGesture'.
      void didStartUserGesture() {
           ^
    file:///Users/user/flutter/packages/flutter/lib/src/widgets/navigator.dart:363:8: Context: This is the overridden method ('didStartUserGesture').
      void didStartUserGesture(Route<dynamic> route, Route<dynamic> previousRoute) { }
           ^
    file:///Users/user/.pub-cache/hosted/pub.dartlang.org/flutter_sequence_animation-2.0.1/lib/flutter_sequence_animation.dart:127:7: Error: The non-abstract class 'IntervalAnimatable' is missing implementations for these members:
      'transform'.
    Try to either
     - provide an implementation,
     - inherit an implementation from a superclass or mixin,
     - mark the class as abstract, or
     - provide a 'noSuchMethod' implementation.
    
     class IntervalAnimatable<T> extends Animatable<T> {
          ^^^^^^^^^^^^^^^^^^
    file:///Users/user/flutter/packages/flutter/lib/src/animation/tween.dart:39:5: Context: 'transform' is defined here.
      T transform(double t);
        ^^^^^^^^^
    Compiler terminated unexpectedly.
    
    opened by arsen 8
  • setState called after dispose

    setState called after dispose

    flutter: The following assertion was thrown while notifying status listeners for AnimationController:
    flutter: setState() called after dispose(): _VillainState#f0d79(lifecycle state: defunct, not mounted)
    flutter: This error happens if you call setState() on a State object for a widget that no longer appears in
    flutter: the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error
    flutter: can occur when code calls setState() from a timer or an animation callback. The preferred solution
    flutter: is to cancel the timer or stop listening to the animation in the dispose() callback. Another
    flutter: solution is to check the "mounted" property of this object before calling setState() to ensure the
    flutter: object is still in the tree.
    flutter: This error might indicate a memory leak if setState() is being called because another object is
    flutter: retaining a reference to this State object after it has been removed from the tree. To avoid memory
    flutter: leaks, consider breaking the reference to this object during dispose().
    flutter:
    flutter: When the exception was thrown, this was the stack:
    flutter: #0      State.setState.<anonymous closure> (package:flutter/src/widgets/framework.dart:1098:9)
    flutter: #1      State.setState (package:flutter/src/widgets/framework.dart:1124:6)
    flutter: #2      _VillainState._handleStatusChange (package:flutter_villains/villains/villains.dart:129:9)
    flutter: #3      _AnimationController&Animation&AnimationEagerListenerMixin&AnimationLocalListenersMixin&AnimationLocalStatusListenersMixin.notifyStatusListeners (package:flutter/src/animation/listener_helpers.dart:161:19)
    flutter: #4      AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:593:7)
    flutter: #5      AnimationController._tick (package:flutter/src/animation/animation_controller.dart:609:5)
    flutter: #6      Ticker._tick (package:flutter/src/scheduler/ticker.dart:228:5)
    flutter: #7      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
    flutter: #8      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:906:11)
    flutter: #9      __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:365:8)
    flutter: #10     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:904:17)
    flutter: #11     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:834:5)
    flutter: #12     _invoke1 (dart:ui/hooks.dart:142:13)
    flutter: #13     _beginFrame (dart:ui/hooks.dart:113:3)
    flutter:
    flutter: The AnimationController notifying status listeners was:
    flutter:   AnimationController#9085f(⏭ 1.000; paused)```
    opened by modulovalue 7
  • Question: How do I run the example?

    Question: How do I run the example?

    First off, thank you for the great blog articles!

    I cloned this repo and wanted to try out the example, so I did this:

    ~/src/github.com/Norbert515/flutter_villains/example (master) $ flutter run
    Target file "lib/main.dart" not found.
    ~/src/github.com/Norbert515/flutter_villains/example (master) $ flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.4 17E199, locale en-US)
    [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    [✓] iOS toolchain - develop for iOS devices (Xcode 9.4)
    [✓] Android Studio (version 3.1)
    [✓] VS Code (version 1.23.1)
    [✓] Connected devices (2 available)
    
    • No issues found!
    

    Any ideas what I'm doing wrong?

    opened by gmlewis 3
  • Villians Animation doesn't work with FutureBuilder

    Villians Animation doesn't work with FutureBuilder

    When im using a FutureBuilder and Villian inside the Widget that returns after an async function, the Widget never shown and the animation does not start.

    i tried using VillianController to invoke the animation myself but i can't use it inside the build method where my code is called after the async function finishes because it throws exception

    opened by shtengel 1
  • Feature Request: N VillainAnimations

    Feature Request: N VillainAnimations

    it would be nice if there were a way to provide more than 2 villainAnimations e.g. by providing a list of VillainAnimations to a Villain or a way to combine a list of VillainAnimations to one VillainAnimation

    opened by modulovalue 1
  • New villain animations

    New villain animations

    Take a look at the commit titles for more detail

    the transformTranslate function allows the translation by an absolute amount. the current functions translate relatively (if I'm not mistaken).

    opened by modulovalue 0
  • Example doesn't build

    Example doesn't build

    Launching lib/main.dart on HD1905 in debug mode... [!] Your app isn't using AndroidX. To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY. /home/steve/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/b6acc970310797013b2d443a13c722a4/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

    /home/steve/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/b6acc970310797013b2d443a13c722a4/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.

    /home/steve/google/flutter_villains/example/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:84: error: resource android:attr/fontVariationSettings not found. /home/steve/google/flutter_villains/example/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:84: error: resource android:attr/ttcIndex not found. error: failed linking references. Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796) at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551) at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285) at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482) at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79) at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794) at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551) at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285) at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134) at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462) at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79) at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179) Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:463) at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:415) at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332) at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':app:processDebugResources'.

    Failed to execute aapt

    • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    • Get more help at https://help.gradle.org

    BUILD FAILED in 7s Gradle task assembleDebug failed with exit code 1 Exited (sigterm)

    opened by sgehrman 0
  • Exit animations not working with PageRouteBuilder

    Exit animations not working with PageRouteBuilder

    Hi,

    I'm using PageRouteBuilder to push a widget with villain animations. The entrance animations work fine, however when i use Navigator.of(context).pop(), the exit animations don't appear.

    Here's the push:

                      listenerContext,
                      PageRouteBuilder(
                          pageBuilder: (listenerContext, _, __) => RestScreen(
                                rest: state.rest,
                                workoutArea: widget.workoutArea,
                              ))).then((result) => result
                      ? _workoutBloc.dispatch(FinishWorkoutStep())
                      : print("closed"));```
    
    and pop + villain animations (part of RestScreen):
    ```              Villain(
                    villainAnimation: VillainAnimation.fade(
                        from: Duration(milliseconds: 0),
                        to: Duration(milliseconds: 1000),
                        fadeFrom: 0,
                        fadeTo: 1,
                        curve: Curves.linear),
                    animateExit: true,
                    animateEntrance: true,
                    child: AppBar(
                      elevation: 0.0,
                      centerTitle: true,
                      title: Text(
                        widget.rest.title,
                        style: AppTheme.heading,
                      ),
                      leading: Padding(
                        padding: const EdgeInsets.only(left: 16),
                        child: IconButton(
                          iconSize: 40,
                          icon: Icon(Icons.close),
                          color: Colors.white.withOpacity(0.9),
                          onPressed: () {
                            Navigator.of(context).pop(false);
                          },
                        ),
                      ),
                      backgroundColor: Colors.transparent,
                    ),
                  ),```
    opened by rlch 1
Owner
Norbert Kozsir
Student, Android Developer, Machine-Learning enthusiast and in love with flutter. Follow me in twitter @ norbertkozsir
Norbert Kozsir
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web

Flutter EasyLoading English | 简体中文 Live Preview ?? https://nslog11.github.io/flutter_easyloading Installing Add this to your package's pubspec.yaml fi

nslog11 1k Jan 9, 2023
A customizable and easy to use UI widgets to help develop apps faster

Lenore UI Beautiful, customizable and easy to use UI widgets to help me (or maybe you) develop my (or maybe your) apps faster. This is my personal pac

Lenore 3 Nov 4, 2022
Easy to use, customizable and pluggable Theme Provider.

theme_provider Easy to use, customizable Theme Provider. This provides app color schemes throughout the app and automatically rebuilds the UI dynamica

K.D. Sunera Avinash Chandrasiri 143 Dec 10, 2022
An animation Framework for Flutter. It is state-based, declarative, extensible, composable and easy to use.

⚠️ This package is in an early state of development. If you find any bugs or have any suggestions, please open an issue. Fleet is an animation framewo

Gabriel Terwesten 3 Sep 29, 2022
An easy way to use AnimationController with Curve.

CurvedAnimationController An easy way to use AnimationController with Curve. Getting Started Add dependency in your flutter project. $ flutter pub add

Salman S 6 Nov 23, 2021
Login Page UI Design and Animation For Flutter

Flutter Beautiful Login Page UI Design and Animation - Day 14 class Afgprogramme

Behruz Hurramov 0 Dec 24, 2021
A Flutter Log In Page using Flare Animations

Bear_log_in An example built using JCToon's Flare File as a custom UI component. Bear will follow the cursor as you type or move it around. Overview T

Apurv Jha 14 Oct 19, 2022
Page Transition Animation With Flutter

Page Transition Animation - Day 6 A new Flutter project. Screenshots Getting Started This project is a starting point for a Flutter application. A few

null 0 Oct 27, 2021
Page indicator for flutter, with multiple build-in layouts.

flutter_page_indicators Page indicator for flutter, with multiple build-in layouts. NOTE:This project is forked from flutter_page_indicator, because t

OpenFlutter 12 Jun 29, 2022
Page Transition package for multiple navigation types

f_page_transition A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you st

VAMSI KRISHNA THANIKANTI 1 Oct 29, 2021
A Flutter Login Page UI project

flutter_login_ui A new Flutter Login Page UI project. Getting Started This project is a starting point for a Flutter application. A few resources to g

Jakariya (হাদি) 1 Dec 4, 2021
Mobile app onboarding, Login, Signup page with #flutter.

Welcome page, Login Page and Sign up page - Flutter UI Watch it on YouTube Packages we are using: flutter_svg: link We design 3 screens first one is a

Abu Anwar 1k Jan 6, 2023
On-boarding page for flutter applications

onboarding This is a sample flutter onboarding plugin you use to attract first-time users when they land on your page, hence the name onboarding. You

Eyoel Defare 9 Nov 2, 2022
Phone number authentication + OTP login page built with @flutter 😍

The Gorgeous Otp A login page built with flutter inspired by a design found on Uplabs Login Screen OTP Screen Tools This project uses the phone connec

Hugo EXTRAT 179 Nov 22, 2022
🔥🔥🔥 Easy to build an animation set

✨ Flutter Animation Set [Lanuage ~~] English | 中文文档 Simplified Flutter stagger animation.To drive the Flutter stagger animation through a timeline in

YYDev 271 Oct 31, 2022
🔥🔥🔥 Easy to build an animation set

✨ Flutter Animation Set [Lanuage ~~] English | 中文文档 Simplified Flutter stagger animation.To drive the Flutter stagger animation through a timeline in

YYDev 271 Oct 31, 2022
IntroAnimationSlider - A simple Flutte Animation Introduction for Mobile app easy to implement Using intro Views flutter

introappanimation simple Flutte Animation Introduction for Mobile app easy to im

null 3 Sep 22, 2022
This repository demonstrates use of various widgets in flutter and tricks to create beautiful UI elements in flutter for Android and IOS

AwesomeFlutterUI The purpose of this repository is to demonstrate the use of different widgets and tricks in flutter and how to use them in your proje

Subir Chakraborty 132 Nov 13, 2022
A collection of Screens and attractive UIs built with Flutter ready to be used in your applications. No external libraries are used. Just download, add to your project and use.

Flutter Screens A collection of Login Screens, Buttons, Loaders and Widgets with attractive UIs, built with Flutter, ready to be used in your applicat

Samarth Agarwal 5k Dec 31, 2022