feat(app): Firebase-free embeddedPreview bootstrap#1438
Closed
SERDUN wants to merge 1 commit into
Closed
Conversation
Add an embeddedPreview mode so webtrit_phone can run inside another Flutter host
(the theme configurator's realtime preview) that owns a possibly
misconfigured/absent default Firebase app.
- bootstrap({embeddedPreview}) skips Firebase app/messaging/local-push init,
uses SharedPreferencesAppIdProvider instead of the Installations-backed
FirebaseAppIdProvider, and skips Firebase Remote Config.
- RootApp/App take an embeddedPreview flag; the analytics provider becomes lazy
and the analytics navigator observer is skipped when embedded, so
FirebaseAnalytics.instance is never touched.
Standalone behaviour is unchanged (embeddedPreview defaults to false).
Member
Author
|
Closing — reworking the embedded-host support into a cleaner single abstraction. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add an
embeddedPreviewmode sowebtrit_phonecan run inside another Flutter host (the theme configurator's realtime preview), where the host owns the default Firebase app — which may be misconfigured or absent (locally the configurator's app has an emptyprojectId), so any Firebase touch in the embedded app would throw.bootstrap({bool embeddedPreview = false}): when embedded, skip Firebase app/messaging/local-push init, useSharedPreferencesAppIdProviderinstead of the Installations-backedFirebaseAppIdProvider, and skip Firebase Remote Config.RootApp/Apptake anembeddedPreviewflag; the analytics provider becomes lazy (create:instead of.value) and the analytics navigator observer is skipped when embedded, soFirebaseAnalytics.instanceis never touched.Why
First half of the embedded-host support for the realtime-preview epic (split from #1437). The second half — driving the live theme/feature config into the embedded app via external streams — is a follow-up PR stacked on this one.
Notes
embeddedPreviewdefaults tofalse.flutter analyze libgreen.