|
|
|
@ -4,6 +4,7 @@ import 'package:bot_toast/bot_toast.dart';
|
|
|
|
|
import 'package:flustars/flustars.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:project_telephony/base/base_style.dart';
|
|
|
|
|
import 'package:project_telephony/ui/tab_navigator.dart';
|
|
|
|
|
import 'package:project_telephony/ui/user/user_page.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:project_telephony/ui/widget/check_radio.dart';
|
|
|
|
@ -53,42 +54,6 @@ List payWay = [
|
|
|
|
|
|
|
|
|
|
class _MembersPageState extends State<MembersPage> {
|
|
|
|
|
int nowPrice=1;
|
|
|
|
|
// void initState() {
|
|
|
|
|
// super.initState();
|
|
|
|
|
// //页面初始化的时候,添加一个状态的监听者
|
|
|
|
|
// WidgetsBinding.instance.addObserver(this);
|
|
|
|
|
//
|
|
|
|
|
// setState(() {});
|
|
|
|
|
// }
|
|
|
|
|
// @override
|
|
|
|
|
// void dispose(){
|
|
|
|
|
// super.dispose();
|
|
|
|
|
// //页面销毁时移出监听者
|
|
|
|
|
// WidgetsBinding.instance.removeObserver(this);
|
|
|
|
|
// }
|
|
|
|
|
// @override
|
|
|
|
|
// void didChangeAppLifecycleState(AppLifecycleState state){
|
|
|
|
|
// super.didChangeAppLifecycleState(state);
|
|
|
|
|
// switch (state){
|
|
|
|
|
// //应用状态处于闲置状态,并且没有用户的输入事件,
|
|
|
|
|
// // 注意:这个状态切换到 前后台 会触发,所以流程应该是先冻结窗口,然后停止UI
|
|
|
|
|
// case AppLifecycleState.inactive:
|
|
|
|
|
// print(1);
|
|
|
|
|
// // print("应用处于闲置状态,这种状态的应用应该假设他们可能在任何时候暂停 切换到后台会触发======");
|
|
|
|
|
// break;
|
|
|
|
|
// case AppLifecycleState.resumed:
|
|
|
|
|
// print(2);
|
|
|
|
|
// // UserTool.userProvider.updateUserInfo();
|
|
|
|
|
// break;
|
|
|
|
|
// case AppLifecycleState.paused:
|
|
|
|
|
// print(3);
|
|
|
|
|
// // print("应用处于不可见状态 后台======");
|
|
|
|
|
// break;
|
|
|
|
|
// case AppLifecycleState.detached:
|
|
|
|
|
// // print("当前页面即将退出======");
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
@ -296,7 +261,7 @@ class _MembersPageState extends State<MembersPage> {
|
|
|
|
|
});
|
|
|
|
|
if (base.code == 0) {
|
|
|
|
|
await PayUtil().callAliPay(base.data);
|
|
|
|
|
Get.offAll(const UserPage());
|
|
|
|
|
Get.offAll(const TabNavigator(index: 1,));
|
|
|
|
|
} else {
|
|
|
|
|
CloudToast.show(base.msg);
|
|
|
|
|
}
|
|
|
|
@ -311,7 +276,7 @@ class _MembersPageState extends State<MembersPage> {
|
|
|
|
|
await PayUtil().callWxPay(
|
|
|
|
|
payModel: wxPayModel,
|
|
|
|
|
);
|
|
|
|
|
Get.offAll(const UserPage());
|
|
|
|
|
Get.offAll(const TabNavigator(index: 1,));
|
|
|
|
|
} else {
|
|
|
|
|
CloudToast.show(base.msg);
|
|
|
|
|
}
|
|
|
|
|