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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future updateMobile(String mobile) 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 {}
|
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),
|
const SizedBox(height: 8),
|
||||||
ActionItem(
|
ActionItem(
|
||||||
'版本更新',
|
'版本更新',
|
||||||
|
extend: '1.0.0',
|
||||||
isFirst: true,
|
isFirst: true,
|
||||||
isLast: true,
|
isLast: true,
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class _UserSettingSafePageState extends State<UserSettingSafePage> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
ActionItem(
|
ActionItem(
|
||||||
'开启两部验证',
|
'开启两步验证',
|
||||||
extend: (_.userInfo.value.google2fa ?? false) ? '已开启' : '未开启',
|
extend: (_.userInfo.value.google2fa ?? false) ? '已开启' : '未开启',
|
||||||
isFirst: true,
|
isFirst: true,
|
||||||
isLast: true,
|
isLast: true,
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ class UserSettingSafeMobilePage extends StatelessWidget {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('绑定手机'),
|
title: const Text('绑定手机'),
|
||||||
),
|
),
|
||||||
body: Container(),
|
body: Column(
|
||||||
|
children: const [],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
32
pubspec.lock
32
pubspec.lock
@@ -28,7 +28,7 @@ packages:
|
|||||||
name: asn1lib
|
name: asn1lib
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.2"
|
||||||
async:
|
async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -128,7 +128,7 @@ packages:
|
|||||||
name: camera_platform_interface
|
name: camera_platform_interface
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.2"
|
version: "2.3.0"
|
||||||
camera_web:
|
camera_web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -213,13 +213,6 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
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:
|
dio:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -444,21 +437,21 @@ packages:
|
|||||||
name: image_cropper
|
name: image_cropper
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0"
|
version: "3.0.1"
|
||||||
image_cropper_for_web:
|
image_cropper_for_web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: image_cropper_for_web
|
name: image_cropper_for_web
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "1.0.3"
|
||||||
image_cropper_platform_interface:
|
image_cropper_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: image_cropper_platform_interface
|
name: image_cropper_platform_interface
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.2"
|
version: "3.0.3"
|
||||||
intersperse:
|
intersperse:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -564,13 +557,6 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.1"
|
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:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -591,7 +577,7 @@ packages:
|
|||||||
name: path_provider_android
|
name: path_provider_android
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.20"
|
version: "2.0.21"
|
||||||
path_provider_ios:
|
path_provider_ios:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -813,7 +799,7 @@ packages:
|
|||||||
name: sqflite_common
|
name: sqflite_common
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.0"
|
version: "2.4.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -855,14 +841,14 @@ packages:
|
|||||||
name: tencent_im_sdk_plugin
|
name: tencent_im_sdk_plugin
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.9"
|
version: "4.2.0"
|
||||||
tencent_im_sdk_plugin_platform_interface:
|
tencent_im_sdk_plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: tencent_im_sdk_plugin_platform_interface
|
name: tencent_im_sdk_plugin_platform_interface
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.5"
|
version: "0.3.6"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -16,8 +16,6 @@ dependencies:
|
|||||||
lpinyin: ^2.0.3
|
lpinyin: ^2.0.3
|
||||||
vibration: ^1.7.6
|
vibration: ^1.7.6
|
||||||
scan: ^1.6.0
|
scan: ^1.6.0
|
||||||
package_info_plus: ^0.0.1
|
|
||||||
device_info_plus: ^0.0.1
|
|
||||||
flutter_easyrefresh: ^2.2.2
|
flutter_easyrefresh: ^2.2.2
|
||||||
cached_network_image: ^3.2.0
|
cached_network_image: ^3.2.0
|
||||||
flutter_spinkit: ^5.1.0
|
flutter_spinkit: ^5.1.0
|
||||||
|
|||||||
Reference in New Issue
Block a user