Comments (3)
Hi @ervindobri,
I just tested your use case using the following code:
class _MyHomePageState extends State<MyHomePage> {
final GlobalKey<AnimatorWidgetState> inOutAnimation =
GlobalKey<AnimatorWidgetState>();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Flutter Animator'),
),
body: Column(
children: [
FadeInLeft(
key: inOutAnimation,
preferences: AnimationPreferences(
autoPlay: AnimationPlayStates.None,
),
child: Container(
width: 200,
height: 200,
color: Colors.blue,
child: Text("TopMenu"),
),
),
TextButton(
onPressed: () {
inOutAnimation.currentState.forward();
},
child: Text('Start animation'),
),
],
),
);
}
}
This runs perfectly on all device types including web.
When I run flutter doctor
:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.1, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-NL)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.54.3)
[✓] Connected device (3 available)
• No issues found!
Could you please post your flutter doctor
output?
from animator.
Hi @ervindobri,
Could you please try your code with the current version of flutter_animator: ^3.1.1
?
@Ali1Ammar fixed some issues in the null safety which will probably fix these issues...
Please let me know so I can close this issue.
Kind regards.
from animator.
Closing this due to lack of response.
from animator.
Related Issues (9)
- how to animate widgets just once? HOT 1
- support for Flutter 3 HOT 2
- Chaining animations? HOT 1
- Control play/stop/reverse animations without GlobalKey ? HOT 1
- Migrate to null safety HOT 1
- AnimationPreferences bug with autoPlay PingPong HOT 2
- How to adjust the animation distance? HOT 4
- Replay animation on navigation back to page HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animator.