A flexible widget for user notification. Customize your text, button, duration, animations and much more. For Android devs, it is made to replace Snackbars and Toasts.
I'm having a flushbar with blockBackgroundInteraction: true and isDismissible: true
tapping on the background dismisses the flushbar (as Indented)
other gestures, like starting a swipe etc, don't dismiss the flushbar (would be nice, to have the option)
How to reproduce:
Build the following App
Push the PLUS
Swipe the screen (nothing happens)
Tap the screen
flushbar closes
import 'package:flutter/material.dart';
import 'package:another_flushbar/flushbar.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'Hello flushbar:',
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: () async {
await Flushbar(
title: 'Hey Ninja',
message:
'Lorem Ipsum is simply dummy text of the printing and typesetting industry',
duration: Duration(seconds: 3),
blockBackgroundInteraction: true,
).show(context);
},
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
The issue is the following:
I'm having a flushbar with blockBackgroundInteraction: true and isDismissible: true tapping on the background dismisses the flushbar (as Indented) other gestures, like starting a swipe etc, don't dismiss the flushbar (would be nice, to have the option)
How to reproduce: