Commit 2fd34d99 by tanghuan

1.APP唤醒时,检测APP的版本号;2.设置界面增加打开下载界面的按钮。

1 parent bd06b441
...@@ -6,6 +6,7 @@ import 'package:appframe/config/env_config.dart'; ...@@ -6,6 +6,7 @@ import 'package:appframe/config/env_config.dart';
import 'package:appframe/config/routes.dart'; import 'package:appframe/config/routes.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:url_launcher/url_launcher.dart';
class SettingPage extends StatelessWidget { class SettingPage extends StatelessWidget {
const SettingPage({super.key}); const SettingPage({super.key});
...@@ -158,6 +159,31 @@ class SettingPage extends StatelessWidget { ...@@ -158,6 +159,31 @@ class SettingPage extends StatelessWidget {
), ),
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
Card(
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 2),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
child: Column(
children: [
ListTile(
leading: const Icon(Icons.download, size: 20),
title: const Text('下载与更新', style: TextStyle(fontSize: 14)),
onTap: () async {
final uri = Uri.parse('https://www.banxe.cn/apps/pro.html');
if (await canLaunchUrl(uri)) {
await launchUrl(uri, mode: LaunchMode.externalApplication);
}
},
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
trailing: const Icon(Icons.arrow_forward_ios, size: 14),
dense: true,
visualDensity: VisualDensity.compact,
),
],
),
),
const SizedBox(height: 8),
...customerService, ...customerService,
Card( Card(
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 2), margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 2),
......
...@@ -148,6 +148,8 @@ class WebPage extends StatelessWidget { ...@@ -148,6 +148,8 @@ class WebPage extends StatelessWidget {
context.read<WebCubit>().chooseImage(context); context.read<WebCubit>().chooseImage(context);
} else if (state.chooseVideoCmdFlag) { } else if (state.chooseVideoCmdFlag) {
context.read<WebCubit>().chooseVideo(context); context.read<WebCubit>().chooseVideo(context);
} else if (state.suggestAppUpgrade) {
context.read<WebCubit>().suggestAppUpdate(context);
} }
}, },
), ),
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!