Answers for "flutter modal"

10

flutter button

FlatButton(
              color: Colors.red,
              splashColor: Colors.black12,
              onPressed: (){
              },
              child: Text(
                "Nouvelle Texte"
              ),
            ),
Posted by: Guest on April-14-2020
0

Modal sheet in Flutter

Widget build(BuildContext context) {
  return Center(
    child: ElevatedButton(
      child: const Text('showModalBottomSheet'),
      onPressed: () {
        showModalBottomSheet<void>(
          context: context,
          builder: (BuildContext context) {
            return Container(
              height: 200,
              color: Colors.amber,
              child: Center(
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  mainAxisSize: MainAxisSize.min,
                  children: <Widget>[
                    const Text('Modal BottomSheet'),
                    ElevatedButton(
                      child: const Text('Close BottomSheet'),
                      onPressed: () => Navigator.pop(context),
                    )
                  ],
                ),
              ),
            );
          },
        );
      },
    ),
  );
}
Posted by: Guest on July-10-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language