update
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||
import 'package:chat/configs/app_colors.dart';
|
||||
import 'package:chat/providers/public_provider.dart';
|
||||
import 'package:chat/routes/user_routes.dart';
|
||||
import 'package:chat/services/auth_service.dart';
|
||||
import 'package:chat/views/home/widgets/action_button.dart';
|
||||
import 'package:chat/views/home/widgets/action_item.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
|
||||
class UserSettingPage extends StatefulWidget {
|
||||
const UserSettingPage({Key? key}) : super(key: key);
|
||||
@@ -15,6 +17,18 @@ class UserSettingPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _UserSettingPageState extends State<UserSettingPage> {
|
||||
PackageInfo? packageInfo;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
PackageInfo.fromPlatform().then((value) {
|
||||
setState(() {
|
||||
packageInfo = value;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -63,10 +77,12 @@ class _UserSettingPageState extends State<UserSettingPage> {
|
||||
const SizedBox(height: 8),
|
||||
ActionItem(
|
||||
'版本更新',
|
||||
extend: '1.0.0',
|
||||
extend: packageInfo?.version,
|
||||
isFirst: true,
|
||||
isLast: true,
|
||||
onTap: () {},
|
||||
onTap: () async {
|
||||
PublicProvider.checkUpgrade(packageInfo);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
ActionButton(
|
||||
|
||||
Reference in New Issue
Block a user