@@ -650,7 +650,7 @@ | |||||
"languageVersion": "2.8" | "languageVersion": "2.8" | ||||
} | } | ||||
], | ], | ||||
"generated": "2020-11-16T03:42:31.306535Z", | |||||
"generated": "2020-11-16T05:49:00.255241Z", | |||||
"generator": "pub", | "generator": "pub", | ||||
"generatorVersion": "2.8.2" | "generatorVersion": "2.8.2" | ||||
} | } |
@@ -1,3 +1,5 @@ | |||||
import 'package:cached_network_image/cached_network_image.dart'; | |||||
import 'package:flutter/cupertino.dart'; | |||||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
class NotificationSettingDialog extends StatefulWidget { | class NotificationSettingDialog extends StatefulWidget { | ||||
@@ -23,9 +25,56 @@ class _NotificationSettingDialogContainerState | |||||
extends State<_NotificationSettingDialogContainer> { | extends State<_NotificationSettingDialogContainer> { | ||||
@override | @override | ||||
Widget build(BuildContext context) { | 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); | |||||
}, | |||||
) | |||||
], | |||||
), | ), | ||||
); | ); | ||||
} | } | ||||
@@ -4,11 +4,12 @@ import 'package:cached_network_image/cached_network_image.dart'; | |||||
import 'package:flutter/cupertino.dart'; | import 'package:flutter/cupertino.dart'; | ||||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
import 'package:provider/provider.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_base_widget/utils/contants.dart'; | ||||
import 'package:zhiying_comm/models/base/base_tab_model.dart'; | import 'package:zhiying_comm/models/base/base_tab_model.dart'; | ||||
import 'package:zhiying_comm/util/image_util.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/util/update/app_update_util.dart'; | ||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class HomePage extends StatefulWidget { | class HomePage extends StatefulWidget { | ||||
HomePage({Key key}) : super(key: key); | HomePage({Key key}) : super(key: key); | ||||
@@ -40,7 +41,10 @@ class _HomePageState extends State<HomePage> { | |||||
super.initState(); | super.initState(); | ||||
} | } | ||||
@override | |||||
void didChangeDependencies() { | |||||
super.didChangeDependencies(); | |||||
} | |||||
@override | @override | ||||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
@@ -126,6 +130,8 @@ class _HomePageState extends State<HomePage> { | |||||
} | } | ||||
Future<bool> _checkLimit(BaseTabModel model) async { | Future<bool> _checkLimit(BaseTabModel model) async { | ||||
showCupertinoDialog( | |||||
context: context, builder: (_) => NotificationSettingDialog()); | |||||
if (model.requiredLogin == '1') { | if (model.requiredLogin == '1') { | ||||
UserInfoModel user = | UserInfoModel user = | ||||
await Provider.of<UserInfoNotifier>(context, listen: false) | await Provider.of<UserInfoNotifier>(context, listen: false) | ||||