Coder Social home page Coder Social logo

ahmedlsayed9 / deliverzler Goto Github PK

View Code? Open in Web Editor NEW
525.0 27.0 146.0 18.67 MB

Delivery App for Restaurants built on Flutter using Domain-Driven Design (DDD) and Layered Architecture along with Riverpod Framework.

Kotlin 0.09% JavaScript 0.13% Swift 0.53% Objective-C 0.01% Dart 98.87% Ruby 0.36%
dart flutter ddd layered-architecture riverpod clean-code domain-driven-design fcm firebase go-router

deliverzler's Introduction

Deliverzler

An open-source Delivery App for Restaurants built on Flutter using Domain-Driven Design (DDD) and Layered Architecture along with Riverpod Framework, Firebase as backend, Navigation 2.0 (GoRouter), Google Maps, Live Tracking, Local Notifications, FCM Notifications, Cloud Functions, Flutter Hooks, Freezed, RxDart, FpDart and more.

Architecture Diagram:

Image

Folder Structure:

  • lib
    • features
      • feature1
        • presentation
          • screens
          • components
          • providers (all providers that have observable state used by the view)
        • domain
          • entities, aggregates and value objects
          • services (encapsulate application and business logic, if any)
        • infrastructure
          • repos and facades
          • dtos
          • data_sources

Note: This is my current approach and architecture. In addition, the repository includes other branches that implement TDD and Clean Architecture approach if you're interested:

  • clean-arch branch: TDD and Clean Architecture approach using Riverpod 2.0 with code generation.
  • clean-arch-no-code-gen branch: TDD and Clean Architecture approach using Riverpod 2.0 without code generation.

ScreenShots

Image Image Image Image Image Image Image Image

