Add about dialog placeholder

This commit is contained in:
Roland Geider
2020-11-27 22:16:19 +01:00
parent 4f1e0b8b15
commit ace3e8bfe6
3 changed files with 94 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:wger/locale/locales.dart';
import 'package:wger/providers/auth.dart';
import 'package:wger/screens/dashboard.dart';
@@ -58,8 +60,20 @@ class AppDrawer extends StatelessWidget {
leading: Icon(Icons.edit),
title: Text('Options'),
onTap: () {
Navigator.of(context).pop();
Navigator.of(context).pushReplacementNamed(WeightScreen.routeName);
showDialog(
context: context,
builder: (context) => AlertDialog(
content: Text("Would show options dialog"),
actions: [
TextButton(
child: Text(
"Close",
),
onPressed: () => Navigator.of(context).pop(),
),
],
),
);
},
),
Divider(),
@@ -72,6 +86,40 @@ class AppDrawer extends StatelessWidget {
Navigator.of(context).pushReplacementNamed('/');
},
),
Divider(),
AboutListTile(
icon: Icon(Icons.info),
applicationName: 'wger',
applicationVersion: '0.0.1 alpha',
applicationLegalese: '\u{a9} 2020 The wger team',
applicationIcon: Image.asset(
'assets/images/logo.png',
width: 60,
),
aboutBoxChildren: [
RichText(
text: TextSpan(
style: TextStyle(fontSize: 16, color: Colors.black),
children: [
TextSpan(
text: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, '
'sed diam nonumy eirmod tempor invidunt ut labore et dolore '
'magna aliquyam erat, sed diam voluptua. At vero eos et accusam '
'et justo duo dolores et ea rebum.\n',
),
TextSpan(
text: 'https://github.com/wger-project/wger',
style: TextStyle(color: Colors.blue),
recognizer: TapGestureRecognizer()
..onTap = () {
launch('https://github.com/wger-project/wger');
},
)
],
),
),
],
),
],
),
);

View File

@@ -621,6 +621,48 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "5.7.10"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+4"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+9"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.9"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5+1"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+3"
vector_math:
dependency: transitive
description:
@@ -672,4 +714,4 @@ packages:
version: "2.2.1"
sdks:
dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.16.0 <2.0.0"
flutter: ">=1.22.0 <2.0.0"

View File

@@ -33,6 +33,7 @@ dependencies:
flutter_calendar_carousel: ^1.5.1
cupertino_icons: ^1.0.0
json_serializable: ^3.5.0
url_launcher: ^5.7.10
dev_dependencies:
flutter_test: