flutter-animation

How to swipe/drag 2 or more buttons in a grid of buttons using flutter

梦想与她 提交于 2019-12-03 12:53:55
I have made a grid of buttons using flutter but now I want to swipe through 2 or more buttons in a single drag such that all the buttons through which I am dragging gets selected. I have checked out some questions on the same and I was redirected to use gesture detector but that's not enough. I need certain properties or better a sample code such that I am able to work through it. an example of the dragable app is http://a5.mzstatic.com/us/r30/Purple60/v4/6f/00/35/6f0035d3-1bab-fcbb-cb13-8ab46cf3c44d/screen696x696.jpeg Rémi Rousselet You can manually hit test RenderBox and extract a specific

How to create a range slider with thumb as png image in flutter

三世轮回 提交于 2019-12-03 04:51:18
How to create smiley range slider in flutter. Like below GIF image. Discrete with Custom Theme I try to change thumb shape. But I want to change thumb as image. // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:math' as math; import 'package:flutter/material.dart'; class SliderDemo extends StatefulWidget { static const String routeName = '/material/slider'; @override _SliderDemoState createState() => new _SliderDemoState(); } Path _triangle(double size, Offset

Horizontally scrollable cards with Snap effect in flutter

痞子三分冷 提交于 2019-12-02 16:48:00
I want to create a list of cards scrolling horizontally with snap to fit effect when swiped either from left or right. Each card has some spacing between them and fit to screen similar to below image Apart from that these horizontally scrollable list elements should be contained inside a vertically scrollable list. I all I am able to achieve is only displaying a list of horizontal scrolling cards after following example in flutter docs. class SnapCarousel extends StatelessWidget { @override Widget build(BuildContext context) { final title = 'Horizontal List'; return MaterialApp( title: title,

What is the alternative to RecyclerView in Flutter?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 18:28:52
What is the alternative to Recycle view in flutter I have tried using this code but how to do Animination with listview widget in flutter Is this valid? ListView( children: <Widget>[ ListTile( leading: Icon(Icons.map), title: Text('Map'), ), ListTile( leading: Icon(Icons.photo_album), title: Text('Album'), ), ListTile( leading: Icon(Icons.phone), title: Text('Phone'), ), ], ); You can also use animatedlist widget for animations. code example are given in the following link. AnimatedList CaballeroF ListView : Usually this should be used with a small number of children as the List will also

flutter - App bar scrolling with overlapping content in Flexible space

爱⌒轻易说出口 提交于 2019-11-30 20:54:26
i am trying to recreate App bar scrolling with overlapping content in Flexible space using flutter. the behavior is demonstrated here: http://karthikraj.net/2016/12/24/scrolling-behavior-for-appbars-in-android/ I created collapsing AppBar using SliverAppBar already, using the code I pasted here, I am trying to create THIS i cant use Stack for it because i cant find any onScroll callback, so far i created appbar with flexibleSpace, the app bar collapse on scroll: Scaffold( body: NestedScrollView( headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) => <Widget>[ SliverAppBar(

flutter - App bar scrolling with overlapping content in Flexible space

大兔子大兔子 提交于 2019-11-30 17:00:10
问题 i am trying to recreate App bar scrolling with overlapping content in Flexible space using flutter. the behavior is demonstrated here: http://karthikraj.net/2016/12/24/scrolling-behavior-for-appbars-in-android/ I created collapsing AppBar using SliverAppBar already, using the code I pasted here, I am trying to create THIS i cant use Stack for it because i cant find any onScroll callback, so far i created appbar with flexibleSpace, the app bar collapse on scroll: Scaffold( body:

Flutter Transition Exit

我的未来我决定 提交于 2019-11-28 12:47:09
On Android API we can use overridePendingTransition(int enterAnim, int exitAnim) to define the enter and exit transitions. How to do it in Flutter? I have implemented this code class SlideLeftRoute extends PageRouteBuilder { final Widget enterWidget; SlideLeftRoute({this.enterWidget}) : super( pageBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation) { return enterWidget; }, transitionsBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child) { return SlideTransition( position: new Tween<Offset>

Flutter Sortable Drag And Drop ListView

好久不见. 提交于 2019-11-27 06:03:40
问题 So I'm starting to learn Flutter and would like to use a material design drag and drop list just like the one seen on the material guidelines website. https://storage.googleapis.com/spec-host-backup/mio-design%2Fassets%2F1dtprsH4jZ2nOnjBCJeJXd7n4U-jmWyas%2F03-list-reorder.mp4 All of the libraries I have tried out so far look like garbage compared to that. Is there a good library for this that I am missing or a native Flutter widget? 回答1: Check knopp/flutter_reorderable_list. It accomplishes