From 2d741e61c76ddf323a5bc9b09f1393eb92653690 Mon Sep 17 00:00:00 2001 From: Felix Date: Mon, 2 Sep 2019 17:12:19 +0100 Subject: [PATCH] about page --- ios/Podfile.lock | 4 +- ios/Runner.xcodeproj/project.pbxproj | 2 +- lib/common/apifunctions/get_map_data.dart | 9 +-- lib/pages/more_page.dart | 74 ++++++++++------------- 4 files changed, 36 insertions(+), 53 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 371ba09..e0081c9 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -14,7 +14,7 @@ PODS: - Flutter DEPENDENCIES: - - Flutter (from `.symlinks/flutter/ios`) + - Flutter (from `.symlinks/flutter/ios-profile`) - google_maps_flutter (from `.symlinks/plugins/google_maps_flutter/ios`) - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) - url_launcher (from `.symlinks/plugins/url_launcher/ios`) @@ -25,7 +25,7 @@ SPEC REPOS: EXTERNAL SOURCES: Flutter: - :path: ".symlinks/flutter/ios" + :path: ".symlinks/flutter/ios-profile" google_maps_flutter: :path: ".symlinks/plugins/google_maps_flutter/ios" shared_preferences: diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 8fc019b..f0bdeff 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -282,7 +282,7 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", + "${PODS_ROOT}/../.symlinks/flutter/ios-profile/Flutter.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( diff --git a/lib/common/apifunctions/get_map_data.dart b/lib/common/apifunctions/get_map_data.dart index d9779ac..032e74f 100644 --- a/lib/common/apifunctions/get_map_data.dart +++ b/lib/common/apifunctions/get_map_data.dart @@ -59,13 +59,8 @@ Future getLocations(gmaps.LatLng ne, gmaps.LatLng sw) async { const pearLocationsURL = 'https://dev.localspend.co.uk/api/v1/supplier/location'; SharedPreferences preferences = await SharedPreferences.getInstance(); - Map body; - - body = { - 'session_key': preferences.get('LastToken'), - }; - Map> mapData = { + 'session_key': preferences.get('LastToken'), 'north_east': { 'latitude': ne.latitude, 'longitude': ne.longitude @@ -78,7 +73,7 @@ Future getLocations(gmaps.LatLng ne, gmaps.LatLng sw) async { final response = await http.post( pearLocationsURL, - body: json.encode(body), + body: json.encode(mapData), ); if (response.statusCode == 200) { diff --git a/lib/pages/more_page.dart b/lib/pages/more_page.dart index b1d3531..1619faa 100644 --- a/lib/pages/more_page.dart +++ b/lib/pages/more_page.dart @@ -94,33 +94,48 @@ class MorePageState extends State { applicationIcon: new Icon(Icons.receipt), applicationName: "Local Spend Tracker", children: [ - Text( - "Pear Trading is a commerce company designed to register and monitor money circulating in the local economy.\n"), + Text("Pear Trading is a commerce company designed to register and monitor money circulating in the local economy.\n"), Container( - padding: EdgeInsets.symmetric(horizontal: 10), + margin: EdgeInsets.symmetric(horizontal: 10), height: 35, child: RaisedButton( - onPressed: () => {}, -// launch(- something -), - child: Text("Contact us", + onPressed: () => launch('http://www.peartrade.org'), + child: Text("Pear Trading", style: TextStyle( color: Colors.white, fontSize: 18.0)), color: Colors.green, ), ), + Container( - height: 35, - margin: EdgeInsets.fromLTRB(10, 20, 10, 0), - child: RaisedButton( - child: Text( - 'Pear Trading', - style: TextStyle( - color: Colors.white, fontSize: 18.0), + margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), + height: 40.0, + child: Material( + color: Colors.transparent, + child: InkWell( + borderRadius: BorderRadius.circular(3), + onTap: () => launch('https://shadow.cat'), + child: Column( + children: [ + Align( + child: Text("Developed by"), + alignment: Alignment.centerLeft), + Container( + margin: EdgeInsets.all(0), + child : Text( + "Shadowcat Systems", + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.bold + ), + ), + ), + ], ), - color: Colors.lightGreen, - onPressed: () => - launch('http://www.peartrade.org')), + ), + ), ), + ], ); }, @@ -152,33 +167,6 @@ class MorePageState extends State { ), ), - Padding( - padding: EdgeInsets.fromLTRB(30.0, 20.0, 30.0, 0.0), - child: Container( - height: 75.0, - child: Material( - color: Colors.transparent, - child: InkWell( - borderRadius: BorderRadius.circular(3), - onTap: () => launch('https://shadow.cat'), - child: Column( - children: [ - Align( - child: Text("Developed by"), - alignment: Alignment.centerLeft), - FittedBox( - fit: BoxFit.fitHeight, - child: Image( - image: ExactAssetImage('assets/images/text.png'), - ), - ), - ], - ), - ), - ), - ), - ), - // Padding( // padding: EdgeInsets.fromLTRB(30.0, 20.0, 30.0, 0.0), // child: Container(