Instructions to run the project

  1. Create Firebase project and add it to your Flutter app ( Follow https://firebase.google.com/docs/flutter/setup instructions).
  2. Add user manually at Firebase Auth to login with (This for testing as registration should be done with another Admin app).
  3. Add user data (id field from previous step - User UID) and some orders to show at your Firebase Firestore similar to the following model architecture:

Image Image

  1. Configure an API project with the Google Maps Platform and enable Maps SDK for Android/iOS (FREE) to be able to open the map. Also, enable Directions/ Geolocation/Places APIs to enable other map features as search and live tracking (You have to create a billing account to use these APIs).
  2. Add your Google Map API Keys to the configs.template folder then rename the folder to configs.
  3. [Optional]: deploy functions within the project to Firebase Cloud Functions to receive FCM notifications when new order is ready to be delivered.
  4. Run the project using the command flutter run --dart-define-from-file=configs/{flavor}.json, or from VSCode using the predefined launch configurations.

Features

  • Using Riverpod Framework with code generation (Most recommended) integrated with Flutter Hooks & Freezed.
  • Simplified Layered architecture by relying on Riverpod to catch exceptions and auto convert it to AsyncError instead of the traditional Result/Either pattern, which reduce lots of boilerplate code.
  • Navigation 2.0 (declarative routing) with GoRouter using the code generation variant and implementing nested navigation.
  • Functional Programming: FpDart(Option in particular) & RxDart.
  • Firebase Firestore as the backend with Firebase Storage, FCM and Cloud Functions.
  • Receive Local notification when arrive client's location and the ability to call him or confirm the order.
  • Receive FCM notification in (Foreground/Background/Terminated) when new order is ready to be delivered.
  • Real-Time Changes from Firebase using Streams, Refreshing current stream capability.
  • Optimized live location tracking using RxDart and updating delivery data on changes.
  • Search places and update its information on map using Google Map Autocomplete & Place Details.
  • Live tracking on map using Place Directions, Perform actions when arrive client's location.
  • Responsive UI, Platform-Aware Widgets, Multi-Themes, Internationalization & Localization (Using Flutter without external packages).
  • Well documented features and Unit Tests.

Business Logic

  • The app can be used by multiple delivery drivers in the restaurant. Also, you can make it work for Multi-Vendor apps.
  • Only login screen for employee. You should authorize them in the backend by an admin app.
  • Home screen will show stream of delivery orders that are ready to be delivered upcoming or is delivering onTheWay.
  • Any employee can see order details and deliver upcoming orders.
  • Employee can deliver multiple orders.
  • Only the employee that are delivering the order can confirm/cancel or show map of the order.
  • If the client provided his location "in the client app" it'll be loaded to the map, otherwise employee can search for the location (new session token used for every search session to reduce Google Maps bill).
  • When the order arrive to the destination by (200 meter) employee responsible for the order will get local notification and will be able to confirm and call the client on the map.
  • If the delivery driver location changed with both (5seconds & 50meter change in distance), it'll update delivery geoPoint on the backend (for all his current delivering orders, so the clients can listen to it) and will update map directions (for only the opened map, if any).
  • When new order is added to the backend (delivery order). All employees will get notification from FCM (works with app in foreground, background or terminated).
  • Employee can add/edit his info at the profile screen.

Appreciation: I was inspired by @RandalSchwartz to adopt and implement DDD Layered architecture with Riverpod Framework. Also, ResoCoder’s DDD course (outdated) was a helpful start point to get some ideas about implementing DDD Layered architecture in Flutter.

Give a ⭐️ if you like the project.. Thanks!

deliverzler's People

Contributors

ahmedlsayed9 avatar earodriguezm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deliverzler's Issues

Co Developer!

Hey Man!
Great work youve got here
Im tryna get to make your app work on my device but i keep getting numerous errors after downloding the zip and running pub get.
any ide on how this might work?
I would love to build on this.
Thanks and ill await your reply.
TOLUCODES

I need database

Hello, I can't find google-service.info in ios on project. So, I don't know architecture your database. Please give me your database on firebase firestore. Thanks

Localization issues

Hi there, am facing localizations issue on line 28, app_localization.dart:

Exception has occurred. LateError (LateInitializationError: Field '_prefs@1795470296' has not been initialized.)

Also, there are some other bugs with StorageService similar to this. Like both storing and retrieving are not working.

I'm using Android 11, Redmi 9T Pro/K20 Pro and Flutter 2.10.1 with all other configurations as the same. Commenting out the errors works and login and everything else is working too.

Let me know how to fix this.

Google maps widget error

Launching lib\main.dart on sdk gphone x86 in debug mode...
Parameter format not correct -
√  Built build\app\outputs\flutter-apk\app-debug.apk.
D/FlutterLocationService( 2093): Creating service.
D/FlutterLocationService( 2093): Binding to location service.
I/.appz.deliverz( 2093): Background young concurrent copying GC freed 18376(1138KB) AllocSpace objects, 10(248KB) LOS objects, 31% free, 3160KB/4619KB, paused 8.875ms total 201.561ms
Connecting to VM Service at ws://127.0.0.1:59058/HYbSBSmbPqE=/ws
I/FA      ( 2093): Tag Manager is not found and thus will not be used
I/flutter ( 2093): Connectivity stream has been initialized!!
I/flutter ( 2093): Connection status changed : InternetConnectionStatus.connected
I/flutter ( 2093): Connection status changed: ConnectivityResult.wifi
I/flutter ( 2093): User granted permission: AuthorizationStatus.authorized
W/FlutterJNI( 2093): FlutterJNI.loadLibrary called more than once
I/ResourceExtractor( 2093): Found extracted resources res_timestamp-1-1647229361710
W/FlutterJNI( 2093): FlutterJNI.init called more than once
W/FlutterJNI( 2093): FlutterJNI.prefetchDefaultFontManager called more than once
I/FLTFireBGExecutor( 2093): Creating background FlutterEngine instance, with args: [--start-paused, --enable-dart-profiling]
D/EGL_emulation( 2093): eglCreateContext: 0xebb8efd0: maj 3 min 0 rcv 3
D/EGL_emulation( 2093): eglCreateContext: 0xebb8e0f0: maj 3 min 0 rcv 3
D/HostConnection( 2093): HostConnection::get() New Host Connection established 0xebb8bd80, tid 2618
D/HostConnection( 2093): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation( 2093): eglMakeCurrent: 0xebb8e0f0: ver 3 0 (tinfo 0xb5dcc590) (first time)
D/PathProviderPlugin( 2093): Use TaskQueues.
I/FLTFireMsgService( 2093): FlutterFirebaseMessagingBackgroundService started!
I/.appz.deliverz( 2093): Background young concurrent copying GC freed 7766(706KB) AllocSpace objects, 22(632KB) LOS objects, 30% free, 3194KB/4619KB, paused 316us total 167.674ms
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
I/FirebaseAuth( 2093): [FirebaseAuth:] Preparing to create service connection to fallback implementation
W/DynamiteModule( 2093): Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found.
W/System  ( 2093): Ignoring header X-Firebase-Locale because its value was null.
I/DynamiteModule( 2093): Considering local module com.google.android.gms.providerinstaller.dynamite:0 and remote module com.google.android.gms.providerinstaller.dynamite:0
W/ProviderInstaller( 2093): Failed to load providerinstaller module: No acceptable module com.google.android.gms.providerinstaller.dynamite found. Local version is 0 and remote version is 0.
I/.appz.deliverz( 2093): The ClassLoaderContext is a special shared library.
V/NativeCrypto( 2093): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 294 native methods...
W/.appz.deliverz( 2093): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (greylist, reflection, allowed)
W/.appz.deliverz( 2093): Reducing the number of considered missed Gc histogram windows from 183 to 100
I/ProviderInstaller( 2093): Installed default security provider GmsCore_OpenSSL
W/.appz.deliverz( 2093): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (greylist, reflection, allowed)
W/.appz.deliverz( 2093): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, linking, allowed)
W/.appz.deliverz( 2093): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, linking, allowed)
D/FirebaseAuth( 2093): Notifying id token listeners about user ( eFAGAvOhKPU0DrHJMJOHGnHYEop2 ).
W/.appz.deliverz( 2093): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (greylist, reflection, allowed)
W/.appz.deliverz( 2093): Accessing hidden method Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy; (greylist,core-platform-api, linking, allowed)
W/.appz.deliverz( 2093): Accessing hidden method Ldalvik/system/BlockGuard$Policy;->onNetwork()V (greylist, linking, allowed)
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/FlutterLocationService( 2093): Start service in foreground mode.
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/FlutterLocationService( 2093): Service already in foreground mode.
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
I/flutter ( 2093): orders/FQxAoSuN6fMbiX4UNOc9: {deliveryGeoPoint: Instance of 'GeoPoint'}
I/.appz.deliverz( 2093): Background young concurrent copying GC freed 36(63KB) AllocSpace objects, 0(0B) LOS objects, 3% free, 4477KB/4619KB, paused 8.536ms total 16.901ms

