mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: update privacy policy and add version code (#4343)
This commit is contained in:
@ -1,21 +1,31 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
|
||||
import '../startup.dart';
|
||||
|
||||
class DeviceInfoTask extends LaunchTask {
|
||||
const DeviceInfoTask();
|
||||
class DeviceOrApplicationInfoTask extends LaunchTask {
|
||||
const DeviceOrApplicationInfoTask();
|
||||
|
||||
static int androidSDKVersion = -1;
|
||||
static String applicationVersion = '';
|
||||
static String buildNumber = '';
|
||||
|
||||
@override
|
||||
Future<void> initialize(LaunchContext context) async {
|
||||
final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||
final PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
final androidInfo = await deviceInfoPlugin.androidInfo;
|
||||
androidSDKVersion = androidInfo.version.sdkInt;
|
||||
}
|
||||
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
applicationVersion = packageInfo.version;
|
||||
buildNumber = packageInfo.buildNumber;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -47,7 +47,6 @@ GoRouter generateRouter(Widget child) {
|
||||
if (PlatformExtension.isMobile) ...[
|
||||
// settings
|
||||
_mobileHomeSettingPageRoute(),
|
||||
_mobileSettingPrivacyPolicyPageRoute(),
|
||||
_mobileSettingUserAgreementPageRoute(),
|
||||
_mobileCloudSettingAppFlowyCloudPageRoute(),
|
||||
|
||||
@ -196,16 +195,6 @@ GoRoute _mobileHomeSettingPageRoute() {
|
||||
);
|
||||
}
|
||||
|
||||
GoRoute _mobileSettingPrivacyPolicyPageRoute() {
|
||||
return GoRoute(
|
||||
parentNavigatorKey: AppGlobals.rootNavKey,
|
||||
path: PrivacyPolicyPage.routeName,
|
||||
pageBuilder: (context, state) {
|
||||
return const MaterialPage(child: PrivacyPolicyPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
GoRoute _mobileCloudSettingAppFlowyCloudPageRoute() {
|
||||
return GoRoute(
|
||||
parentNavigatorKey: AppGlobals.rootNavKey,
|
||||
|
Reference in New Issue
Block a user