# createNew method Null safety

1. @override

Widget createNew(

1. {Key? key,
2. required AppModel app,
3. required String id,
4. int? privilegeLevel,
5. Map<String, dynamic>? parameters,
6. String? value,
7. DropdownButtonChanged? trigger,
8. bool? optional}

)
override

## Implementation

    @override
    Widget createNew(
        {Key? key,
        required AppModel app,
        required String id,
        int? privilegeLevel,
        Map<String, dynamic>? parameters,
        String? value,
        DropdownButtonChanged? trigger,
        bool? optional}) {
      if (id == "booklets") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "decoratedContents") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "dividers") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "documents") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "dynamicWidgets") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "faders") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "grids") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "presentations") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "simpleImages") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "simpleTexts") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      if (id == "tutorials") {
        return DropdownButtonComponent(
            app: app,
            componentId: id,
            value: value,
            privilegeLevel: privilegeLevel,
            trigger: trigger,
            optional: optional);
      }

      return Text("Id $id not found");
    }