master
王亚玲 2 years ago
parent e9a50f1496
commit 4884014ddf

@ -195,7 +195,7 @@ class UserProvider extends ChangeNotifier {
var base = await apiClient.request(API.exclude.find);
if (base.code == 0) {
await prefs.remove('exclude');
await prefs.setStringList('exclude', base.data ?? [] as List<String>);
await prefs.setStringList('exclude', base.data ?? []);
service.invoke("stopService");
if (prefs.getBool('kg') ?? false) {
Future.delayed(const Duration(seconds: 1), () async {

@ -77,6 +77,7 @@ class _TextMePageState extends State<TextMePage> {
}, "请输入短信内容...", _controller),
32.hb,
_getBox('收信号码', "通讯录中选择", () {
_phoneController.text="";
Get.to(() => AddressBook(
number: (List<String> content) {
for (int i = 0; i < content.length; i++) {
@ -113,7 +114,7 @@ class _TextMePageState extends State<TextMePage> {
// Telephony.sendSms(to: phoneNum!, message: idle);
}
}else{
CloudToast.show("");
CloudToast.show("您还未开通会员");
}
},
border: _controller.text.isEmpty ||

@ -36,7 +36,10 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
// initXUpdate();
//
WidgetsBinding.instance.addObserver(this);
_listenForPermissionStatus();
Future.delayed(const Duration(milliseconds: 500),(){
_listenForPermissionStatus();
});
setState(() {});
}
@ -53,7 +56,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
callLog = await Permission.callLog.request().isGranted;
addressBook = await Permission.contacts.request().isGranted;
kg = await service.isRunning();
setState(() {});
// setState(() {});
}
getUpdate() async {
@ -71,7 +74,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
context: context,
builder: (context) {
return AlertDialog(
title: Text("版本更新"),
title: const Text("版本更新"),
content: Text(res.modifyContent),
actions: [
_getBox('跳转官网下载', () async {

@ -1,5 +1,4 @@
import 'dart:async';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
@ -10,14 +9,10 @@ import 'package:project_telephony/ui/login/login_psd_page.dart';
import 'package:project_telephony/ui/user/set_password_page.dart';
import 'package:project_telephony/ui/widget/plone_back_button.dart';
import 'package:project_telephony/utils/headers.dart';
import 'package:provider/provider.dart';
import '../../base/base_style.dart';
import '../../constants/api.dart';
import '../../constants/environment/environment.dart';
import '../../model/network/api_client.dart';
import '../../model/network/base_model.dart';
import '../../providers/user_provider.dart';
import '../../utils/toast/cloud_toast.dart';
import '../../utils/user_tool.dart';
import '../tab_navigator.dart';

@ -31,7 +31,7 @@ class _TabNavigatorState extends State<TabNavigator>
// await HiveStore.init();
// });
// , const TextMePage()
_pages = [const HomePage() ,const UserPage()];
_pages = [const HomePage() , const TextMePage(),const UserPage()];
_tabController = TabController(
length: _pages.length, vsync: this, initialIndex: widget.index ?? 0);
}
@ -59,8 +59,8 @@ class _TabNavigatorState extends State<TabNavigator>
List<BottomNavigationBarItem> _bottomNav = <BottomNavigationBarItem>[
_buildBottomBar("首页", Assets.icons.homeNoSelected.path,
Assets.icons.homeSelected.path),
// _buildBottomBar("群发", Assets.icons.nomass.path,
// Assets.icons.mass.path),
_buildBottomBar("群发", Assets.icons.nomass.path,
Assets.icons.mass.path),
_buildBottomBar(
"我的", Assets.icons.myNoselected.path, Assets.icons.mySelected.path)
];

Loading…
Cancel
Save