mirror of
https://github.com/hamaluik/timecop.git
synced 2025-08-24 23:22:27 +08:00
Fixing about screen version bug
This commit is contained in:
@ -17,6 +17,7 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:timecop/l10n.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
@ -25,45 +26,59 @@ class AboutScreen extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AboutPage(
|
||||
key: Key("aboutPage"),
|
||||
title: Text(L10N.of(context).tr.about),
|
||||
applicationVersion: 'v{{ version }}+{{ buildNumber }}',
|
||||
applicationDescription: Text(
|
||||
L10N.of(context).tr.appDescription,
|
||||
textAlign: TextAlign.justify,
|
||||
),
|
||||
applicationIcon: SvgPicture.asset(
|
||||
"icon.no-bg.cyan.svg",
|
||||
semanticsLabel: L10N.of(context).tr.logoSemantics,
|
||||
height: 100,
|
||||
),
|
||||
applicationLegalese: L10N.of(context).tr.appLegalese,
|
||||
children: <Widget>[
|
||||
MarkdownPageListTile(
|
||||
filename: 'README.md',
|
||||
title: Text(L10N.of(context).tr.readme),
|
||||
icon: Icon(FontAwesomeIcons.readme),
|
||||
),
|
||||
MarkdownPageListTile(
|
||||
filename: 'CHANGELOG.md',
|
||||
title: Text(L10N.of(context).tr.changeLog),
|
||||
icon: Icon(FontAwesomeIcons.boxes),
|
||||
),
|
||||
MarkdownPageListTile(
|
||||
filename: 'CONTRIBUTORS.md',
|
||||
title: Text(L10N.of(context).tr.contributors),
|
||||
icon: Icon(FontAwesomeIcons.userAstronaut),
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(FontAwesomeIcons.code),
|
||||
title: Text(L10N.of(context).tr.sourceCode),
|
||||
onTap: () => launch("https://github.com/hamaluik/timecop"),
|
||||
),
|
||||
LicensesPageListTile(
|
||||
icon: Icon(FontAwesomeIcons.scroll),
|
||||
),
|
||||
],
|
||||
return FutureBuilder(
|
||||
future: PackageInfo.fromPlatform(),
|
||||
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
final packageInfo = snapshot.data as PackageInfo;
|
||||
String version = packageInfo.version;
|
||||
String buildNumber = packageInfo.buildNumber;
|
||||
return AboutPage(
|
||||
key: Key("aboutPage"),
|
||||
title: Text(L10N.of(context).tr.about),
|
||||
applicationVersion: "v$version+$buildNumber",
|
||||
applicationDescription: Text(
|
||||
L10N.of(context).tr.appDescription,
|
||||
textAlign: TextAlign.justify,
|
||||
),
|
||||
applicationIcon: SvgPicture.asset(
|
||||
"icon.no-bg.cyan.svg",
|
||||
semanticsLabel: L10N.of(context).tr.logoSemantics,
|
||||
height: 100,
|
||||
),
|
||||
applicationLegalese: L10N.of(context).tr.appLegalese,
|
||||
children: <Widget>[
|
||||
MarkdownPageListTile(
|
||||
filename: 'README.md',
|
||||
title: Text(L10N.of(context).tr.readme),
|
||||
icon: Icon(FontAwesomeIcons.readme),
|
||||
),
|
||||
MarkdownPageListTile(
|
||||
filename: 'CHANGELOG.md',
|
||||
title: Text(L10N.of(context).tr.changeLog),
|
||||
icon: Icon(FontAwesomeIcons.boxes),
|
||||
),
|
||||
MarkdownPageListTile(
|
||||
filename: 'CONTRIBUTORS.md',
|
||||
title: Text(L10N.of(context).tr.contributors),
|
||||
icon: Icon(FontAwesomeIcons.userAstronaut),
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(FontAwesomeIcons.code),
|
||||
title: Text(L10N.of(context).tr.sourceCode),
|
||||
onTap: () => launch("https://github.com/hamaluik/timecop"),
|
||||
),
|
||||
LicensesPageListTile(
|
||||
icon: Icon(FontAwesomeIcons.scroll),
|
||||
),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import flutter_local_notifications
|
||||
import package_info_plus_macos
|
||||
import path_provider_macos
|
||||
import share_plus_macos
|
||||
import shared_preferences_macos
|
||||
@ -14,6 +15,7 @@ import url_launcher_macos
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
|
||||
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
|
@ -5,6 +5,8 @@ PODS:
|
||||
- FMDB (2.7.5):
|
||||
- FMDB/standard (= 2.7.5)
|
||||
- FMDB/standard (2.7.5)
|
||||
- package_info_plus_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- path_provider_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- share_plus_macos (0.0.1):
|
||||
@ -20,6 +22,7 @@ PODS:
|
||||
DEPENDENCIES:
|
||||
- flutter_local_notifications (from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`)
|
||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||
- package_info_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos`)
|
||||
- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
|
||||
- share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`)
|
||||
- shared_preferences_macos (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_macos/macos`)
|
||||
@ -35,6 +38,8 @@ EXTERNAL SOURCES:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos
|
||||
FlutterMacOS:
|
||||
:path: Flutter/ephemeral
|
||||
package_info_plus_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus_macos/macos
|
||||
path_provider_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
|
||||
share_plus_macos:
|
||||
@ -50,6 +55,7 @@ SPEC CHECKSUMS:
|
||||
flutter_local_notifications: 3805ca215b2fb7f397d78b66db91f6a747af52e4
|
||||
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
|
||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||
package_info_plus_macos: f010621b07802a241d96d01876d6705f15e77c1c
|
||||
path_provider_macos: 160cab0d5461f0c0e02995469a98f24bdb9a3f1f
|
||||
share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4
|
||||
shared_preferences_macos: 480ce071d0666e37cef23fe6c702293a3d21799e
|
||||
|
49
pubspec.lock
49
pubspec.lock
@ -346,6 +346,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
http:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.13.3"
|
||||
http_multi_server:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -458,6 +465,48 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
package_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: package_info_plus
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.6"
|
||||
package_info_plus_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_info_plus_linux
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
package_info_plus_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_info_plus_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
package_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_info_plus_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
package_info_plus_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_info_plus_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
package_info_plus_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_info_plus_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -35,6 +35,7 @@ dependencies:
|
||||
file_picker: ^4.0.2
|
||||
flutter_local_notifications: ^3.0.2
|
||||
flutter_markdown: ^0.6.6
|
||||
package_info_plus: ^1.0.6
|
||||
|
||||
dependency_overrides:
|
||||
intl: 0.17.0
|
||||
|
Reference in New Issue
Block a user