mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Add about dialog placeholder
This commit is contained in:
@@ -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');
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
44
pubspec.lock
44
pubspec.lock
@@ -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"
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user