Questions tagged [dismissible]

46 questions
7
votes
2 answers

How to get Dismissable dragged amount before it's dismissed - Flutter

The Dismissible widget in Flutter gives you an onDismissed: (direction) {....} to tell you the direction it was dragged after it has been dismissed. How can I get the direction (or delta) the widget is currently being dragged? I tried wrapping it…
MSpeed
  • 8,153
  • 7
  • 49
  • 61
5
votes
1 answer

Flutter Dismissible Unique Keys

I have a list of Dismissible widgets as follows: Dismissible( direction: DismissDirection.endToStart, key: Key(widget.data[i]), onDismissed: (direction) { widget.onRemoveRequest(i, widget.data[i]); …
Josh Kahane
  • 16,765
  • 45
  • 140
  • 253
4
votes
2 answers

Dismissible and FutureBuilder do not work together

It is kind of a complex problem but I'll do my best to explain it. My project utilizes a sqflite database. This particular page returns a list of Dismissible widgets according to the data in the database. This is how I read the data: class…
mominbay
  • 51
  • 4
4
votes
1 answer

Dismissible confirmDismiss in combination with new route navigation causes Flutter crash

The context: I stumbled upon a minor crash while testing a ListView of Dismissibles in Flutter. When swiping a dismissible, a Dialog is shown using the confirmDismiss option, for confirmation. This all works well, however the UI crashes when testing…
Sven
  • 3,204
  • 1
  • 20
  • 28
2
votes
0 answers

I want to run haptic feedback when sliding with flutter slidable

I want to execute haptic feedback at the start of a slide, not onTap or onDismissible. The method of using a listener to execute the feedback is implemented, but this sometimes results in a timing error in the haptic feedback. onPointerDown:…
F.R
  • 21
  • 1
2
votes
1 answer

How to make bootstrap 4 dismissible alert close permanently

I have a MediaWiki site, and literally all I want to do is make a bootstrap 4 alert visible for any new visitors on certain pages, but stay permanently gone when it is dismissed. The alert would be transcluded to multiple pages, but if dismissed…
Clarice
  • 21
  • 2
2
votes
1 answer

Flutter: Can I use Ink in Dismissible?

I'm using Ink widget with decoration to allow ink splashes above images and colored background. After I wrapped it inside Dismissible, I got a wierd effect: When I swipe the widget, it's content moves as expected but the decoration stucks in it's…
e79ene
  • 1,639
  • 2
  • 11
  • 8
2
votes
2 answers

Flutter - Using Dismissible on a PageView creates an ugly animation

with the following example code, is get a very ugly animation. I would even say, it's no animation at all. The next Page will just appear after the setstate is called. How can I create a smooth delete animation using PageView? If it is not possible…
mincer
  • 21
  • 1
  • 2
2
votes
3 answers

Flutter: Dismissable with Card and Margin

I'm building a simple listView in Flutter where the "cells" are simple Cards with a set margin. When dismissing these cards, the "margin" covers the dismissible-background resulting in ugly designs. I've created a sample-app to showcase this…
Ma1
  • 232
  • 3
  • 10
2
votes
1 answer

flutter Dismissible widget variable dependency

Edit: Fixed it.. Look down Old problem: I am experimenting with the Dismissible widget. I can successfully monitor the state of the direction, which is stored in directionVar. It outputs something like DismissDirection.endToStart I want to use this…
aze45sq6d
  • 876
  • 3
  • 11
  • 26
2
votes
0 answers

Dismissible Widget in ListView does not animate smoothly

I'm using a dismissible widget in a List view for swipe to delete. Here is my code for the dismissible Item: new Dismissible( key: new Key(visitor.id.toString()), onDismissed: (direction) { Visitor removedVisitor; …
Koushik Ravikumar
  • 664
  • 11
  • 26
2
votes
1 answer

Save dismissible state

How do I save the state of a dismissible? When the item is dismissed it stays dismissed upon closing and opening the app? I'm relatively new to flutter and checked out saved preferences plugin but couldn't get it to work.
Tom O'Sullivan
  • 3,416
  • 5
  • 15
  • 27
1
vote
0 answers

How to change dismissible boolean of modalBottomSheet in flutter after its displayed

I am showing a bottomsheet in flutter by default the isDismissible = false dismissible is set to false but based on certain conditions i want to change this to true i have tried passing a bool to showModalBottomSheet method and changing its value…
Android
  • 1,085
  • 4
  • 13
  • 28
1
vote
1 answer

Assign a [] array as the child parameter to a Dismissible() object

I've been trying to make a content group (image + text) Dismissible as a single unit (swipe-to-delete/remove), but seems as though I can't assign a Widget list as the child parameter to a Dismissible() object. Looking for possible work-arounds or a…
1
vote
1 answer

Flutter Slidable SlidableAction Calling onPressed even when it has not been pressed

I am using a library called flutter_slidable . Below is my fetchItems method static Future> fetchItems(String url) async { try { // pub spec yaml http: // import 'package:http/http.dart' as http; final response =…
Emmanuel Njorodongo
  • 1,004
  • 17
  • 35
1
2 3 4