════════ Exception caught by widgets library ═══════════════════════════════════
The following NoSuchMethodError was thrown building MapFloatingSearchBar(dirty, dependencies: [_LocalizationsScope-[GlobalKey#b35f5], UncontrolledProviderScope], state: _ConsumerState#42cd9):
Class 'StatefulElement' has no instance getter 'textTheme'.
Receiver: Instance of 'StatefulElement'
Tried calling: textTheme

The relevant error-causing widget was
MapFloatingSearchBar
When the exception was thrown, this was the stack
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
#1      FontStyles.mapSearchBarFontStyle
#2      MapFloatingSearchBar.build
#3      _ConsumerState.build
#4      StatefulElement.build
#5      ConsumerStatefulElement.build
#6      ComponentElement.performRebuild
#7      StatefulElement.performRebuild
#8      Element.rebuild
#9      ComponentElement._firstBuild
#10     StatefulElement._firstBuild
#11     ComponentElement.mount
#12     Element.inflateWidget
#13     MultiChildRenderObjectElement.inflateWidget
#14     MultiChildRenderObjectElement.mount
#15     Element.inflateWidget
#16     MultiChildRenderObjectElement.inflateWidget
#17     Element.updateChild
#18     RenderObjectElement.updateChildren
#19     MultiChildRenderObjectElement.update
#20     Element.updateChild
#21     ComponentElement.performRebuild
#22     Element.rebuild
#23     StatelessElement.update
#24     Element.updateChild
#25     ComponentElement.performRebuild
#26     Element.rebuild
#27     ProxyElement.update
#28     Element.updateChild
#29     ComponentElement.performRebuild
#30     Element.rebuild
#31     ProxyElement.update
#32     Element.updateChild
#33     RenderObjectElement.updateChildren
#34     MultiChildRenderObjectElement.update
#35     Element.updateChild
#36     ComponentElement.performRebuild
#37     StatefulElement.performRebuild
#38     Element.rebuild
#39     StatefulElement.update
#40     Element.updateChild
#41     ComponentElement.performRebuild
#42     Element.rebuild
#43     ProxyElement.update
#44     Element.updateChild
#45     ComponentElement.performRebuild
#46     StatefulElement.performRebuild
#47     Element.rebuild
#48     StatefulElement.update
#49     Element.updateChild
#50     SingleChildRenderObjectElement.update
#51     Element.updateChild
#52     ComponentElement.performRebuild
#53     Element.rebuild
#54     StatelessElement.update
#55     Element.updateChild
#56     SingleChildRenderObjectElement.update
#57     Element.updateChild
#58     ComponentElement.performRebuild
#59     StatefulElement.performRebuild
#60     Element.rebuild
#61     StatefulElement.update
#62     Element.updateChild
#63     ComponentElement.performRebuild
#64     StatefulElement.performRebuild
#65     Element.rebuild
#66     StatefulElement.update
#67     Element.updateChild
#68     ComponentElement.performRebuild
#69     Element.rebuild
#70     ProxyElement.update
#71     Element.updateChild
#72     ComponentElement.performRebuild
#73     Element.rebuild
#74     StatelessElement.update
#75     Element.updateChild
#76     ComponentElement.performRebuild
#77     StatefulElement.performRebuild
#78     Element.rebuild
#79     StatefulElement.update
#80     Element.updateChild
#81     ComponentElement.performRebuild
#82     Element.rebuild
#83     ProxyElement.update
#84     Element.updateChild
#85     ComponentElement.performRebuild
#86     StatefulElement.performRebuild
#87     Element.rebuild
#88     StatefulElement.update
#89     Element.updateChild
#90     ComponentElement.performRebuild
#91     Element.rebuild
#92     ProxyElement.update
#93     Element.updateChild
#94     SingleChildRenderObjectElement.update
#95     Element.updateChild
#96     ComponentElement.performRebuild
#97     Element.rebuild
#98     StatelessElement.update
#99     Element.updateChild
#100    ComponentElement.performRebuild
#101    StatefulElement.performRebuild
#102    Element.rebuild
#103    StatefulElement.update
#104    Element.updateChild
#105    ComponentElement.performRebuild
#106    Element.rebuild
#107    StatelessElement.update
#108    Element.updateChild
#109    ComponentElement.performRebuild
#110    StatefulElement.performRebuild
#111    Element.rebuild
#112    BuildOwner.buildScope
#113    WidgetsBinding.drawFrame
#114    RendererBinding._handlePersistentFrameCallback
#115    SchedulerBinding._invokeFrameCallback
#116    SchedulerBinding.handleDrawFrame
#117    SchedulerBinding._handleDrawFrame
#121    _invoke (dart:ui/hooks.dart:151:10)
#122    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#123    _drawFrame (dart:ui/hooks.dart:115:31)
(elided 3 frames from dart:async)
════════════════════════════════════════════════════════════════════════════════
I/zzbz    ( 2093): Making Creator dynamically
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
W/Gralloc4( 2093): allocator 3.x is not supported
I/DynamiteModule( 2093): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:203115000
I/DynamiteModule( 2093): Selected remote version of com.google.android.gms.maps_dynamite, version >= 203115000
V/DynamiteModule( 2093): Dynamite loader version >= 2, using loadModule2NoCrashUtils
I/Google Maps Android API( 2093): Google Play services client version: 12451000
I/Google Maps Android API( 2093): Google Play services package version: 220615040
I/Google Maps Android API( 2093): Google Play services maps renderer version(legacy): 203115000
D/HostConnection( 2093): HostConnection::get() New Host Connection established 0xebba8790, tid 5505
D/HostConnection( 2093): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
D/EGL_emulation( 2093): eglCreateContext: 0xebbb8a90: maj 1 min 0 rcv 1
I/bf      ( 2093): Successfully registered with Phenotype.
D/EGL_emulation( 2093): eglMakeCurrent: 0xebbb8a90: ver 1 0 (tinfo 0xb6f43c10) (first time)
D/EGL_emulation( 2093): eglMakeCurrent: 0xebbb8a90: ver 1 0 (tinfo 0xb6f43c10) (first time)
W/DynamiteModule( 2093): Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule( 2093): Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:6
I/DynamiteModule( 2093): Selected remote version of com.google.android.gms.googlecertificates, version >= 6
W/ProtoDataStoreFlagStore( 2093): Unable to retrieve flag snapshot for com.google.android.libraries.consentverifier#com.appz.deliverzi, using defaults.
W/ProtoDataStoreFlagStore( 2093): Unable to update local snapshot for com.google.android.libraries.consentverifier#com.appz.deliverzi, may result in stale flags.
W/ProtoDataStoreFlagStore( 2093): java.util.concurrent.ExecutionException: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.appz.deliverzi, sha256=[a91286492d36fa2cec012bd41c207fc254e3360a6020b8097e71021d35971b71], atk=false, ver=220615040.true (go/gsrlt)
W/ProtoDataStoreFlagStore( 2093): 	at agj.s(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):3)
W/ProtoDataStoreFlagStore( 2093): 	at agj.get(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):2)
W/ProtoDataStoreFlagStore( 2093): 	at ain.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):1)
W/ProtoDataStoreFlagStore( 2093): 	at aht.g(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):1)
W/ProtoDataStoreFlagStore( 2093): 	at wn.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):1)
W/ProtoDataStoreFlagStore( 2093): 	at xu.run(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):0)
W/ProtoDataStoreFlagStore( 2093): 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
W/ProtoDataStoreFlagStore( 2093): 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/ProtoDataStoreFlagStore( 2093): 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
W/ProtoDataStoreFlagStore( 2093): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/ProtoDataStoreFlagStore( 2093): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/ProtoDataStoreFlagStore( 2093): 	at java.lang.Thread.run(Thread.java:923)
W/ProtoDataStoreFlagStore( 2093): Caused by: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.appz.deliverzi, sha256=[a91286492d36fa2cec012bd41c207fc254e3360a6020b8097e71021d35971b71], atk=false, ver=220615040.true (go/gsrlt)
W/ProtoDataStoreFlagStore( 2093): 	at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
W/ProtoDataStoreFlagStore( 2093): 	at android.os.Parcel.createException(Parcel.java:2357)
W/ProtoDataStoreFlagStore( 2093): 	at android.os.Parcel.readException(Parcel.java:2340)
W/ProtoDataStoreFlagStore( 2093): 	at android.os.Parcel.readException(Parcel.java:2282)
W/ProtoDataStoreFlagStore( 2093): 	at dy.aZ(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):2)
W/ProtoDataStoreFlagStore( 2093): 	at qk.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):4)
W/ProtoDataStoreFlagStore( 2093): 	at ic.e(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):2)
W/ProtoDataStoreFlagStore( 2093): 	at jb.t(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):2)
W/ProtoDataStoreFlagStore( 2093): 	at jb.u(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):3)
W/ProtoDataStoreFlagStore( 2093): 	at jb.e(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):2)
W/ProtoDataStoreFlagStore( 2093): 	at jf.handleMessage(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150700-0):69)
W/ProtoDataStoreFlagStore( 2093): 	at android.os.Handler.dispatchMessage(Handler.java:102)
W/ProtoDataStoreFlagStore( 2093): 	at android.os.Looper.loop(Looper.java:223)
W/ProtoDataStoreFlagStore( 2093): 	at android.os.HandlerThread.run(HandlerThread.java:67)
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
D/skia    ( 2093): Shader compilation error
D/skia    ( 2093): ------------------------
D/skia    ( 2093): Errors:
D/skia    ( 2093): link failed but did not provide an info log
I/Counters( 2093): exceeded sample count in FrameTime
I/chatty  ( 2093): uid=10157(com.appz.deliverzi) androidmapsapi- identical 126 lines
I/Counters( 2093): exceeded sample count in FrameTime

