createFader method
Future<FaderModel>
createFader(
- PlatformMediumModel android,
- PlatformMediumModel iphone,
- PlatformMediumModel tablet,
- PlatformMediumModel macbook,
Implementation
Future<FaderModel> createFader(
PlatformMediumModel android,
PlatformMediumModel iphone,
PlatformMediumModel tablet,
PlatformMediumModel macbook,
) async {
var items = <ListedItemModel>[];
items.add(ListedItemModel(
documentID: "android",
description: "Android",
posSize: screen75(),
image: android));
items.add(ListedItemModel(
documentID: "macbook",
description: "Macbook",
posSize: screen75(),
image: macbook));
items.add(ListedItemModel(
documentID: "iphone",
description: "iphone",
posSize: screen75(),
image: iphone));
items.add(ListedItemModel(
documentID: "tablet",
description: "Tablet",
posSize: screen75(),
image: tablet));
var model = FaderModel(
documentID:
constructDocumentId(uniqueId: uniqueId, documentId: componentId),
description: "Welcome fader",
animationMilliseconds: 1000,
imageSeconds: 5,
items: items,
appId: app.documentID,
conditions: StorageConditionsModel(
privilegeLevelRequired:
PrivilegeLevelRequiredSimple.noPrivilegeRequiredSimple),
);
await AbstractRepositorySingleton.singleton
.faderRepository(app.documentID)!
.add(model);
return model;
}