FirebaseDataRepository class
Handles the data flow of SDKPublishModel from the server.
- Inheritance
-
- Object
- NetworkDataRepository
- FirebaseDataRepository
Constructors
- FirebaseDataRepository({required FirebaseFirestore firestore, required CodelesslyConfig config})
- Creates a new FirebaseDataRepository instance with the given firestore instance.
Properties
- config → CodelesslyConfig
-
The CodelesslyConfig instance that is used to configure the SDK.
finalinherited
- firestore → FirebaseFirestore
-
The firestore instance to fetch the published model from.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
downloadApi(
{required String projectID, required String apiId, required PublishSource source}) → Future< HttpApiData?> -
Fetches the relevant SDKPublishLayout from the server based on the
configurations of the implementation.
override
-
downloadCompletePublishBundle(
{required String slug, required PublishSource source}) → Future< SDKPublishModel?> -
Calls a cloud function that searches for the project associated with the
given unique slug and returns a completely populated SDKPublishModel
instance.
inherited
-
downloadFontBytes(
{required String url}) → Future< Uint8List?> -
Downloads the bytes of a font from the server given a
url
.inherited -
downloadFontModel(
{required String projectID, required String fontID, required PublishSource source}) → Future< SDKPublishFont?> -
Fetches the relevant SDKPublishFont from the server based on the
configurations of the implementation.
override
-
downloadFontModels(
{required String projectID, required Set< String> fontIDs, required PublishSource source}) → Set<Future< SDKPublishFont?> > -
Fetches the relevant SDKPublishFonts from the server based on the
configurations of the implementation.
inherited
-
downloadLayoutConditions(
{required String projectID, required String layoutID, required PublishSource source}) → Future< SDKLayoutConditions?> -
Fetches the relevant SDKPublishLayout from the server based on the
configurations of the implementation.
override
-
downloadLayoutModel(
{required String projectID, required String layoutID, required PublishSource source}) → Future< SDKPublishLayout?> -
Fetches the relevant SDKPublishLayout from the server based on the
configurations of the implementation.
override
-
downloadLayoutModels(
{required String projectID, required Set< String> layoutIDs, required PublishSource source}) → Set<Future< SDKPublishLayout?> > -
Fetches the relevant SDKPublishLayouts from the server based on the
configurations of the implementation.
inherited
-
downloadLayoutVariables(
{required String projectID, required String layoutID, required PublishSource source}) → Future< SDKLayoutVariables?> -
Fetches the relevant SDKPublishLayout from the server based on the
configurations of the implementation.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
streamPublishModel(
{required String projectID, required PublishSource source}) → Stream< SDKPublishModel?> -
Calls a cloud function that searches for the project associated with the
given unique slug and returns a completely populated SDKPublishModel
instance.
Streams a given
projectID
's associated SDKPublishModel from the network with preferably live updates.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited