Answers for "flutter show dialog in futurebuilder future"

4

showdialog with builder flutter

showDialog(
        context: context,
        builder: (BuildContext context) => new AlertDialog(
          title: new Text('Warning'),
          content: new Text('Hi this is Flutter Alert Dialog'),
          actions: <Widget>[
            new IconButton(
                icon: new Icon(Icons.close),
                onPressed: () {
                  Navigator.pop(context);
                })
          ],
        ));
Posted by: Guest on November-02-2020
0

get dialog flutter

static void showDialog({
    required String title,
    required int messageCode,
    required String content,
  }) {
    Get.defaultDialog(
        title: title + " #" + messageCode.toString(),
        titleStyle: FontConstants.SFProDisplayBold(fontSize: 24,color: Colors.black),
        content: Padding(
          padding: EdgeInsets.symmetric(horizontal: 10),
          child: Text(
            content,
            style: FontConstants.SFProDisplayLight(fontSize: 20, color: Colors.black),
          ),
        ),
        barrierDismissible: true,
        radius: 5,
        actions: [
          RaisedButton(
            onPressed: () {
              Get.back();
            },
            child: Text(
              'okay'.tr,
              style:
              FontConstants.SFProDisplayLight(fontSize: 22, color: ColorConstants.blueBold),
            ),
            color: Colors.white,
          ),
        ]);
  }
Posted by: Guest on January-10-2022

Code answers related to "flutter show dialog in futurebuilder future"

Code answers related to "Dart"

Browse Popular Code Answers by Language