remove sh*t popup

hmxc
小赖 4 years ago
parent a024b34a4f
commit c612dc46f1

@ -0,0 +1,25 @@
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/material.dart';
class AlarmDetailPage extends StatelessWidget {
const AlarmDetailPage({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '功能说明',
body: ListView(
padding: EdgeInsets.all(32.w),
children: [
'一键报警'.text.size(32.sp).bold.make(),
20.hb,
'点击“呼叫110”后您可以直接拨打本地110。页面中提供了您当前所在位置以便您与警方沟通。GPS信号弱时位置可能存在偏移'
.text
.size(28.sp)
.make(),
],
),
);
}
}

@ -1,18 +1,18 @@
// Flutter imports:
import 'package:akuCommunity/pages/one_alarm/alarm_detail_page.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:amap_location_fluttify/amap_location_fluttify.dart';
import 'package:amap_map_fluttify/amap_map_fluttify.dart';
import 'package:flutter_beautiful_popup/main.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:akuCommunity/pages/one_alarm/widget/explain_template.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
@ -41,41 +41,6 @@ class _AlarmPageState extends State<AlarmPage> {
AmapController _amapController;
Location _location;
void showExplain(BuildContext context) {
final popup = BeautifulPopup.customize(
context: context,
build: (options) => ExplainTemplate(options),
);
popup.show(
title: Text(
'功能说明',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 32.sp,
color: Color(0xff15c0ec),
),
),
content: Text(
'点击“呼叫110”后,您可以直接拨打本地110。页面中提供了您当前所在位置,以便您与警方沟通。(GPS信号弱时位置可能存在偏移)',
style: TextStyle(
fontSize: 28.sp,
color: Color(0xff666666),
),
),
actions: [
MaterialButton(
color: Color(0xff15c0ec),
textColor: Colors.white,
shape: RoundedRectangleBorder(
side: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(50))),
child: Text('关闭'),
onPressed: Navigator.of(context).pop,
)
],
close: SizedBox());
}
@override
void initState() {
super.initState();
@ -96,15 +61,9 @@ class _AlarmPageState extends State<AlarmPage> {
return BeeScaffold(
title: '一键报警',
actions: [
InkWell(
onTap: () {
showExplain(context);
},
child: Container(
padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w),
child: '全部已读'.text.black.size(28.sp).make(),
alignment: Alignment.center,
),
MaterialButton(
onPressed: () => Get.to(AlarmDetailPage()),
child: '功能说明'.text.black.size(28.sp).make(),
)
],
body: Stack(

@ -1,93 +0,0 @@
// Dart imports:
import 'dart:ui';
// Flutter imports:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_beautiful_popup/main.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
// Project imports:
import 'package:akuCommunity/utils/headers.dart';
class ExplainTemplate extends BeautifulPopupTemplate {
final BeautifulPopup options;
ExplainTemplate(this.options) : super(options);
@override
final illustrationPath = 'img/bg/authentication.png';
@override
Color get primaryColor => options.primaryColor ?? Color(0xff15c0ec);
@override
final maxWidth = 400.w;
@override
final maxHeight = 617.w;
@override
final bodyMargin = 0;
@override
get layout {
return [
Positioned(
child: background,
),
Positioned(
top: percentH(32),
child: title,
),
Positioned(
top: percentH(42),
left: percentW(10),
right: percentW(10),
height: percentH(actions == null ? 52 : 38),
child: content,
),
Positioned(
bottom: percentW(8),
left: percentW(8),
right: percentW(8),
child: actions ?? Container(),
),
];
}
}
// class Explain extends StatelessWidget {
// const Explain({Key key}) : super(key: key);
// @override
// Widget build(BuildContext context) {
// return Container(
// color: Colors.white,
// padding: EdgeInsets.only(
// top: 32.w,
// left: 32.w,
// right: 32.w,
// ),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// '一键报警',
// style: TextStyle(
// fontSize: BaseStyle.fontSize32,
// color: ktextPrimary,
// fontWeight: FontWeight.bold,
// ),
// ),
// Container(
// margin: EdgeInsets.only(top: 20.w),
// child: Text(
// '点击“呼叫110”后您可以直接拨打本地110。页面中提供了您当前所在位置以便您与警方沟通。GPS信号弱时位置可能存在偏移',
// style: TextStyle(
// fontSize: BaseStyle.fontSize28,
// color: ktextSubColor,
// ),
// ),
// ),
// ],
// ),
// );
// }
// }

@ -328,13 +328,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.1"
flutter_beautiful_popup:
dependency: "direct main"
description:
name: flutter_beautiful_popup
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.5.0"
flutter_blurhash:
dependency: transitive
description:

@ -44,8 +44,6 @@ dependencies:
fluro: ^1.6.3
#滑动卡片
font_awesome_flutter: ^8.8.1
#弹窗
flutter_beautiful_popup: ^1.5.0
#图片预览
photo_view: ^0.10.2
#图片缓存

Loading…
Cancel
Save