About screen slightly updated, all transaction options can now be implemented (interface with API is now more complete)

This commit is contained in:
Felix 2019-07-05 16:15:09 +01:00
parent 1b98ed6ca0
commit ac4b122d07
6 changed files with 65 additions and 42 deletions

View file

@ -0,0 +1,7 @@
import 'package:flutter/material.dart';
import 'package:local_spend/common/apifunctions/request_logout_api.dart';
logout(context) {
requestLogoutAPI(context);
Navigator.of(context).pushReplacementNamed('/LoginPage');
}

View file

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:local_spend/common/apifunctions/request_logout_api.dart';
import 'package:local_spend/common/functions/get_token.dart';
import 'package:local_spend/common/functions/logout.dart';
// debug
import 'package:flutter/foundation.dart';
@ -57,8 +58,7 @@ class _BasicDrawerState extends State<BasicDrawer> {
style: TextStyle(color: Colors.black, fontSize: 20.0),
),
onTap: () {
requestLogoutAPI(context);
Navigator.of(context).pushReplacementNamed('/LoginPage');
logout(context);
},
),
],

View file

@ -43,7 +43,7 @@ class _HomePageState extends State<AboutPage> {
children: <Widget>[
InkWell(
child: const Center(child: Text
('Link to Pear trading website',
('Pear Trading',
style: TextStyle(
fontSize: 20,
color: Colors.blue,
@ -55,18 +55,7 @@ class _HomePageState extends State<AboutPage> {
Padding(
padding: EdgeInsets.fromLTRB(0,20,0,0),
child: Text(
"Developed by Shadowcat Industries",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.0,
color: Colors.black,
),
),
),
Padding(
padding: EdgeInsets.fromLTRB(0,20,0,0),
child: Text(
"Pear tradings a commerce company designed to register andmonitor money circulating in the local economy.",
"Pear Trading is a commerce company designed to register and monitor money circulating in the local economy.",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.0,
@ -86,7 +75,7 @@ class _HomePageState extends State<AboutPage> {
),
),
Padding(
padding: EdgeInsets.fromLTRB(0,0,0,20),
padding: EdgeInsets.fromLTRB(0,20,0,0),
child: Text(
"Phone: +44(0)1524 64544",
textAlign: TextAlign.center,
@ -96,17 +85,30 @@ class _HomePageState extends State<AboutPage> {
),
),
),
InkWell(
child: const Center(child: Text
('Link to Shadowcat website',
style: TextStyle(
fontSize: 20,
color: Colors.blue,
Padding(
padding: EdgeInsets.fromLTRB(0,40,0,0),
child: Text(
"Developed by Shadowcat Industries",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.0,
color: Colors.black,
),
),
),
Padding(
padding: EdgeInsets.fromLTRB(0,20,0,0),
child: InkWell(
child: const Center(child: Text
('Shadowcat',
style: TextStyle(
fontSize: 20,
color: Colors.blue,
),
),
),
),
onTap: () => launch('https://shadow.cat/')
onTap: () => launch('https://shadow.cat/')
),
),
],
),

View file

@ -6,6 +6,7 @@ import 'package:flutter/services.dart';
import 'package:local_spend/common/apifunctions/request_logout_api.dart';
import 'package:local_spend/common/functions/get_token.dart';
import 'package:flutter_fadein/flutter_fadein.dart';
import 'package:local_spend/common/functions/logout.dart';
class HomePage extends StatefulWidget {
@override
@ -81,8 +82,7 @@ class _HomePageState extends State<HomePage> {
),
),
onTap: () {
requestLogoutAPI(context);
Navigator.of(context).pushReplacementNamed('/LoginPage');
logout(context);
},
),

View file

@ -201,7 +201,6 @@ class ReceiptPageState extends State<ReceiptPage> {
style: TextStyle(
fontSize: 18.0,
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
),