How to display iOS/cupertino alert dialog in Android using Flutter?

后端 未结 4 2206
野性不改
野性不改 2021-01-04 13:18

I was trying to display a iOS themed dialog box in my Flutter app, but I was unable to find anything in the docs

4条回答
  •  一整个雨季
    2021-01-04 13:50

    I used CupertinoAlertDialog inside the ShowDialog, you can find the same below

    showDialog(
          context: context,
          builder: (BuildContext context) => CupertinoAlertDialog(
            title: new Text("Dialog Title"),
            content: new Text("This is my content"),
            actions: [
              CupertinoDialogAction(
                isDefaultAction: true,
                child: Text(StringConstants.BIOMETRICAUTHORIZED),
              ),
              CupertinoDialogAction(
                child: Text("No"),
              )
            ],
          )
        );
    

提交回复
热议问题