You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.2 KiB

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
3 years ago
import 'package:flutter_screenutil/flutter_screenutil.dart';
3 years ago
import 'package:get/get.dart';
import 'package:aku_community/extensions/num_ext.dart';
3 years ago
import 'package:aku_community/pages/tab_navigator.dart';
import 'package:aku_community/utils/developer_util.dart';
class FireDialog {
static fireAlarm(String content) async {
await Get.dialog(
CupertinoAlertDialog(
title: Text('发生火灾'),
content: Column(
children: [
Text(content),
10.hb,
Icon(
CupertinoIcons.bell_fill,
color: Colors.red,
size: 48.w,
),
],
),
actions: [
CupertinoDialogAction(
child: Text('确认'),
onPressed: () => Get.back(),
),
if (DeveloperUtil.dev)
CupertinoDialogAction(
child: Text('清除所有弹窗'),
onPressed: () => Get.offAll(
() => TabNavigator(),
),
),
],
),
barrierDismissible: false,
);
}
}