page
This commit is contained in:
19
lib/providers/public_provider.dart
Normal file
19
lib/providers/public_provider.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:chat/utils/network/http.dart';
|
||||
import 'package:chat/utils/ui_tools.dart';
|
||||
|
||||
class PublicProvider {
|
||||
/// 检测更新
|
||||
static Future checkUpgrade() async {
|
||||
try {
|
||||
return await Http.get(
|
||||
'version/check',
|
||||
params: {
|
||||
'version': '',
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
UiTools.toast(e.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,21 @@ class UserProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
static Future updateMobile(String mobile) async {}
|
||||
|
||||
static Future updateEmail(String email) async {}
|
||||
static Future updateMobile(String mobile) async {
|
||||
try {
|
||||
return await Http.post('user/mobile');
|
||||
} catch (e) {
|
||||
UiTools.toast(e.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static Future updateEmail(String email) async {
|
||||
try {
|
||||
return await Http.post('user/email');
|
||||
} catch (e) {
|
||||
UiTools.toast(e.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ class _UserSettingPageState extends State<UserSettingPage> {
|
||||
const SizedBox(height: 8),
|
||||
ActionItem(
|
||||
'版本更新',
|
||||
extend: '1.0.0',
|
||||
isFirst: true,
|
||||
isLast: true,
|
||||
onTap: () {},
|
||||
|
||||
@@ -49,7 +49,7 @@ class _UserSettingSafePageState extends State<UserSettingSafePage> {
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
ActionItem(
|
||||
'开启两部验证',
|
||||
'开启两步验证',
|
||||
extend: (_.userInfo.value.google2fa ?? false) ? '已开启' : '未开启',
|
||||
isFirst: true,
|
||||
isLast: true,
|
||||
|
||||
@@ -9,7 +9,9 @@ class UserSettingSafeMobilePage extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: const Text('绑定手机'),
|
||||
),
|
||||
body: Container(),
|
||||
body: Column(
|
||||
children: const [],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
32
pubspec.lock
32
pubspec.lock
@@ -28,7 +28,7 @@ packages:
|
||||
name: asn1lib
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.2.2"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -128,7 +128,7 @@ packages:
|
||||
name: camera_platform_interface
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.2.2"
|
||||
version: "2.3.0"
|
||||
camera_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -213,13 +213,6 @@ packages:
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
device_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: device_info_plus
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.0.1"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -444,21 +437,21 @@ packages:
|
||||
name: image_cropper
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.0.1"
|
||||
image_cropper_for_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image_cropper_for_web
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.0.3"
|
||||
image_cropper_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image_cropper_platform_interface
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
version: "3.0.3"
|
||||
intersperse:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -564,13 +557,6 @@ packages:
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
package_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info_plus
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.0.1"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -591,7 +577,7 @@ packages:
|
||||
name: path_provider_android
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.20"
|
||||
version: "2.0.21"
|
||||
path_provider_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -813,7 +799,7 @@ packages:
|
||||
name: sqflite_common
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
version: "2.4.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -855,14 +841,14 @@ packages:
|
||||
name: tencent_im_sdk_plugin
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.1.9"
|
||||
version: "4.2.0"
|
||||
tencent_im_sdk_plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: tencent_im_sdk_plugin_platform_interface
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.3.5"
|
||||
version: "0.3.6"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -16,8 +16,6 @@ dependencies:
|
||||
lpinyin: ^2.0.3
|
||||
vibration: ^1.7.6
|
||||
scan: ^1.6.0
|
||||
package_info_plus: ^0.0.1
|
||||
device_info_plus: ^0.0.1
|
||||
flutter_easyrefresh: ^2.2.2
|
||||
cached_network_image: ^3.2.0
|
||||
flutter_spinkit: ^5.1.0
|
||||
|
||||
Reference in New Issue
Block a user