2019-05-24 15:21:48 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:local_spend/common/platform/platform_scaffold.dart';
|
|
|
|
import 'package:local_spend/common/widgets/basic_drawer.dart';
|
|
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
import 'package:flutter_linkify/flutter_linkify.dart';
|
|
|
|
|
|
|
|
class AboutPage extends StatefulWidget {
|
|
|
|
@override
|
2019-07-15 11:09:10 +00:00
|
|
|
// _HomePageState createState() => _HomePageState();
|
|
|
|
State<StatefulWidget> createState() {
|
|
|
|
return new _HomePageState();
|
|
|
|
}
|
2019-05-24 15:21:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class _HomePageState extends State<AboutPage> {
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
_saveCurrentRoute("/AboutPage");
|
|
|
|
}
|
|
|
|
|
2019-07-15 11:09:10 +00:00
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
|
2019-05-24 15:21:48 +00:00
|
|
|
_saveCurrentRoute(String lastRoute) async {
|
|
|
|
SharedPreferences preferences = await SharedPreferences.getInstance();
|
|
|
|
await preferences.setString('LastScreenRoute', lastRoute);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2019-07-15 11:09:10 +00:00
|
|
|
return WillPopScope(
|
|
|
|
onWillPop: () {
|
|
|
|
if (Navigator.canPop(context)) {
|
|
|
|
Navigator.of(context).pushNamedAndRemoveUntil(
|
|
|
|
'/HomePage', (Route<dynamic> route) => true);
|
|
|
|
} else {
|
|
|
|
Navigator.of(context).pushReplacementNamed('/HomePage');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: PlatformScaffold(
|
|
|
|
appBar: AppBar(
|
|
|
|
title: Text(
|
|
|
|
"About Page",
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 20,
|
|
|
|
color: Colors.black,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
leading: BackButton(),
|
|
|
|
centerTitle: true,
|
|
|
|
iconTheme: IconThemeData(color: Colors.black),
|
2019-05-24 15:21:48 +00:00
|
|
|
),
|
2019-07-15 11:09:10 +00:00
|
|
|
body: Container(
|
|
|
|
padding: EdgeInsets.all(32.0),
|
|
|
|
child: ListView(
|
2019-05-24 15:21:48 +00:00
|
|
|
children: <Widget>[
|
|
|
|
InkWell(
|
|
|
|
child: const Center(child: Text
|
2019-07-05 15:15:09 +00:00
|
|
|
('Pear Trading',
|
2019-07-15 11:09:10 +00:00
|
|
|
style: TextStyle(
|
2019-05-24 15:21:48 +00:00
|
|
|
fontSize: 20,
|
|
|
|
color: Colors.blue,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () => launch('https://app.peartrade.org/#/login?returnUrl=%2Fdashboard')
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(0,20,0,0),
|
|
|
|
child: Text(
|
2019-07-05 15:15:09 +00:00
|
|
|
"Pear Trading is a commerce company designed to register and monitor money circulating in the local economy.",
|
2019-05-24 15:21:48 +00:00
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 20.0,
|
|
|
|
color: Colors.black,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(0,20,0,0),
|
|
|
|
child: Text(
|
2019-07-05 15:15:09 +00:00
|
|
|
"Email: Test@admin.com",
|
2019-07-08 14:34:02 +00:00
|
|
|
// TODO: Make this an @email link
|
2019-05-24 15:21:48 +00:00
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
2019-07-05 15:15:09 +00:00
|
|
|
fontSize: 18.0,
|
|
|
|
color: Colors.blue,
|
2019-05-24 15:21:48 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(0,20,0,0),
|
|
|
|
child: Text(
|
2019-07-05 15:15:09 +00:00
|
|
|
"Phone: +44(0)1524 64544",
|
2019-07-08 14:34:02 +00:00
|
|
|
// TODO: Make this a @phone link
|
2019-05-24 15:21:48 +00:00
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 18.0,
|
|
|
|
color: Colors.blue,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
2019-07-05 15:15:09 +00:00
|
|
|
padding: EdgeInsets.fromLTRB(0,40,0,0),
|
2019-05-24 15:21:48 +00:00
|
|
|
child: Text(
|
2019-07-05 15:15:09 +00:00
|
|
|
"Developed by Shadowcat Industries",
|
2019-05-24 15:21:48 +00:00
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
2019-07-05 15:15:09 +00:00
|
|
|
fontSize: 20.0,
|
|
|
|
color: Colors.black,
|
2019-05-24 15:21:48 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2019-07-05 15:15:09 +00:00
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(0,20,0,0),
|
|
|
|
child: InkWell(
|
|
|
|
child: const Center(child: Text
|
|
|
|
('Shadowcat',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 20,
|
|
|
|
color: Colors.blue,
|
|
|
|
),
|
2019-05-24 15:21:48 +00:00
|
|
|
),
|
|
|
|
),
|
2019-07-05 15:15:09 +00:00
|
|
|
onTap: () => launch('https://shadow.cat/')
|
|
|
|
),
|
2019-05-24 15:21:48 +00:00
|
|
|
),
|
|
|
|
],
|
2019-07-15 11:09:10 +00:00
|
|
|
),
|
2019-05-24 15:21:48 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|