diff --git a/lib/pages/receipt_page.dart b/lib/pages/receipt_page.dart index d230682..3c34a72 100644 --- a/lib/pages/receipt_page.dart +++ b/lib/pages/receipt_page.dart @@ -16,7 +16,7 @@ import 'package:local_spend/common/widgets/popupListView.dart'; import 'package:local_spend/common/widgets/labeled_checkbox.dart'; const URL = "https://flutter.io/"; -const demonstration = false; +const demonstration = true; class ReceiptPage extends StatefulWidget { @override @@ -82,20 +82,21 @@ class ReceiptPageState extends State { // return object of type Dialog return AlertDialog( title: new Text("Success"), - content: new Text("Recepit successfully submitted."), + content: new Text("Receipt successfully submitted."), actions: [ // usually buttons at the bottom of the dialog new FlatButton( child: new Text("OK"), onPressed: () { Navigator.of(context).pop(); + //TODO: Reset form after dialog exit }, ), ], ); }, ).then((_) { - Navigator.of(context).pushNamed('/HomePage'); + Navigator.of(context).pushReplacementNamed('/HomePage'); }); } else { @@ -166,6 +167,15 @@ class ReceiptPageState extends State { } String listOrganisations(List organisations, context) { + if (organisations.length == 0) { + showDialogSingleButton( + context, + "No matching organizations", + "We were unable to find any organizations matching this text.", + "OK" + ); + return null; + } var optionsList = new List(); for (var i = 0; i < organisations.length; i++) { diff --git a/lib/pages/spash_screen.dart b/lib/pages/spash_screen.dart index f3944f2..4aa22ab 100644 --- a/lib/pages/spash_screen.dart +++ b/lib/pages/spash_screen.dart @@ -49,7 +49,7 @@ class _SplashScreenState extends State { Container( margin: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 30.0), child: Text( - "© Copyright Statement 2018", + "© Copyright Statement 2019", style: TextStyle( fontSize: 16.0, color: Colors.black,