瀏覽代碼

更新弹窗

tags/0.0.2+7
Weller 4 年之前
父節點
當前提交
7ad1c05bdb
共有 3 個文件被更改,包括 61 次插入6 次删除
  1. +1
    -1
      .dart_tool/package_config.json
  2. +52
    -3
      lib/dialog/global_dialog/notification_setting_dialog/notification_setting_dialog.dart
  3. +8
    -2
      lib/pages/home_page/home_page.dart

+ 1
- 1
.dart_tool/package_config.json 查看文件

@@ -650,7 +650,7 @@
"languageVersion": "2.8"
}
],
"generated": "2020-11-16T03:42:31.306535Z",
"generated": "2020-11-16T05:49:00.255241Z",
"generator": "pub",
"generatorVersion": "2.8.2"
}

+ 52
- 3
lib/dialog/global_dialog/notification_setting_dialog/notification_setting_dialog.dart 查看文件

@@ -1,3 +1,5 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class NotificationSettingDialog extends StatefulWidget {
@@ -23,9 +25,56 @@ class _NotificationSettingDialogContainerState
extends State<_NotificationSettingDialogContainer> {
@override
Widget build(BuildContext context) {
return Center(
child: Container(
width: 280,
return Scaffold(
backgroundColor: Colors.transparent,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(
width: 280,
// height: 382,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
),
child: Column(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10)),
child: CachedNetworkImage(
imageUrl:
'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1456601714,1347673110&fm=26&gp=0.jpg',
),
),
Text('开启推送通知'),
],
),
),
GestureDetector(
child: Container(
width: 30,
height: 30,
margin: EdgeInsets.only(top: 10),
decoration: BoxDecoration(
color: Color(0x70606060),
borderRadius: BorderRadius.circular(15),
),
child: Center(
child: Icon(
Icons.close,
color: Colors.white,
),
),
),
onTap: () {
Navigator.pop(context);
},
)
],
),
);
}


+ 8
- 2
lib/pages/home_page/home_page.dart 查看文件

@@ -4,11 +4,12 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/notification_setting_dialog/notification_setting_dialog.dart';
import 'package:zhiying_base_widget/utils/contants.dart';
import 'package:zhiying_comm/models/base/base_tab_model.dart';
import 'package:zhiying_comm/util/image_util.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:zhiying_comm/util/update/app_update_util.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class HomePage extends StatefulWidget {
HomePage({Key key}) : super(key: key);
@@ -40,7 +41,10 @@ class _HomePageState extends State<HomePage> {
super.initState();
}


@override
void didChangeDependencies() {
super.didChangeDependencies();
}

@override
Widget build(BuildContext context) {
@@ -126,6 +130,8 @@ class _HomePageState extends State<HomePage> {
}

Future<bool> _checkLimit(BaseTabModel model) async {
showCupertinoDialog(
context: context, builder: (_) => NotificationSettingDialog());
if (model.requiredLogin == '1') {
UserInfoModel user =
await Provider.of<UserInfoNotifier>(context, listen: false)


Loading…
取消
儲存