flutter-animation

Flutter Animation Not Working

核能气质少年 提交于 2020-08-25 01:59:46
问题 I am trying to make a radial menu in Flutter and want my menu button to have a rotation animation every time pressed. I followed TensorProgramming's tutorial on Youtube on The Basics of Animation in Flutter but my animation for some reason does not work. Below I have included a code of my RadialMenuWidget. I have properly disposed the animation controller, extended the widget's state with SingleTickerProviderStateMixin. P.S I am running on an emulator and the rotation of the icon get's

Flutter Animation Not Working

纵饮孤独 提交于 2020-08-25 01:53:10
问题 I am trying to make a radial menu in Flutter and want my menu button to have a rotation animation every time pressed. I followed TensorProgramming's tutorial on Youtube on The Basics of Animation in Flutter but my animation for some reason does not work. Below I have included a code of my RadialMenuWidget. I have properly disposed the animation controller, extended the widget's state with SingleTickerProviderStateMixin. P.S I am running on an emulator and the rotation of the icon get's

Flutter : how Allow content to overlap SliverAppBar?

独自空忆成欢 提交于 2020-08-24 09:16:39
问题 In android we are using app:behavior_overlapTop="64dp" to achieve this I want overlap content same like above GIF in flutter My code class DetailsPage extends StatefulWidget { @override _DetailsPage createState() => _DetailsPage(); } class _DetailsPage extends State<DetailsPage> { @override void initState() { super.initState(); SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); _scrollController = ScrollController(); _scrollController

Flutter : how Allow content to overlap SliverAppBar?

岁酱吖の 提交于 2020-08-24 09:16:29
问题 In android we are using app:behavior_overlapTop="64dp" to achieve this I want overlap content same like above GIF in flutter My code class DetailsPage extends StatefulWidget { @override _DetailsPage createState() => _DetailsPage(); } class _DetailsPage extends State<DetailsPage> { @override void initState() { super.initState(); SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); _scrollController = ScrollController(); _scrollController

Flutter AnimatedSize works in one direction only

那年仲夏 提交于 2020-08-04 05:22:31
问题 I have got following code from https://medium.com/flutter-community/flutter-working-with-animatedsize-35253ff8f16a it is using AnimatedSize, but animation works only while container is expanding and not while is it shirking. is this the default behavior? I want to animated while both expanding and shriking. import 'package:flutter/material.dart'; void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp(

How to get data from api every x seconds in flutter?

纵饮孤独 提交于 2020-07-20 09:57:09
问题 I want to fetch data from api every x seconds to display data as live in widget and I also want to animate widget when data is change.I tried with Stream and Stream Builder.Which is the best way to fetch data as live.Please help me. Here is my code. class Post{ final String title; Post({this.title}); factory Post.fromJson(Map<String, dynamic> json) { return Post( no: json['title'] ); } } class PostData { static String _url="https://jsonplaceholder.typicode.com/posts/1"; static Future browse (