flutter-animation

How could I change ColorTween colors in Flutter

馋奶兔 提交于 2021-02-20 02:55:33
问题 I want to change the colors in the ColorTween when I call setState() in Flutter Here is my animated image import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; class FingerprintImageWidget extends StatefulWidget { FingerprintImageWidget( {Key key, this.width, this.height, this.beginColor, this.endColor}) : super(key: key); final double width; final double height; Color beginColor; Color endColor; @override FingerprintImageWidgetState createState()

How could I change ColorTween colors in Flutter

吃可爱长大的小学妹 提交于 2021-02-20 02:55:09
问题 I want to change the colors in the ColorTween when I call setState() in Flutter Here is my animated image import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; class FingerprintImageWidget extends StatefulWidget { FingerprintImageWidget( {Key key, this.width, this.height, this.beginColor, this.endColor}) : super(key: key); final double width; final double height; Color beginColor; Color endColor; @override FingerprintImageWidgetState createState()

Moving along a curved path in flutter

此生再无相见时 提交于 2021-02-17 11:07:38
问题 I want to know how can I animate a widget in Flutter along a path like following image: Let's say I have a simple curved line: import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: SamplePath(), ); } } class SamplePath extends StatefulWidget { @override State<StatefulWidget> createState() => _SamplePathState(); } class _SamplePathState extends State<SamplePath> {

Moving along a curved path in flutter

不羁岁月 提交于 2021-02-17 11:06:56
问题 I want to know how can I animate a widget in Flutter along a path like following image: Let's say I have a simple curved line: import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: SamplePath(), ); } } class SamplePath extends StatefulWidget { @override State<StatefulWidget> createState() => _SamplePathState(); } class _SamplePathState extends State<SamplePath> {

Flutter Flare, Rive, is it able to use for background?

帅比萌擦擦* 提交于 2021-02-11 17:38:55
问题 I just succeed flutter-flare for my flutter widgets but I could not find a example to use it for background (Container) is this possible? 回答1: Use official example code https://github.com/2d-inc/Flare-Flutter/tree/stable/example/teddy/lib with a little modification, you can use Stack and Positioned and change attribute value like top code snippet return Scaffold( backgroundColor: Color.fromRGBO(93, 142, 155, 1.0), body: Container( child: Stack( children: <Widget>[ Positioned( top: 50, left:0,

Flutter expansion tile remove trailing

旧街凉风 提交于 2021-01-29 12:30:47
问题 i have a exoansiontile and i want it to be like a box, everything centered, the problem is that if i add a text that is too long, i get the overflow error and i think this is caused by the trailing of the expansion tile. Here is a picture: https://gyazo.com/c29329106dc5dcb162b71b5f41951b67 Here is the code: ExpansionTile( trailing: Text(''), leading: Container( margin: new EdgeInsets.only(left: 0, top: 10.0, right: 0.0, bottom: 0.0), child: Image.asset( 'images/food.png' )), title: Row(

async/await to do CircularProgressIndicator in a Login Page in Flutter

时光总嘲笑我的痴心妄想 提交于 2021-01-28 11:40:46
问题 I am facing problems with the CircularProgressIndicator in a login page. I would like to do this. When the users tap in "log in" button I want that the app makes a CircularProgressIndicator and kick the raisedButton Text and add the CircularProgessIdnicator, and after that my app get the data from my webservice I want to stop the CircularProgessIndicator. Any Tips? thanks. Actual Code (you can compile it without problems just add http: ^0.12.0 in dependencies). Photos of the actual system:

Flutter - Feedback of Draggable widget does not animate properly

爱⌒轻易说出口 提交于 2021-01-28 08:08:12
问题 The AnimatedIcon widget, when holding/dragging it, teleports to the top-left hand of the screen(not intentional). It initially starts at the centre of the screen and returns to same position when it is released. Any help would be greatly appreciated. Note: As this is in GIF format, it does not appear smooth here. Here's my code: import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; void main() { runApp(MyApp()); } class MyApp extends StatefulWidget { @override

Design this animation using SliverAppBar flutter

寵の児 提交于 2021-01-20 18:38:46
问题 Here's what I want to build but I am able to achieve this by the following code, @override Widget build(BuildContext context) { return Scaffold( body: NestedScrollView( headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled){ return [ SliverAppBar( expandedHeight: 120, floating: false, pinned: false, flexibleSpace: Container( padding: EdgeInsets.all(10), height: 160, width: double.infinity, child: Column( mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: