-2

I want to show a Custom dialoge box like this on pressing a button in flutter, is there is any package or widgets that can archive this?? something similar this

2 Answers 2

3

There is no package as such that you need to the best of my knowledge.

You'll have to make this a custom widget make sure the root of the widget is StatefulBuilder so that you can have your carousel work as desired.

And then simply call

showDialog(
    context: context,
    builder: (BuildContext context) => WidgetYouMade()
);
1

this is the best method for a widget like this (Custom dialog box)this will give you a good scale transition and you can set any widget as a custom dialog box.

showGeneralDialog(
    barrierColor: Colors.black.withOpacity(0.5),
    transitionBuilder: (context, a1, a2, widget) {
      return Transform.scale(
        scale: a1.value,
        //here inside opacity define your child instead projectdetails()
        child: Opacity(opacity: a1.value, child: ProjectDetails()),
      );
    },
    transitionDuration: Duration(milliseconds: 200),
    barrierDismissible: true,
    barrierLabel: '',
    context: context,
    pageBuilder: (context, animation1, animation2) {
    //return a emty container 
      return Container();

    });

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.