image

i did not understand the scenario

Hi, first i would like to thank you for this great app.,

There is something I struggle to understand
if the upcoming orders can be seen by all drivers and no one can accept them except the driver that set in deliveryId field
so what is the purpose of showing the orders if they are meant for the specific driver

in my understanding, if an order can be seen by all drivers the first one who confirms could take the order and the order will hidden from other drivers

otherwise, if the order is meant only for a specific driver then it should be shown only to him

please clarify the logic for me am getting headache lol

Thank you

Infrastructure stream exceptions are passed to presentation layer directly

Hi again!

So as you notice here, the body callback will return a stream, and the try/catch are only guarding any exceptions outside of the stream, not the stream itself. meaning that any error occurs inside the stream itself will still be part of the stream (in the form of Stream.error),and will be catched through onError listener, or converted to AsyncError with StreamProvider
image

For example, as it's used here, the _streamTryCatchWrapper will catch exceptions the code inside the callback will throw (null assertions or argument errors for example),
but it will not catch and map the errors inside the stream (reference.snapshots() here), and the same stream is returned directly to the presentation layer to be consumed by providers. So, if a Firestore exception occurred for any reason, say document not found, this error will be the one converted to AsyncError.
image

This will have two main issues
1- we know implementation details from infra/data layer we should not know
2- the user will see technical error messages that's will not make sense to him

I'll try to make reproducible example but i don't have the latest dart/flutter version yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.