|
|
@ -4,6 +4,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/gestures.dart';
|
|
|
|
import 'package:flutter/gestures.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:package_info/package_info.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:gallery/l10n/gallery_localizations.dart';
|
|
|
|
import 'package:gallery/l10n/gallery_localizations.dart';
|
|
|
@ -20,6 +21,11 @@ void showAboutDialog({
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<String> getVersionNumber() async {
|
|
|
|
|
|
|
|
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
|
|
|
|
|
|
|
return packageInfo.version;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _AboutDialog extends StatelessWidget {
|
|
|
|
class _AboutDialog extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
@ -47,9 +53,10 @@ class _AboutDialog extends StatelessWidget {
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Center(
|
|
|
|
FutureBuilder(
|
|
|
|
child: Text(
|
|
|
|
future: getVersionNumber(),
|
|
|
|
'$name',
|
|
|
|
builder: (context, snapshot) => Text(
|
|
|
|
|
|
|
|
snapshot.hasData ? '$name ${snapshot.data}' : '$name',
|
|
|
|
style: textTheme.display1.apply(color: colorScheme.onPrimary),
|
|
|
|
style: textTheme.display1.apply(color: colorScheme.onPrimary),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|