From 0bb2a00e5fb7cd14e60ec8480b69d8099cb11a98 Mon Sep 17 00:00:00 2001 From: Thesmader Date: Sat, 2 May 2020 18:28:38 +0530 Subject: [PATCH 1/9] Minor debugging --- gogrocy/lib/core/services/api.dart | 7 +- .../lib/core/viewModels/cart_view_model.dart | 4 +- gogrocy/lib/ui/views/cart/cart.dart | 158 +++++++++--------- 3 files changed, 85 insertions(+), 84 deletions(-) diff --git a/gogrocy/lib/core/services/api.dart b/gogrocy/lib/core/services/api.dart index c628956..8ef10b3 100644 --- a/gogrocy/lib/core/services/api.dart +++ b/gogrocy/lib/core/services/api.dart @@ -158,8 +158,8 @@ class Apis { } Future editCartList( - {@required String product_id, @required String quantity}) async { - Map body = {"product_id": product_id, "quantity": quantity}; + {@required String productId, @required String quantity}) async { + Map body = {"product_id": productId, "quantity": quantity}; String jwt = await _sharedPrefsService.getJWT(); var client = new http.Client(); bool connectionState = await checkStatus(); @@ -170,9 +170,10 @@ class Apis { 'Authorization': 'Bearer $jwt', }, body: body); + print(response.body); return CartEdit.fromJson(json.decode(response.body)); } else - (print("Network failure")); + print("Network failure"); } Future placeOrder({@required String addressId}) async { diff --git a/gogrocy/lib/core/viewModels/cart_view_model.dart b/gogrocy/lib/core/viewModels/cart_view_model.dart index 4b5a7f2..70efac1 100644 --- a/gogrocy/lib/core/viewModels/cart_view_model.dart +++ b/gogrocy/lib/core/viewModels/cart_view_model.dart @@ -27,7 +27,7 @@ class CartViewModel extends BaseModel { print( "Updating API calledUpdating API calledUpdating API calledUpdating API calledUpdating API called"); cartEditResponse = - await _apis.editCartList(product_id: productId, quantity: quantity); + await _apis.editCartList(productId: productId, quantity: quantity); cartList = await _apis.getCartList(); setState(ViewState.Idle); } @@ -35,7 +35,7 @@ class CartViewModel extends BaseModel { Future editCartList(String product_id, String quantity) async { setState(ViewState.Busy); - await _apis.editCartList(product_id: product_id, quantity: quantity); + await _apis.editCartList(productId: product_id, quantity: quantity); setState(ViewState.Idle); } } diff --git a/gogrocy/lib/ui/views/cart/cart.dart b/gogrocy/lib/ui/views/cart/cart.dart index 1154e0b..7efb8c9 100644 --- a/gogrocy/lib/ui/views/cart/cart.dart +++ b/gogrocy/lib/ui/views/cart/cart.dart @@ -126,6 +126,84 @@ class CartHeader extends StatelessWidget { Container( height: 120 * constants.scaleRatio, color: colors.cartHeaderContainer, + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + IntrinsicHeight( + child: Padding( + padding: EdgeInsets.only(top: 13.43 * constants.scaleRatio), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 18.93 * constants.scaleRatio, + color: colors.cartHeaderColor, + ), + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Text( + "Your Cart", + style: TextStyle( + fontFamily: 'Gilroy', + fontSize: 32.0 * constants.scaleRatio, + fontWeight: FontWeight.bold, + color: colors.cartHeaderColor), + ), + Text( + "Grand Total ₹" + + ((model.sum > 499) + ? model.sum.toString().toString() + : (model.sum + 20).toString()), + style: TextStyle( + fontFamily: 'Gilroy', + fontSize: 12.0 * constants.scaleRatio, + fontWeight: FontWeight.w600, + color: colors.cartHeaderColor), + ), + ], + ), + ) + ], + ), + ), + ), + Padding( + padding: EdgeInsets.only( + left: 37.0 * constants.scaleRatio, + top: 0.0 * constants.scaleRatio), + child: RawMaterialButton( + elevation: 0.0, + focusElevation: 1, + focusColor: colors.cartButtonBackground, + onPressed: () { + checkoutButtonPressed(); + }, + fillColor: colors.cartButtonBackground, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(3), + ), + child: SizedBox( + width: constants.CartConfig.checkoutButtonWidth, + height: constants.CartConfig.checkoutButtonHeight, + child: Center( + child: Text( + 'Checkout Now', + style: TextStyle( + color: colors.cartButtonText, + fontSize: 12.0 * constants.scaleRatio, + fontWeight: FontWeight.bold), + ), + ), + ), + ), + ) + ], + ), ), Container( height: 33.0 * constants.scaleRatio, @@ -138,89 +216,11 @@ class CartHeader extends StatelessWidget { bottom: 0.0, child: Image( height: 137.67 * constants.scaleRatio, - width: 181.72 * constants.scaleRatio, + width: 172 * constants.scaleRatio, image: AssetImage( 'assets/images/shopping_cart.png', ), )), - Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - IntrinsicHeight( - child: Padding( - padding: EdgeInsets.only(top: 13.43 * constants.scaleRatio), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 18.93 * constants.scaleRatio, - color: colors.cartHeaderColor, - ), - Padding( - padding: const EdgeInsets.only(left: 8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - "Your Cart", - style: TextStyle( - fontFamily: 'Gilroy', - fontSize: 32.0 * constants.scaleRatio, - fontWeight: FontWeight.bold, - color: colors.cartHeaderColor), - ), - Text( - "Grand Total ₹" + - ((model.sum > 499) - ? model.sum.toString().toString() - : (model.sum + 20).toString()), - style: TextStyle( - fontFamily: 'Gilroy', - fontSize: 12.0 * constants.scaleRatio, - fontWeight: FontWeight.w600, - color: colors.cartHeaderColor), - ), - ], - ), - ) - ], - ), - ), - ), - Padding( - padding: EdgeInsets.only( - left: 37.0 * constants.scaleRatio, - top: 0.0 * constants.scaleRatio), - child: RawMaterialButton( - elevation: 0.0, - focusElevation: 1, - focusColor: colors.cartButtonBackground, - onPressed: () { - checkoutButtonPressed(); - }, - fillColor: colors.cartButtonBackground, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(3), - ), - child: SizedBox( - width: constants.CartConfig.checkoutButtonWidth, - height: constants.CartConfig.checkoutButtonHeight, - child: Center( - child: Text( - 'Checkout Now', - style: TextStyle( - color: colors.cartButtonText, - fontSize: 12.0 * constants.scaleRatio, - fontWeight: FontWeight.bold), - ), - ), - ), - ), - ) - ], - ), ], ); } From fa5bf1593996d84f5a6a764fc3784dad743f5668 Mon Sep 17 00:00:00 2001 From: Chinmay Kabi Date: Sun, 3 May 2020 00:16:57 +0530 Subject: [PATCH 2/9] Notifications Analytics --- gogrocy/android/app/build.gradle | 3 ++ .../android/app/src/main/AndroidManifest.xml | 11 ++++ .../kotlin/in/gogrocy/gogrocy/MainActivity.kt | 2 +- .../src/main/res/drawable/ic_notification.png | Bin 0 -> 568 bytes .../res/mipmap-anydpi-v26/ic_notification.png | Bin 0 -> 568 bytes .../android/app/src/main/res/values/color.xml | 4 ++ gogrocy/android/build.gradle | 4 +- .../lib/core/services/analytics_service.dart | 15 ++++++ .../services/firebase_messaging_service.dart | 50 +++++++++++++++++- gogrocy/lib/main.dart | 6 +++ gogrocy/lib/service_locator.dart | 2 + gogrocy/lib/ui/views/startup_view.dart | 18 ++++++- gogrocy/pubspec.yaml | 3 +- 13 files changed, 112 insertions(+), 6 deletions(-) create mode 100644 gogrocy/android/app/src/main/res/drawable/ic_notification.png create mode 100644 gogrocy/android/app/src/main/res/mipmap-anydpi-v26/ic_notification.png create mode 100644 gogrocy/android/app/src/main/res/values/color.xml create mode 100644 gogrocy/lib/core/services/analytics_service.dart diff --git a/gogrocy/android/app/build.gradle b/gogrocy/android/app/build.gradle index 52870d9..5b90e40 100644 --- a/gogrocy/android/app/build.gradle +++ b/gogrocy/android/app/build.gradle @@ -89,4 +89,7 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' + implementation 'com.google.firebase:firebase-messaging:20.1.6' + } +apply plugin: 'com.google.gms.google-services' diff --git a/gogrocy/android/app/src/main/AndroidManifest.xml b/gogrocy/android/app/src/main/AndroidManifest.xml index b3dd332..c015bb3 100644 --- a/gogrocy/android/app/src/main/AndroidManifest.xml +++ b/gogrocy/android/app/src/main/AndroidManifest.xml @@ -17,6 +17,10 @@ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> + + + + @@ -27,5 +31,12 @@ + + + diff --git a/gogrocy/android/app/src/main/kotlin/in/gogrocy/gogrocy/MainActivity.kt b/gogrocy/android/app/src/main/kotlin/in/gogrocy/gogrocy/MainActivity.kt index 88f43e5..e9db6c4 100644 --- a/gogrocy/android/app/src/main/kotlin/in/gogrocy/gogrocy/MainActivity.kt +++ b/gogrocy/android/app/src/main/kotlin/in/gogrocy/gogrocy/MainActivity.kt @@ -5,7 +5,7 @@ import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.engine.FlutterEngine import io.flutter.plugins.GeneratedPluginRegistrant -class MainActivity: FlutterActivity() { +class MainActivity : FlutterActivity() { override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) { GeneratedPluginRegistrant.registerWith(flutterEngine); } diff --git a/gogrocy/android/app/src/main/res/drawable/ic_notification.png b/gogrocy/android/app/src/main/res/drawable/ic_notification.png new file mode 100644 index 0000000000000000000000000000000000000000..4d677a297250fde5058dc65c0f7a901920caa723 GIT binary patch literal 568 zcmV-80>}M{P){}v(pJH%;b{{f5Oek^J5Z6_3#@{0B%D!A( z5O0VZA!Lx+%v@24ow1ZbZ9m3bo=*HL#Lznw*T6?3aBKy=$pB7leEC|Sy-x7}rEq5g zD{>QfgC?_Eq$|&OK|HDG40$xGvPRer?x#G9~E%0000}M{P){}v(pJH%;b{{f5Oek^J5Z6_3#@{0B%D!A( z5O0VZA!Lx+%v@24ow1ZbZ9m3bo=*HL#Lznw*T6?3aBKy=$pB7leEC|Sy-x7}rEq5g zD{>QfgC?_Eq$|&OK|HDG40$xGvPRer?x#G9~E%0000 + + #5FD900 + \ No newline at end of file diff --git a/gogrocy/android/build.gradle b/gogrocy/android/build.gradle index 0cf1c48..51f3d83 100644 --- a/gogrocy/android/build.gradle +++ b/gogrocy/android/build.gradle @@ -6,9 +6,9 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:3.5.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.0' + classpath 'com.google.gms:google-services:4.3.2' //classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0' } } diff --git a/gogrocy/lib/core/services/analytics_service.dart b/gogrocy/lib/core/services/analytics_service.dart new file mode 100644 index 0000000..ba51d62 --- /dev/null +++ b/gogrocy/lib/core/services/analytics_service.dart @@ -0,0 +1,15 @@ +import 'package:firebase_analytics/firebase_analytics.dart'; +import 'package:firebase_analytics/observer.dart'; +import 'package:flutter/material.dart'; + +class AnalyticsService { + final FirebaseAnalytics _analytics = FirebaseAnalytics(); + + FirebaseAnalyticsObserver getAnalyticsObserver() => + FirebaseAnalyticsObserver(analytics: _analytics); + + Future setUserProperties({@required String userId}) async { + await _analytics.setUserId(userId); + } + +} \ No newline at end of file diff --git a/gogrocy/lib/core/services/firebase_messaging_service.dart b/gogrocy/lib/core/services/firebase_messaging_service.dart index ccc165f..671397f 100644 --- a/gogrocy/lib/core/services/firebase_messaging_service.dart +++ b/gogrocy/lib/core/services/firebase_messaging_service.dart @@ -1,10 +1,58 @@ import 'package:firebase_messaging/firebase_messaging.dart'; +import 'package:flutter/material.dart'; class FirebaseMessagingService { static final FirebaseMessaging fcmInstance = FirebaseMessaging(); - static Future getToken() async { + Future getToken() async { var token = await fcmInstance.getToken(); + print("Firebase Token is $token"); return token; } + + void initializeNotifications(BuildContext context) { + fcmInstance.configure(onMessage: (Map message) async { + print('onMessage'); + showDialog( + context: context, + builder: (context) => AlertDialog( + content: ListTile( + title: Text(message['notification']['title']), + subtitle: Text(message['notification']['body']), + ), + actions: [ + FlatButton( + child: Text('OK'), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ), + ); + }, onLaunch: (Map message) async { + print("onLaunch: $message"); + }, onResume: (Map message) async { + print("onResume: $message"); + }); + fcmInstance.subscribeToTopic('pests'); + fcmInstance.subscribeToTopic('weather'); + print('FCM Configured!'); + } + + static void reSubscribeWeatherHandler() { + fcmInstance.subscribeToTopic('weather'); + } + + static void reSubscribePestHandler() { + fcmInstance.subscribeToTopic('pests'); + } + + static void unsubscribePestHandler() { + fcmInstance.unsubscribeFromTopic('pests'); + } + + static void unsubscribeWeatherHandler() { + fcmInstance.unsubscribeFromTopic('weather'); + } } diff --git a/gogrocy/lib/main.dart b/gogrocy/lib/main.dart index 0d6f8b8..eaa419b 100644 --- a/gogrocy/lib/main.dart +++ b/gogrocy/lib/main.dart @@ -4,6 +4,7 @@ import 'dart:ui'; import 'package:firebase_remote_config/firebase_remote_config.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:gogrocy/core/services/analytics_service.dart'; import 'package:gogrocy/core/services/navigation_service.dart'; import 'package:gogrocy/service_locator.dart'; import 'package:gogrocy/ui/router.dart'; @@ -12,6 +13,7 @@ import 'package:gogrocy/ui/views/startup_view.dart'; import 'package:package_info/package_info.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:gogrocy/ui/shared/constants.dart' as constants; +import 'package:firebase_messaging/firebase_messaging.dart'; void main() { //Crashlytics.instance.enableInDevMode = true; @@ -58,6 +60,10 @@ class _GoGrocyAppState extends State { return MaterialApp( debugShowCheckedModeBanner: false, title: 'GoGrocy', + navigatorObservers: [ + locator().getAnalyticsObserver(), + + ], theme: ThemeData( scaffoldBackgroundColor: Colors.white, primarySwatch: primaryColor, diff --git a/gogrocy/lib/service_locator.dart b/gogrocy/lib/service_locator.dart index 90ae354..fc13876 100644 --- a/gogrocy/lib/service_locator.dart +++ b/gogrocy/lib/service_locator.dart @@ -1,4 +1,5 @@ import 'package:get_it/get_it.dart'; +import 'package:gogrocy/core/services/analytics_service.dart'; import 'package:gogrocy/core/services/authentication_service.dart'; import 'package:gogrocy/core/services/navigation_service.dart'; import 'package:gogrocy/core/services/shared_prefs.dart'; @@ -22,6 +23,7 @@ GetIt locator = GetIt.instance; void setupLocator() { locator.registerFactory(() => SharedPrefsService()); //locator.registerFactory(()=>SignUpViewModel()); + locator.registerLazySingleton(() => AnalyticsService()); locator.registerFactory(() => CitySelectionModel()); locator.registerFactory(() => StartupViewModel()); locator.registerFactory(() => NavigationService()); diff --git a/gogrocy/lib/ui/views/startup_view.dart b/gogrocy/lib/ui/views/startup_view.dart index 4a8a381..9cf5b55 100644 --- a/gogrocy/lib/ui/views/startup_view.dart +++ b/gogrocy/lib/ui/views/startup_view.dart @@ -3,8 +3,24 @@ import 'package:gogrocy/core/viewModels/startup_view_model.dart'; import 'package:gogrocy/ui/shared/constants.dart' as constants; import 'package:gogrocy/ui/views/base_view.dart'; import 'package:gogrocy/ui/widgets/text_widgets.dart'; +import 'package:gogrocy/core/services/firebase_messaging_service.dart'; + +class StartupView extends StatefulWidget { + @override + _StartupViewState createState() => _StartupViewState(); +} + +class _StartupViewState extends State { + FirebaseMessagingService _firebaseMessagingService = + FirebaseMessagingService(); + + @override + void initState() { + super.initState(); + _firebaseMessagingService.getToken(); + _firebaseMessagingService.initializeNotifications(context); + } -class StartupView extends StatelessWidget { @override Widget build(BuildContext context) { constants.mediaQueryData = MediaQuery.of(context); diff --git a/gogrocy/pubspec.yaml b/gogrocy/pubspec.yaml index 362cde7..4a998e5 100644 --- a/gogrocy/pubspec.yaml +++ b/gogrocy/pubspec.yaml @@ -37,6 +37,7 @@ dependencies: webview_flutter: ^0.3.21 package_info: ^0.4.0+17 firebase_remote_config: ^0.3.0+3 + firebase_analytics: ^5.0.11 @@ -58,7 +59,7 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - - assets/images/ + - assets/images/ fonts: - family: Gilroy From 281ffef2068ecb32199723e9a93e9f0d057dec3c Mon Sep 17 00:00:00 2001 From: Chinmay Kabi Date: Sun, 3 May 2020 02:47:13 +0530 Subject: [PATCH 3/9] Minor enhancements --- gogrocy/lib/core/models/place_order.dart | 15 +++++++++++++ gogrocy/lib/core/services/api.dart | 22 ++++++++++++++----- gogrocy/lib/ui/views/home/grid_list.dart | 2 +- .../lib/ui/widgets/appbars/main_appbar.dart | 22 +++++++++++++------ 4 files changed, 47 insertions(+), 14 deletions(-) create mode 100644 gogrocy/lib/core/models/place_order.dart diff --git a/gogrocy/lib/core/models/place_order.dart b/gogrocy/lib/core/models/place_order.dart new file mode 100644 index 0000000..37ea7e5 --- /dev/null +++ b/gogrocy/lib/core/models/place_order.dart @@ -0,0 +1,15 @@ +class PlaceOrder { + bool success; + + PlaceOrder({this.success}); + + PlaceOrder.fromJson(Map json) { + success = json['success']; + } + + Map toJson() { + final Map data = new Map(); + data['success'] = this.success; + return data; + } +} \ No newline at end of file diff --git a/gogrocy/lib/core/services/api.dart b/gogrocy/lib/core/services/api.dart index c628956..f3830cc 100644 --- a/gogrocy/lib/core/services/api.dart +++ b/gogrocy/lib/core/services/api.dart @@ -6,6 +6,7 @@ import 'package:gogrocy/core/models/orders.dart'; import 'package:gogrocy/core/models/ProductsByCity.dart'; import 'package:gogrocy/core/models/cart_edit.dart'; import 'package:gogrocy/core/models/cart_list.dart'; +import 'package:gogrocy/core/models/place_order.dart'; import 'package:gogrocy/core/models/product.dart'; import 'package:gogrocy/core/models/signup_model.dart'; import 'package:gogrocy/core/models/user.dart'; @@ -184,12 +185,21 @@ class Apis { bool connectionState = await checkStatus(); if (connectionState) //TODO: Add a proper else return { - var response = await client.post(orderRequest, - headers: { - 'Authorization': 'Bearer $jwt', - }, - body: body); - return true; + try{ + var response = await client.post(orderRequest, + headers: { + 'Authorization': 'Bearer $jwt', + }, + body: body); + if(PlaceOrder.fromJson(json.decode(response.body)).success) + return true; + else return false; + } + catch(e) + { + print(e); + return false; + } } else return false; } diff --git a/gogrocy/lib/ui/views/home/grid_list.dart b/gogrocy/lib/ui/views/home/grid_list.dart index a110222..690c6fe 100644 --- a/gogrocy/lib/ui/views/home/grid_list.dart +++ b/gogrocy/lib/ui/views/home/grid_list.dart @@ -28,7 +28,7 @@ class _GridListState extends State super.build(context); if (widget.resultList.length != 0) return GridView.builder( - itemCount: 8, + itemCount: (widget.resultList.length>=8)?8:widget.resultList.length, shrinkWrap: true, controller: _scrollController, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( diff --git a/gogrocy/lib/ui/widgets/appbars/main_appbar.dart b/gogrocy/lib/ui/widgets/appbars/main_appbar.dart index 4dd20cd..6de0d13 100644 --- a/gogrocy/lib/ui/widgets/appbars/main_appbar.dart +++ b/gogrocy/lib/ui/widgets/appbars/main_appbar.dart @@ -55,13 +55,21 @@ class MainAppBar extends StatelessWidget implements PreferredSizeWidget { ), )); else - return Text( - snapshot.data, - style: TextStyle( - fontSize: constants - .AppBarConfig.addressFontSize, - color: Colors.black, - fontWeight: FontWeight.w500), + return Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + mainAxisAlignment:MainAxisAlignment.start, + children: [ + Icon(Icons.location_on,color: Colors.green,size: 14,), + Text( + snapshot.data, + style: TextStyle( + fontSize: constants + .AppBarConfig.addressFontSize, + color: Colors.black, + fontWeight: FontWeight.w500), + ), + ], ); }, ) From 1426ea73d618e5fecda24c0b4941df53fadedf0b Mon Sep 17 00:00:00 2001 From: Thesmader Date: Sun, 3 May 2020 03:20:53 +0530 Subject: [PATCH 4/9] hotfix required --- gogrocy/android/app/build.gradle | 4 +-- gogrocy/android/build.gradle | 4 +-- gogrocy/lib/core/services/api.dart | 24 +++++++---------- .../core/services/authentication_service.dart | 4 +-- gogrocy/lib/core/viewModels/login_model.dart | 10 +++---- .../core/viewModels/signup_view_model.dart | 3 +++ gogrocy/lib/main.dart | 6 ++--- gogrocy/lib/ui/shared/constants.dart | 20 +++++++------- gogrocy/lib/ui/views/cart/cart.dart | 26 ++++++++++--------- gogrocy/lib/ui/views/city_selection.dart | 1 + gogrocy/lib/ui/views/login_view.dart | 2 +- gogrocy/lib/ui/views/startup_view.dart | 1 + gogrocy/lib/ui/widgets/details_form.dart | 3 --- gogrocy/lib/ui/widgets/onboarding_widget.dart | 2 +- gogrocy/lib/ui/widgets/vertical_spaces.dart | 2 +- gogrocy/pubspec.yaml | 2 +- 16 files changed, 58 insertions(+), 56 deletions(-) diff --git a/gogrocy/android/app/build.gradle b/gogrocy/android/app/build.gradle index 52870d9..6f0f8df 100644 --- a/gogrocy/android/app/build.gradle +++ b/gogrocy/android/app/build.gradle @@ -23,8 +23,8 @@ if (flutterVersionName == null) { apply plugin: 'com.android.application' apply plugin: 'kotlin-android' +apply plugin: 'com.google.firebase.crashlytics' apply plugin: 'com.google.gms.google-services' -//apply plugin: 'com.google.firebase.crashlytics' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" def keystoreProperties = new Properties() @@ -85,7 +85,7 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" //implementation 'com.google.firebase:firebase-analytics:17.4.0' - //implementation 'com.google.firebase:firebase-crashlytics:17.0.0' + implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' diff --git a/gogrocy/android/build.gradle b/gogrocy/android/build.gradle index 0cf1c48..b5acdd5 100644 --- a/gogrocy/android/build.gradle +++ b/gogrocy/android/build.gradle @@ -8,8 +8,8 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:3.5.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.0' - //classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0' + classpath 'com.google.gms:google-services:4.3.3' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta02' } } diff --git a/gogrocy/lib/core/services/api.dart b/gogrocy/lib/core/services/api.dart index 8ef10b3..e8bbcac 100644 --- a/gogrocy/lib/core/services/api.dart +++ b/gogrocy/lib/core/services/api.dart @@ -163,7 +163,7 @@ class Apis { String jwt = await _sharedPrefsService.getJWT(); var client = new http.Client(); bool connectionState = await checkStatus(); - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var response = await client.post(editCart, headers: { @@ -183,7 +183,7 @@ class Apis { String jwt = await _sharedPrefsService.getJWT(); var client = new http.Client(); bool connectionState = await checkStatus(); - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var response = await client.post(orderRequest, headers: { @@ -198,12 +198,11 @@ class Apis { Future getProductsByCity() async { Map body = { "city": await _sharedPrefsService.getCity(), - // TODO: Add city here from SharedPrefs }; String jwt = await _sharedPrefsService.getJWT(); var client = new http.Client(); bool connectionState = await checkStatus(); - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var response = await client.post(getProductsByCityRequest, headers: { @@ -218,13 +217,12 @@ class Apis { Future getProductsByCityCategory(String cat_id) async { Map body = { "city": await _sharedPrefsService.getCity(), - // TODO: Add city here from SharedPrefs "cat_id": cat_id }; String jwt = await _sharedPrefsService.getJWT(); var client = new http.Client(); bool connectionState = await checkStatus(); - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var response = await client.post(getCategoriesByCityRequest, headers: { @@ -239,13 +237,12 @@ class Apis { Future searchProductByCity(String query) async { Map body = { "city": await _sharedPrefsService.getCity(), - // TODO: Add city here from SharedPrefs "query": query }; String jwt = await _sharedPrefsService.getJWT(); var client = new http.Client(); bool connectionState = await checkStatus(); - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var response = await client.post(searchByCity, headers: { @@ -260,7 +257,7 @@ class Apis { Future> getAllProducts() async { var client = new http.Client(); bool connectionState = await checkStatus(); - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var products = List(); var response = await client.post(allProducts); @@ -281,9 +278,8 @@ class Apis { String jwt = await _sharedPrefsService.getJWT(); Map body = { "city": await _sharedPrefsService.getCity(), - // TODO: Add city here from SharedPrefs }; - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var products = List(); var response = await client.post(allProducts, @@ -308,7 +304,7 @@ class Apis { var client = new http.Client(); bool connectionState = await checkStatus(); String jwt = await _sharedPrefsService.getJWT(); - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var address = List
(); var response = await client.post(getAddress, headers: { @@ -331,7 +327,7 @@ class Apis { var client = new http.Client(); bool connectionState = await checkStatus(); String jwt = await _sharedPrefsService.getJWT(); - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var response = await client.post(getOrderRequest, headers: { 'Content-Type': 'application/json', @@ -349,7 +345,7 @@ class Apis { var client = http.Client(); bool connectionState = await checkStatus(); String jwt = await _sharedPrefsService.getJWT(); - if (connectionState) //TODO: Add a proper else return + if (connectionState) { var response = await client.post(cartList, headers: { 'Content-Type': 'application/json', diff --git a/gogrocy/lib/core/services/authentication_service.dart b/gogrocy/lib/core/services/authentication_service.dart index 36739c6..a427d34 100644 --- a/gogrocy/lib/core/services/authentication_service.dart +++ b/gogrocy/lib/core/services/authentication_service.dart @@ -52,8 +52,8 @@ class AuthenticationService { print(currentUser.uid + " " + currentUser.phoneNumber); return currentUser != null; } catch (e) { - print(e.message); - return e.message; + print(e); + return e; } } diff --git a/gogrocy/lib/core/viewModels/login_model.dart b/gogrocy/lib/core/viewModels/login_model.dart index 587ef8a..faf17fb 100644 --- a/gogrocy/lib/core/viewModels/login_model.dart +++ b/gogrocy/lib/core/viewModels/login_model.dart @@ -39,14 +39,14 @@ class LoginModel extends BaseModel { @required String phoneNumber, @required String countryCode}) async { //var internetStatus = await checkInternetStatus(); - setState(ViewState.Busy); + //setState(ViewState.Busy); //var finalNumber = countryCode + " " + phoneNumber; var result = await authenticationService.verifyPhoneNumber( context, phoneNumber, countryCode); - setState(ViewState.Idle); + //setState(ViewState.Idle); if (result is bool) { if (result) { @@ -69,13 +69,13 @@ class LoginModel extends BaseModel { @required String countryCode}) async { setState(ViewState.Busy); - /*var result = */ + var result = await authenticationService.signInWithOtp( authenticationService.verificationId, otp); setState(ViewState.Idle); - /*if (result is bool) { + if (result is bool) { if (result) { print('login success with otp'); navigationService.goBack(); @@ -96,7 +96,7 @@ class LoginModel extends BaseModel { content: Text('Login Unsuccessful'), ), ); - }*/ + } } Future loginWithApi( diff --git a/gogrocy/lib/core/viewModels/signup_view_model.dart b/gogrocy/lib/core/viewModels/signup_view_model.dart index 8225508..97c8f3a 100644 --- a/gogrocy/lib/core/viewModels/signup_view_model.dart +++ b/gogrocy/lib/core/viewModels/signup_view_model.dart @@ -1,6 +1,7 @@ import 'package:flutter/animation.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:gogrocy/core/enums/viewstate.dart'; import 'package:gogrocy/core/services/api.dart'; import 'package:gogrocy/core/services/navigation_service.dart'; import 'package:gogrocy/core/services/shared_prefs.dart'; @@ -73,6 +74,7 @@ class SignUpViewModel extends BaseModel { ); Future signUpWithApi() async { + setState(ViewState.Busy); var signUp = await _apiService.signUpApi( name: nameController.text, countryCode: countryCode, @@ -82,6 +84,7 @@ class SignUpViewModel extends BaseModel { locality: addressController.text, city: cityController.text, zip: pinCodeController.text); + setState(ViewState.Idle); if (signUp.success) { _navigationService.goBack(); _navigationService.navigateTo('city'); diff --git a/gogrocy/lib/main.dart b/gogrocy/lib/main.dart index 0d6f8b8..7e7c1f2 100644 --- a/gogrocy/lib/main.dart +++ b/gogrocy/lib/main.dart @@ -1,6 +1,6 @@ import 'dart:ui'; -//import 'package:firebase_crashlytics/firebase_crashlytics.dart'; +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:firebase_remote_config/firebase_remote_config.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -14,8 +14,8 @@ import 'package:url_launcher/url_launcher.dart'; import 'package:gogrocy/ui/shared/constants.dart' as constants; void main() { - //Crashlytics.instance.enableInDevMode = true; - //FlutterError.onError = Crashlytics.instance.recordFlutterError; + Crashlytics.instance.enableInDevMode = true; + FlutterError.onError = Crashlytics.instance.recordFlutterError; setupLocator(); runApp(GoGrocyApp()); } diff --git a/gogrocy/lib/ui/shared/constants.dart b/gogrocy/lib/ui/shared/constants.dart index a36e3f3..dca9b30 100644 --- a/gogrocy/lib/ui/shared/constants.dart +++ b/gogrocy/lib/ui/shared/constants.dart @@ -12,20 +12,19 @@ final String playStoreUrl = "https://play.google.com/store/apps/details?id=in.gogrocy.gogrocy"; class LoginConfig { - static double loginTextFieldWidth = 280 * scaleRatio; - static double titleTextSize = 22 * scaleRatio; + static double titleTextSize = 0.053 * screenWidth; } class SignUpConfig { - static double textFieldWidth = 275 * scaleRatio; + static double textFieldWidth = 0.783 * screenWidth; static double raisedButtonWidth = 0.283 * screenWidth; static double raisedButtonHeight = 0.095 * screenWidth; } class OnBoardingConfig { - static double illustrationWidth = 316.21 * scaleRatio; - static double illustrationHeight = 280 * scaleRatio; - static double footerTextSize = 14 * scaleRatio; + static double illustrationWidth = 0.769 * screenWidth; + static double illustrationHeight = 0.478 * screenHeight; + static double footerTextSize = 0.034 * screenWidth; } class BottomNavBarConfig { @@ -41,7 +40,7 @@ class BottomNavBarConfig { } class AppBarConfig { - static double appBarHeight = 63.0 * scaleRatio; + static double appBarHeight = 0.100 * screenHeight; static double appBarWidth = screenWidth; static double titleFontSize = 0.0267 * screenHeight; static double searchIconSize = 0.5 * appBarHeight; @@ -76,12 +75,15 @@ class HomePageConfig { } class CartConfig { - static double checkoutButtonWidth = 105.17 * scaleRatio; - static double checkoutButtonHeight = 27.27 * scaleRatio; + static double checkoutButtonWidth = 0.255 * screenWidth; + static double checkoutButtonHeight = 0.033 * screenHeight; static double imageWidth = (155 / 411) * screenWidth; static double imageHeight = (147 / 823) * screenHeight; static double counterHeight = (25.46 / 823) * screenHeight; static double counterWidth = (91 / 411) * screenWidth; + + static double shoppingCartWidth = 0.442 * screenWidth; + static double shoppingCartHeight = 0.170 * screenHeight; } diff --git a/gogrocy/lib/ui/views/cart/cart.dart b/gogrocy/lib/ui/views/cart/cart.dart index 7efb8c9..f100214 100644 --- a/gogrocy/lib/ui/views/cart/cart.dart +++ b/gogrocy/lib/ui/views/cart/cart.dart @@ -124,7 +124,7 @@ class CartHeader extends StatelessWidget { Column( children: [ Container( - height: 120 * constants.scaleRatio, + height: 0.195 * constants.screenHeight, color: colors.cartHeaderContainer, child: Column( mainAxisSize: MainAxisSize.max, @@ -132,12 +132,12 @@ class CartHeader extends StatelessWidget { children: [ IntrinsicHeight( child: Padding( - padding: EdgeInsets.only(top: 13.43 * constants.scaleRatio), + padding: EdgeInsets.only(top: 0.020 * constants.screenHeight), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - width: 18.93 * constants.scaleRatio, + width: 0.046 * constants.screenWidth, color: colors.cartHeaderColor, ), Padding( @@ -150,7 +150,7 @@ class CartHeader extends StatelessWidget { "Your Cart", style: TextStyle( fontFamily: 'Gilroy', - fontSize: 32.0 * constants.scaleRatio, + fontSize: 0.077 * constants.screenWidth, fontWeight: FontWeight.bold, color: colors.cartHeaderColor), ), @@ -161,7 +161,7 @@ class CartHeader extends StatelessWidget { : (model.sum + 20).toString()), style: TextStyle( fontFamily: 'Gilroy', - fontSize: 12.0 * constants.scaleRatio, + fontSize: 0.032 * constants.screenWidth, fontWeight: FontWeight.w600, color: colors.cartHeaderColor), ), @@ -174,8 +174,8 @@ class CartHeader extends StatelessWidget { ), Padding( padding: EdgeInsets.only( - left: 37.0 * constants.scaleRatio, - top: 0.0 * constants.scaleRatio), + left: 0.075 * constants.screenWidth, + top: 0.012 * constants.screenHeight), child: RawMaterialButton( elevation: 0.0, focusElevation: 1, @@ -195,7 +195,7 @@ class CartHeader extends StatelessWidget { 'Checkout Now', style: TextStyle( color: colors.cartButtonText, - fontSize: 12.0 * constants.scaleRatio, + fontSize: 0.031 * constants.screenWidth, fontWeight: FontWeight.bold), ), ), @@ -206,17 +206,19 @@ class CartHeader extends StatelessWidget { ), ), Container( - height: 33.0 * constants.scaleRatio, + height: 0.035 * constants.screenHeight, color: Colors.white, ) ], ), Positioned( right: 0.0, - bottom: 0.0, + top: 0.0597 * constants.screenHeight, + //bottom: 0.0, + //top: 10.0, child: Image( - height: 137.67 * constants.scaleRatio, - width: 172 * constants.scaleRatio, + height: 0.180 * constants.screenHeight, + width: 0.450 * constants.screenWidth, image: AssetImage( 'assets/images/shopping_cart.png', ), diff --git a/gogrocy/lib/ui/views/city_selection.dart b/gogrocy/lib/ui/views/city_selection.dart index 7c1a1bf..08e9d61 100644 --- a/gogrocy/lib/ui/views/city_selection.dart +++ b/gogrocy/lib/ui/views/city_selection.dart @@ -94,6 +94,7 @@ class CitySelectionView extends StatelessWidget { String city = model.selectedCityTile == 1 ? "Jeypore" : "Sunabeda"; await _sharedPrefsService.setCity(city); + _navigationService.goBack(); _navigationService.navigateTo('home'); } }, diff --git a/gogrocy/lib/ui/views/login_view.dart b/gogrocy/lib/ui/views/login_view.dart index d5f4d9d..c298407 100644 --- a/gogrocy/lib/ui/views/login_view.dart +++ b/gogrocy/lib/ui/views/login_view.dart @@ -43,7 +43,7 @@ class LoginView extends StatelessWidget { spacing: 0.024 * constants.screenWidth, ), ),*/ - VerticalSpaces.extraLarge, + //VerticalSpaces.extraLarge, ], ), IgnorePointer( diff --git a/gogrocy/lib/ui/views/startup_view.dart b/gogrocy/lib/ui/views/startup_view.dart index 4a8a381..c9589aa 100644 --- a/gogrocy/lib/ui/views/startup_view.dart +++ b/gogrocy/lib/ui/views/startup_view.dart @@ -1,3 +1,4 @@ +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/material.dart'; import 'package:gogrocy/core/viewModels/startup_view_model.dart'; import 'package:gogrocy/ui/shared/constants.dart' as constants; diff --git a/gogrocy/lib/ui/widgets/details_form.dart b/gogrocy/lib/ui/widgets/details_form.dart index fcf6a21..1b4ba12 100644 --- a/gogrocy/lib/ui/widgets/details_form.dart +++ b/gogrocy/lib/ui/widgets/details_form.dart @@ -225,11 +225,8 @@ class _DetailsFormState extends State { fontWeight: FontWeight.bold), ), onPressed: () async { - assert(model.detailsFormKey.currentState.validate(), - "details form error"); var result = await model.signUpWithApi(); if (result) { - await FireStoreService.addUser( phoneNumber: widget.mobile, countryCode: widget.countryCode); diff --git a/gogrocy/lib/ui/widgets/onboarding_widget.dart b/gogrocy/lib/ui/widgets/onboarding_widget.dart index c0a10e7..b1e7911 100644 --- a/gogrocy/lib/ui/widgets/onboarding_widget.dart +++ b/gogrocy/lib/ui/widgets/onboarding_widget.dart @@ -19,7 +19,7 @@ class OnBoardingWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Align( - alignment: Alignment(-1.3 * constants.scaleRatio, 0.0), + alignment: Alignment(-0.500, 0.0), child: Image.asset( 'assets/images/woman.png', width: constants.OnBoardingConfig.illustrationWidth, diff --git a/gogrocy/lib/ui/widgets/vertical_spaces.dart b/gogrocy/lib/ui/widgets/vertical_spaces.dart index 18f82b6..d27db7b 100644 --- a/gogrocy/lib/ui/widgets/vertical_spaces.dart +++ b/gogrocy/lib/ui/widgets/vertical_spaces.dart @@ -3,7 +3,7 @@ import 'package:gogrocy/ui/shared/constants.dart' as constants; class VerticalSpaces { static SizedBox extraLarge = SizedBox( - height: 0.295 * constants.screenHeight, + height: 0.200 * constants.screenHeight, ); static SizedBox large = SizedBox( height: 0.0, diff --git a/gogrocy/pubspec.yaml b/gogrocy/pubspec.yaml index 362cde7..0fc6562 100644 --- a/gogrocy/pubspec.yaml +++ b/gogrocy/pubspec.yaml @@ -24,7 +24,7 @@ dependencies: connectivity: ^0.4.8+2 fancy_bottom_navigation: ^0.3.2 firebase_auth: any - #firebase_crashlytics: ^0.1.3+3 + firebase_crashlytics: 0.1.3 firebase_messaging: ^6.0.13 flushbar: 1.9.1 get_it: ^4.0.1 From 2d81c093c0fdff3b46f9f9328beb0171f257234b Mon Sep 17 00:00:00 2001 From: Thesmader Date: Sun, 3 May 2020 04:09:23 +0530 Subject: [PATCH 5/9] Remove loaders, fix scaling issues, add crashlytics. --- gogrocy/lib/ui/shared/constants.dart | 1 - gogrocy/lib/ui/views/address_form.dart | 4 +- gogrocy/lib/ui/views/address_view.dart | 4 +- gogrocy/lib/ui/views/cart/cart.dart | 4 +- gogrocy/lib/ui/views/city_selection.dart | 7 +- gogrocy/lib/ui/views/home/grid_list.dart | 6 +- gogrocy/lib/ui/views/home/home.dart | 6 +- gogrocy/lib/ui/views/orders/orders.dart | 6 +- gogrocy/lib/ui/widgets/details_form.dart | 2 +- .../ui/widgets/login_text_field_widget.dart | 198 ++++++++---------- gogrocy/lib/ui/widgets/onboarding_widget.dart | 4 +- gogrocy/lib/ui/widgets/otp_field.dart | 4 +- 12 files changed, 116 insertions(+), 130 deletions(-) diff --git a/gogrocy/lib/ui/shared/constants.dart b/gogrocy/lib/ui/shared/constants.dart index dca9b30..aded584 100644 --- a/gogrocy/lib/ui/shared/constants.dart +++ b/gogrocy/lib/ui/shared/constants.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; bool isLoggedIn = false; MediaQueryData mediaQueryData; -double scaleRatio = mediaQueryData.devicePixelRatio / 2.002; double screenHeight = mediaQueryData.size.height; double screenWidth = mediaQueryData.size.width; diff --git a/gogrocy/lib/ui/views/address_form.dart b/gogrocy/lib/ui/views/address_form.dart index 0c43a55..d217c88 100644 --- a/gogrocy/lib/ui/views/address_form.dart +++ b/gogrocy/lib/ui/views/address_form.dart @@ -29,7 +29,7 @@ class _AddressFormState extends State { key: addressFormKey, child: ListView( padding: - EdgeInsets.symmetric(horizontal: 20.0 * constants.scaleRatio), + EdgeInsets.symmetric(horizontal: 0.049 * constants.screenWidth), shrinkWrap: true, children: [ Text('What do we call you?'), @@ -168,7 +168,7 @@ class _AddressFormState extends State { VerticalSpaces.small20, Padding( padding: EdgeInsets.symmetric( - horizontal: 80 * constants.scaleRatio), + horizontal: 0.195 * constants.screenWidth), child: RaisedButton( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10.0)), diff --git a/gogrocy/lib/ui/views/address_view.dart b/gogrocy/lib/ui/views/address_view.dart index 4d9198d..59da63b 100644 --- a/gogrocy/lib/ui/views/address_view.dart +++ b/gogrocy/lib/ui/views/address_view.dart @@ -60,8 +60,8 @@ class _AddressViewState extends State { itemCount: model.addressList.length, itemBuilder: (BuildContext context, int index) => Padding( padding: EdgeInsets.symmetric( - horizontal: 10.0 * constants.scaleRatio, - vertical: 10.0 * constants.scaleRatio), + horizontal: 0.024 * constants.screenWidth, + vertical: 0.024 * constants.screenWidth), child: Card( elevation: 4.0, color: Colors.white, diff --git a/gogrocy/lib/ui/views/cart/cart.dart b/gogrocy/lib/ui/views/cart/cart.dart index f100214..fa85c41 100644 --- a/gogrocy/lib/ui/views/cart/cart.dart +++ b/gogrocy/lib/ui/views/cart/cart.dart @@ -92,8 +92,8 @@ class Cart extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox( - width: 60.0 * constants.scaleRatio, - height: 60.0 * constants.scaleRatio, + width: 0.146 * constants.screenWidth, + height: 0.146 * constants.screenWidth, child: Image( image: AssetImage("assets/images/empty-cart.png"), )), diff --git a/gogrocy/lib/ui/views/city_selection.dart b/gogrocy/lib/ui/views/city_selection.dart index 08e9d61..cf4afe6 100644 --- a/gogrocy/lib/ui/views/city_selection.dart +++ b/gogrocy/lib/ui/views/city_selection.dart @@ -25,7 +25,7 @@ class CitySelectionView extends StatelessWidget { Center( child: Text( 'Select City', - style: TextStyle(fontSize: 20.0 * constants.scaleRatio), + style: TextStyle(fontSize: 0.049 * constants.screenWidth), ), ), RadioListTile( @@ -50,8 +50,8 @@ class CitySelectionView extends StatelessWidget { ), Padding( padding: EdgeInsets.symmetric( - horizontal: 100.0 * constants.scaleRatio, - vertical: 50.0 * constants.scaleRatio), + horizontal: 0.336 * constants.screenWidth, + vertical: 0.059 * constants.screenHeight), child: RaisedButton( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10.0)), @@ -61,6 +61,7 @@ class CitySelectionView extends StatelessWidget { style: TextStyle( color: Colors.white, fontFamily: 'Gilroy', + fontSize: 0.039 * constants.screenWidth, fontWeight: FontWeight.bold), ), onPressed: () async { diff --git a/gogrocy/lib/ui/views/home/grid_list.dart b/gogrocy/lib/ui/views/home/grid_list.dart index a110222..78d6a75 100644 --- a/gogrocy/lib/ui/views/home/grid_list.dart +++ b/gogrocy/lib/ui/views/home/grid_list.dart @@ -127,8 +127,8 @@ class _GridListState extends State mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox( - width: 60.0 * constants.scaleRatio, - height: 60.0 * constants.scaleRatio, + width: 0.146 * constants.screenWidth, + height: 0.146 * constants.screenWidth, child: Image( image: AssetImage("assets/images/no_products.png"), )), @@ -136,7 +136,7 @@ class _GridListState extends State "You don't have any orders", textAlign: TextAlign.center, style: TextStyle( - fontSize: 18.0, + fontSize: 0.044 * constants.screenWidth, fontFamily: 'Gilroy', fontWeight: FontWeight.bold), ), diff --git a/gogrocy/lib/ui/views/home/home.dart b/gogrocy/lib/ui/views/home/home.dart index 6d869dc..c665b1f 100644 --- a/gogrocy/lib/ui/views/home/home.dart +++ b/gogrocy/lib/ui/views/home/home.dart @@ -31,7 +31,7 @@ class Home extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only(left: 16.0 * constants.scaleRatio), + padding: EdgeInsets.only(left: 0.055 * constants.screenWidth), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -40,7 +40,7 @@ class Home extends StatelessWidget { "What are you looking for?", style: TextStyle( fontFamily: 'Gilroy', - fontSize: 18, + fontSize: 0.044 * constants.screenWidth, fontWeight: FontWeight.bold), ), Padding( @@ -51,7 +51,7 @@ class Home extends StatelessWidget { "Choose from the widest selection of local produce", style: TextStyle( fontFamily: 'Gilroy', - fontSize: 13, + fontSize: 0.032 * constants.screenWidth, fontWeight: FontWeight.normal), ), ), diff --git a/gogrocy/lib/ui/views/orders/orders.dart b/gogrocy/lib/ui/views/orders/orders.dart index 3de7618..7994c35 100644 --- a/gogrocy/lib/ui/views/orders/orders.dart +++ b/gogrocy/lib/ui/views/orders/orders.dart @@ -205,8 +205,8 @@ class OrderView extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox( - width: 60.0 * constants.scaleRatio, - height: 60.0 * constants.scaleRatio, + width: 0.146 * constants.screenWidth, + height: 0.146 * constants.screenWidth, child: Image( image: AssetImage("assets/images/no_products.png"), )), @@ -214,7 +214,7 @@ class OrderView extends StatelessWidget { "You don't have any orders", textAlign: TextAlign.center, style: TextStyle( - fontSize: 18.0, + fontSize: 0.044 * constants.screenWidth, fontFamily: 'Gilroy', fontWeight: FontWeight.bold), ) diff --git a/gogrocy/lib/ui/widgets/details_form.dart b/gogrocy/lib/ui/widgets/details_form.dart index 1b4ba12..9d3db62 100644 --- a/gogrocy/lib/ui/widgets/details_form.dart +++ b/gogrocy/lib/ui/widgets/details_form.dart @@ -149,7 +149,7 @@ class _DetailsFormState extends State { VerticalSpaces.small20, Text( 'Create password', - style: TextStyle(fontSize: 14.0 * constants.scaleRatio), + style: TextStyle(fontSize: 0.034 * constants.screenWidth), ), VerticalSpaces.small10, SizedBox( diff --git a/gogrocy/lib/ui/widgets/login_text_field_widget.dart b/gogrocy/lib/ui/widgets/login_text_field_widget.dart index 9b5ebe5..fd971e2 100644 --- a/gogrocy/lib/ui/widgets/login_text_field_widget.dart +++ b/gogrocy/lib/ui/widgets/login_text_field_widget.dart @@ -63,15 +63,15 @@ class _LoginTextFieldWidgetState extends State { PinCodeTextField otpTextField, LoginModel model}) { return Padding( - padding: EdgeInsets.symmetric(horizontal: 16 * constants.scaleRatio), + padding: EdgeInsets.symmetric(horizontal: 0.0365 * constants.screenWidth), child: Container( decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.circular(14.0 * constants.scaleRatio), + borderRadius: BorderRadius.circular(0.039 * constants.screenWidth), ), child: Padding( padding: EdgeInsets.symmetric( - horizontal: 16 * constants.scaleRatio, + horizontal: 0.039 * constants.screenWidth, ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, @@ -82,7 +82,7 @@ class _LoginTextFieldWidgetState extends State { style: TextStyle( fontWeight: FontWeight.bold, fontFamily: 'Gilroy', - fontSize: 18 * constants.scaleRatio), + fontSize: 0.044 * constants.screenWidth), ), Row( children: [ @@ -100,14 +100,14 @@ class _LoginTextFieldWidgetState extends State { hintText: 'Country code', border: OutlineInputBorder( borderRadius: BorderRadius.circular( - 10.0 * constants.scaleRatio, + 0.024 * constants.screenWidth, ), ), ), ), ), SizedBox( - width: 7.851 * constants.scaleRatio, + width: 0.019 * constants.screenWidth, ), Expanded( flex: 4, @@ -117,65 +117,55 @@ class _LoginTextFieldWidgetState extends State { flex: 0, child: Visibility( visible: phoneFocusNode.hasFocus, - child: model.state == ViewState.Idle - ? IconButton( - icon: Icon( - Icons.check_circle_outline, - color: model.hasConnection - ? primaryColor - : Colors.grey, - size: 31.404 * constants.scaleRatio, - ), - onPressed: () async { - if (model.loginFormKey.currentState - .validate()) { - if (model.hasConnection) { - var status = await model.getUserStatus( - phoneController.text, - countryCodeController.text); - print(status); - switch (status) { - case '0': - controller.animateToPage(1, - duration: - Duration(milliseconds: 250), - curve: Curves.easeOut); - model.loginWithPhone( - context: context, - phoneNumber: phoneController.text, - countryCode: - countryCodeController.text); + child: IconButton( + icon: Icon( + Icons.check_circle_outline, + color: + model.hasConnection ? primaryColor : Colors.grey, + size: 0.0976 * constants.screenWidth, + ), + onPressed: () async { + if (model.loginFormKey.currentState.validate()) { + if (model.hasConnection) { + var status = await model.getUserStatus( + phoneController.text, + countryCodeController.text); + print(status); + switch (status) { + case '0': + controller.animateToPage(1, + duration: Duration(milliseconds: 250), + curve: Curves.easeOut); + model.loginWithPhone( + context: context, + phoneNumber: phoneController.text, + countryCode: countryCodeController.text); - break; - case '1': - controller.animateToPage(1, - duration: - Duration(milliseconds: 250), - curve: Curves.easeOut); - model.loginWithPhone( - context: context, - phoneNumber: phoneController.text, - countryCode: - countryCodeController.text); - break; - case '2': - setState(() { - userSignedUp = true; - }); - controller.animateToPage(1, - duration: - Duration(milliseconds: 250), - curve: Curves.easeOut); - } - } else { - model.loginScaffoldKey.currentState - .showSnackBar( - SnackBars.noInternetSnackBar); - } - } - }, - ) - : CircularProgressIndicator(), + break; + case '1': + controller.animateToPage(1, + duration: Duration(milliseconds: 250), + curve: Curves.easeOut); + model.loginWithPhone( + context: context, + phoneNumber: phoneController.text, + countryCode: countryCodeController.text); + break; + case '2': + setState(() { + userSignedUp = true; + }); + controller.animateToPage(1, + duration: Duration(milliseconds: 250), + curve: Curves.easeOut); + } + } else { + model.loginScaffoldKey.currentState + .showSnackBar(SnackBars.noInternetSnackBar); + } + } + }, + ), ), ), ], @@ -223,24 +213,22 @@ class _LoginTextFieldWidgetState extends State { flex: 0, child: Padding( padding: - EdgeInsets.only(left: 6.318 * constants.scaleRatio), + EdgeInsets.only(left: 0.0146 * constants.screenWidth), child: Visibility( visible: passwordFocusNode.hasFocus, - child: model.state == ViewState.Idle - ? IconButton( - icon: Icon( - Icons.check_circle_outline, - color: primaryColor, - size: 0.094 * constants.screenWidth, - ), - onPressed: () async { - model.loginWithApi( - phoneNumber: phoneController.text, - countryCode: countryCodeController.text, - password: passwordController.text); - }, - ) - : CircularProgressIndicator(), + child: IconButton( + icon: Icon( + Icons.check_circle_outline, + color: primaryColor, + size: 0.094 * constants.screenWidth, + ), + onPressed: () async { + model.loginWithApi( + phoneNumber: phoneController.text, + countryCode: countryCodeController.text, + password: passwordController.text); + }, + ), ), ), ), @@ -303,32 +291,30 @@ class _LoginTextFieldWidgetState extends State { child: Padding( padding: EdgeInsets.only(left: 0.019 * constants.screenWidth), - child: model.state == ViewState.Idle - ? IconButton( - icon: Icon( - Icons.check_circle_outline, - color: primaryColor, - size: 0.094 * constants.screenWidth, - ), - onPressed: () { - if (otpController.text.length == 6) { - model.loginWithOtp( - otp: otpController.text, - phoneNumber: phoneController.text, - context: context, - countryCode: countryCodeController.text); - SystemChannels.textInput - .invokeMethod('TextInput.hide'); - } else { - Flushbar( - message: 'OTP must be 6 digits', - duration: Duration(seconds: 2), - ).show(context); - } - //Navigator.of(context).pushNamed('awesome'); - }, - ) - : CircularProgressIndicator(), + child: IconButton( + icon: Icon( + Icons.check_circle_outline, + color: primaryColor, + size: 0.094 * constants.screenWidth, + ), + onPressed: () { + if (otpController.text.length == 6) { + model.loginWithOtp( + otp: otpController.text, + phoneNumber: phoneController.text, + context: context, + countryCode: countryCodeController.text); + SystemChannels.textInput + .invokeMethod('TextInput.hide'); + } else { + Flushbar( + message: 'OTP must be 6 digits', + duration: Duration(seconds: 2), + ).show(context); + } + //Navigator.of(context).pushNamed('awesome'); + }, + ), ), ), ], diff --git a/gogrocy/lib/ui/widgets/onboarding_widget.dart b/gogrocy/lib/ui/widgets/onboarding_widget.dart index b1e7911..dcd093f 100644 --- a/gogrocy/lib/ui/widgets/onboarding_widget.dart +++ b/gogrocy/lib/ui/widgets/onboarding_widget.dart @@ -29,8 +29,8 @@ class OnBoardingWidget extends StatelessWidget { Padding( padding: EdgeInsets.only(top: 0.021 * constants.screenHeight), child: SizedBox( - width: 203 * constants.scaleRatio, - height: 40.0 * constants.scaleRatio, + width: 0.493 * constants.screenWidth, + height: 0.049 * constants.screenHeight, child: Text( 'The widest selection of home essentials just a few taps away', textAlign: TextAlign.center, diff --git a/gogrocy/lib/ui/widgets/otp_field.dart b/gogrocy/lib/ui/widgets/otp_field.dart index daba0b0..f71e099 100644 --- a/gogrocy/lib/ui/widgets/otp_field.dart +++ b/gogrocy/lib/ui/widgets/otp_field.dart @@ -20,8 +20,8 @@ class OtpTextField extends StatelessWidget { autoDisposeControllers: false, length: 6, - fieldHeight: 34 * constants.scaleRatio, - fieldWidth: 32 * constants.scaleRatio, + fieldHeight: 0.05 * constants.screenHeight, + fieldWidth: 0.09 * constants.screenWidth, shape: PinCodeFieldShape.box, borderRadius: BorderRadius.circular(12.0), borderWidth: 1.50, From 458e76003f89dd4b8456f96a4abe87fd94fc7703 Mon Sep 17 00:00:00 2001 From: Thesmader Date: Sun, 3 May 2020 04:11:46 +0530 Subject: [PATCH 6/9] disable crashlytics in dev mode --- gogrocy/lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gogrocy/lib/main.dart b/gogrocy/lib/main.dart index 7e7c1f2..63469ff 100644 --- a/gogrocy/lib/main.dart +++ b/gogrocy/lib/main.dart @@ -14,7 +14,7 @@ import 'package:url_launcher/url_launcher.dart'; import 'package:gogrocy/ui/shared/constants.dart' as constants; void main() { - Crashlytics.instance.enableInDevMode = true; +// Crashlytics.instance.enableInDevMode = true; FlutterError.onError = Crashlytics.instance.recordFlutterError; setupLocator(); runApp(GoGrocyApp()); From 243d21f848f31622a52630ba07b45d3b8607dd75 Mon Sep 17 00:00:00 2001 From: DesignrKnight Date: Sun, 3 May 2020 16:42:18 +0530 Subject: [PATCH 7/9] Remove OTP Password confusion --- gogrocy/lib/ui/widgets/login_text_field_widget.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gogrocy/lib/ui/widgets/login_text_field_widget.dart b/gogrocy/lib/ui/widgets/login_text_field_widget.dart index fd971e2..c4abbf4 100644 --- a/gogrocy/lib/ui/widgets/login_text_field_widget.dart +++ b/gogrocy/lib/ui/widgets/login_text_field_widget.dart @@ -78,7 +78,7 @@ class _LoginTextFieldWidgetState extends State { mainAxisSize: MainAxisSize.max, children: [ Text( - 'Let\'s Begin', + 'Let\'s Begin ', style: TextStyle( fontWeight: FontWeight.bold, fontFamily: 'Gilroy', @@ -171,7 +171,8 @@ class _LoginTextFieldWidgetState extends State { ], ), Text( - 'You will receive an OTP for verifying this number', + 'Verification will be done via OTP for new users and via password for existing users', + textAlign: TextAlign.center, ), ], ), From 0076fcafe478e6170b3e4cf6577e4d0bea6c3f99 Mon Sep 17 00:00:00 2001 From: Thesmader Date: Sun, 3 May 2020 17:31:40 +0530 Subject: [PATCH 8/9] Patch: Fixed scaling issues --- gogrocy/lib/ui/shared/constants.dart | 2 +- gogrocy/lib/ui/views/login_view.dart | 2 +- gogrocy/lib/ui/views/signup_view.dart | 192 +++++++++--------- gogrocy/lib/ui/widgets/details_form.dart | 13 +- gogrocy/lib/ui/widgets/onboarding_widget.dart | 2 +- gogrocy/lib/ui/widgets/vertical_spaces.dart | 2 +- 6 files changed, 108 insertions(+), 105 deletions(-) diff --git a/gogrocy/lib/ui/shared/constants.dart b/gogrocy/lib/ui/shared/constants.dart index aded584..004c0dc 100644 --- a/gogrocy/lib/ui/shared/constants.dart +++ b/gogrocy/lib/ui/shared/constants.dart @@ -22,7 +22,7 @@ class SignUpConfig { class OnBoardingConfig { static double illustrationWidth = 0.769 * screenWidth; - static double illustrationHeight = 0.478 * screenHeight; + static double illustrationHeight = 0.468 * screenHeight; static double footerTextSize = 0.034 * screenWidth; } diff --git a/gogrocy/lib/ui/views/login_view.dart b/gogrocy/lib/ui/views/login_view.dart index c298407..b1f0bbc 100644 --- a/gogrocy/lib/ui/views/login_view.dart +++ b/gogrocy/lib/ui/views/login_view.dart @@ -29,7 +29,7 @@ class LoginView extends StatelessWidget { children: [ Hero(tag: 'GoGrocy', child: TitleText()), OnBoardingWidget(controller), - VerticalSpaces.small10, + VerticalSpaces.extraLarge, /*SmoothPageIndicator( controller: controller, count: 3, diff --git a/gogrocy/lib/ui/views/signup_view.dart b/gogrocy/lib/ui/views/signup_view.dart index 9c57fc2..c30f036 100644 --- a/gogrocy/lib/ui/views/signup_view.dart +++ b/gogrocy/lib/ui/views/signup_view.dart @@ -69,96 +69,86 @@ class _SignUpViewState extends State mobile: widget.mobile, countryCode: widget.countryCode), child: Consumer( - builder: (context, model, child) => Scaffold( - backgroundColor: Colors.white, - body: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: SizedBox( - height: constants.screenHeight + 60.0, - width: constants.screenWidth, - child: Stack( - children: [ - Positioned( - right: 0.0, - child: SlideTransition( - position: Tween( - begin: Offset.zero, - end: Offset(1.0, 0.5), - ).animate(CurvedAnimation( - parent: _womanScaleController, - curve: Interval(0.5, 1.0, curve: Curves.easeOut), - )), - child: ScaleTransition( - scale: model.womanScaleAnimation, - child: Image.asset( - 'assets/images/awesome_woman.png', - height: constants.screenHeight, - width: constants.screenWidth, + builder: (context, model, child) => SafeArea( + child: Scaffold( + backgroundColor: Colors.white, + body: SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: SizedBox( + height: constants.screenHeight * 1.189, + width: constants.screenWidth, + child: Stack( + children: [ + Positioned( + right: 0.0, + child: SlideTransition( + position: Tween( + begin: Offset.zero, + end: Offset(1.0, 0.5), + ).animate(CurvedAnimation( + parent: _womanScaleController, + curve: Interval(0.5, 1.0, curve: Curves.easeOut), + )), + child: ScaleTransition( + scale: model.womanScaleAnimation, + child: Image.asset( + 'assets/images/awesome_woman.png', + height: constants.screenHeight, + width: constants.screenWidth, + ), ), ), ), - ), - AnimatedPositioned( - duration: Duration(milliseconds: 500), - curve: Curves.easeOut, - left: first ? 40.0 : 0.0, - top: first ? 80.0 : 40.0, - child: ScaleTransition( - scale: model.awesomeTextScaleAnimation, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - verticalDirection: VerticalDirection.down, - children: [ - Padding( - padding: EdgeInsets.only( - left: 0.047 * constants.screenWidth), - child: RichText( - text: TextSpan( - text: '', - children: [ - TextSpan( - text: 'Awesome', - style: TextStyle( - color: Colors.black, - fontSize: 0.113 * constants.screenWidth, - fontWeight: FontWeight.bold, - fontFamily: 'Gilroy', - ), - ), - TextSpan( - text: '!', - style: TextStyle( - color: Colors.green, - fontSize: 0.113 * constants.screenWidth, - fontWeight: FontWeight.bold, - fontFamily: 'Gilroy', + AnimatedPositioned( + duration: Duration(milliseconds: 500), + curve: Curves.easeOut, + left: first ? 40.0 : 0.0, + top: first ? 80.0 : 40.0, + child: ScaleTransition( + scale: model.awesomeTextScaleAnimation, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + verticalDirection: VerticalDirection.down, + children: [ + Padding( + padding: EdgeInsets.only( + left: 0.047 * constants.screenWidth), + child: RichText( + text: TextSpan( + text: '', + children: [ + TextSpan( + text: 'Awesome', + style: TextStyle( + color: Colors.black, + fontSize: 0.113 * constants.screenWidth, + fontWeight: FontWeight.bold, + fontFamily: 'Gilroy', + ), ), - ) - ], - ), - ), - ), - Padding( - padding: EdgeInsets.only( - left: 0.047 * constants.screenWidth), - child: AnimatedCrossFade( - crossFadeState: first - ? CrossFadeState.showFirst - : CrossFadeState.showSecond, - duration: Duration(milliseconds: 400), - firstChild: Text( - 'Welcome on board', - style: TextStyle( - color: Colors.green, - fontSize: 0.042 * constants.screenWidth, - fontFamily: 'Gilroy', - fontWeight: FontWeight.bold, + TextSpan( + text: '!', + style: TextStyle( + color: Colors.green, + fontSize: 0.113 * constants.screenWidth, + fontWeight: FontWeight.bold, + fontFamily: 'Gilroy', + ), + ) + ], ), ), - secondChild: SizedBox( - width: 0.543 * constants.screenWidth, - child: Text( - 'A couple more things before we get you started', + ), + Padding( + padding: EdgeInsets.only( + left: 0.047 * constants.screenWidth), + child: AnimatedCrossFade( + crossFadeState: first + ? CrossFadeState.showFirst + : CrossFadeState.showSecond, + duration: Duration(milliseconds: 400), + firstChild: Text( + 'Welcome on board', style: TextStyle( color: Colors.green, fontSize: 0.042 * constants.screenWidth, @@ -166,21 +156,33 @@ class _SignUpViewState extends State fontWeight: FontWeight.bold, ), ), + secondChild: SizedBox( + width: 0.543 * constants.screenWidth, + child: Text( + 'A couple more things before we get you started', + style: TextStyle( + color: Colors.green, + fontSize: 0.042 * constants.screenWidth, + fontFamily: 'Gilroy', + fontWeight: FontWeight.bold, + ), + ), + ), ), ), - ), - SizedBox(height: 0.035 * constants.screenHeight), - Padding( - padding: EdgeInsets.only( - left: 0.047 * constants.screenWidth), - child: DetailsForm(_womanScaleController, - widget.mobile, widget.countryCode), - ), - ], + SizedBox(height: 0.035 * constants.screenHeight), + Padding( + padding: EdgeInsets.only( + left: 0.047 * constants.screenWidth), + child: DetailsForm(_womanScaleController, + widget.mobile, widget.countryCode), + ), + ], + ), ), ), - ), - ], + ], + ), ), ), ), diff --git a/gogrocy/lib/ui/widgets/details_form.dart b/gogrocy/lib/ui/widgets/details_form.dart index ddb745d..b156d9b 100644 --- a/gogrocy/lib/ui/widgets/details_form.dart +++ b/gogrocy/lib/ui/widgets/details_form.dart @@ -225,17 +225,18 @@ class _DetailsFormState extends State { fontWeight: FontWeight.bold), ), onPressed: () async { - var result = await model.signUpWithApi(); - if (result) { - FireStoreService.addUser( - phoneNumber: widget.mobile, - countryCode: widget.countryCode); + if (model.detailsFormKey.currentState.validate()) { + var result = await model.signUpWithApi(); + if (result) { + FireStoreService.addUser( + phoneNumber: widget.mobile, + countryCode: widget.countryCode); + } } }, ) : Center(child: CircularProgressIndicator()), ), - VerticalSpaces.small10, ], ), ), diff --git a/gogrocy/lib/ui/widgets/onboarding_widget.dart b/gogrocy/lib/ui/widgets/onboarding_widget.dart index dcd093f..8363b31 100644 --- a/gogrocy/lib/ui/widgets/onboarding_widget.dart +++ b/gogrocy/lib/ui/widgets/onboarding_widget.dart @@ -27,7 +27,7 @@ class OnBoardingWidget extends StatelessWidget { ), ), Padding( - padding: EdgeInsets.only(top: 0.021 * constants.screenHeight), + padding: EdgeInsets.only(top: 0.005 * constants.screenHeight), child: SizedBox( width: 0.493 * constants.screenWidth, height: 0.049 * constants.screenHeight, diff --git a/gogrocy/lib/ui/widgets/vertical_spaces.dart b/gogrocy/lib/ui/widgets/vertical_spaces.dart index d27db7b..aa48883 100644 --- a/gogrocy/lib/ui/widgets/vertical_spaces.dart +++ b/gogrocy/lib/ui/widgets/vertical_spaces.dart @@ -3,7 +3,7 @@ import 'package:gogrocy/ui/shared/constants.dart' as constants; class VerticalSpaces { static SizedBox extraLarge = SizedBox( - height: 0.200 * constants.screenHeight, + height: 0.250 * constants.screenHeight, ); static SizedBox large = SizedBox( height: 0.0, From e06575acd77d1f31112d1f6f655a71b8f2999512 Mon Sep 17 00:00:00 2001 From: Thesmader Date: Sun, 3 May 2020 17:45:57 +0530 Subject: [PATCH 9/9] Update version --- gogrocy/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gogrocy/pubspec.yaml b/gogrocy/pubspec.yaml index 6dcbb77..89daa6e 100644 --- a/gogrocy/pubspec.yaml +++ b/gogrocy/pubspec.yaml @@ -11,7 +11,7 @@ description: Gogrocy mobile app # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.1.1+4 +version: 1.1.2+5 environment: sdk: ">=2.1.0 <3.0.0"