-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question]: How to make a dialog swipeable? #21
Comments
Hello @Apollo108. import 'package:flutter/material.dart';
import 'package:flutter_easy_dialogs/flutter_easy_dialogs.dart';
void main() => runApp(const MainApp());
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
builder: FlutterEasyDialogs.builder(),
home: Scaffold(
body: const Center(
child: Text('Hello World!'),
),
floatingActionButton: FloatingActionButton(
onPressed: () => Container(
color: Colors.red,
height: 200,
width: double.infinity,
)
.positioned(autoHideDuration: const Duration(seconds: 3))
.swipe()
.slideHorizontal()
.show(),
),
),
);
}
} Try this |
Also I need the |
Also, I noticed strange behavior for top-positioned dialogs - I have to add direction: position == EasyDialogPosition.top ? VerticalSlideDirection.down : VerticalSlideDirection.up, otherwise it will be sliding from the bottom (by default) during the appearance and hiding, and it looks weird. For bottom-positioned - it's fine |
You have full control over your dialogs, that's it. If you want the dialog slide from bot to top or vice versa then you should provide relevant parameters. There's no dependency on dialog's position. As you could apply |
Thank you for the awesome package and rapid response! |
You are welcome |
What is your question?
I'm trying to make a snackbar with 3 sec auto hide, + I need it to be able to swipe it away at any time. Didn't find a way to do this, please, help.
Code of Conduct
The text was updated successfully, but these errors were encountered: