Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

Modal overlay in flutter

await showGeneralDialog(
  context: context,
  pageBuilder: (BuildContext buildContext,
      Animation<double> animation,
      Animation<double> secondaryAnimation) {
    return SafeArea(
      child: Builder(builder: (context) {
        return Material(
            color: Colors.transparent,
            child: Align(
                alignment: Alignment.center,
                child: Container(
                    height: 200.0,
                    width: 250.0,
                    color: Colors.white,
                    child:
                        Center(child: Text('Testing')))));
      }),
    );
  },
  barrierDismissible: true,
  barrierLabel: MaterialLocalizations.of(context)
      .modalBarrierDismissLabel,
  barrierColor: null,
  transitionDuration: const Duration(milliseconds: 150));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Modal #overlay #flutter
ADD COMMENT
Topic
Name
7+4 =