createSimpleTextModel method

Future<SimpleTextModel> createSimpleTextModel(
  1. String appId,
  2. String title,
  3. String contents, {
  4. SimpleTextAlign? align,
})

Implementation

Future<SimpleTextModel> createSimpleTextModel(
    String appId, String title, String contents,
    {SimpleTextAlign? align}) async {
  var simpleTextModel = SimpleTextModel(
      documentID: identifier,
      appId: appId,
      title: title,
      text: contents,
      textAlign: align,
      conditions: StorageConditionsModel(
          privilegeLevelRequired: privilegeLevelRequiredSimple));
  await simpleTextRepository(appId: appId)!.add(simpleTextModel);
  return simpleTextModel;
}