moarch 2.9.0
moarch: ^2.9.0 copied to clipboard
Flutter CLI — scaffold Clean Architecture projects with Riverpod, FVM and your own conventions.
2.9.0 #
Features #
- Firebase Auth is now a backend choice, not just a provider. Selecting it with
the auth feature generates that feature against Firebase instead of REST:
email/password, Google sign-in, password reset, account deletion, and a
session restored from
authStateChanges(). Same layers and provider names, no token storage, and Dio is no longer pulled in for it. moarch create featurefollows the project's backend: in a Firestore project the datasource holds_firestoreinstead of_dio, withfetchAll/fetchOne/watchAll/create/save/deleteover one collection and aStringdocument id. With both backends installed, the layer checklist asks which one the feature talks to.AppExceptionmaps the Firebase failures an app actually hits: afromFirebaseAuthErrorfactory for the auth codes (invalid-credential,email-already-in-use,weak-password,requires-recent-login,too-many-requests…) and the Firestore codes (permission-denied,unavailable…) infromFirebaseError. Newauthandcancelledtypes, plusAppException.cancelled()for a dismissed sign-in sheet.- New
core/network/safe_firebase_call.dart— the Firebase counterpart ofsafeApiCall, for one-off calls and for streams. - New
docs/FIREBASE_SETUP.mdcovering the work that lives outside Dart:flutterfire configure, enabling the sign-in providers, the Android SHA-1/SHA-256 fingerprints, the iOSGIDClientIDandREVERSED_CLIENT_IDURL scheme, the web client id, and a starting set of Firestore rules. initwrites the two iOS Google sign-in keys intoInfo.plist, taking the real values fromGoogleService-Info.plistwhen it is already there and leaving documented placeholders when it isn't. Existing URL types are kept.
Fixes #
main.dartnow callsFirebase.initializeApp()for Firestore and Firebase Auth, not only for Crashlytics — a project with either selected used to throw "No Firebase App '[DEFAULT]' has been created" on its first provider read.
Doctor #
- New checks for a half-wired Firebase project: missing
firebase_coreorgoogle_sign_in, noFirebase.initializeApp()inmain.dart, a missinggoogle-services.json/GoogleService-Info.plist, andInfo.pliststill carrying the placeholder Google client ids — which--fixfills in fromGoogleService-Info.plist.