📜  获取对话框颤动 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:43.259000             🧑  作者: Mango

代码示例2
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,
          ),
        ]);
  }