createNew method
Widget
createNew({
- Key? key,
- required AppModel app,
- required String id,
- int? privilegeLevel,
- Map<
String, dynamic> ? parameters, - String? value,
- DropdownButtonChanged? trigger,
- 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 == "feeds") {
return DropdownButtonComponent(
app: app,
componentId: id,
value: value,
privilegeLevel: privilegeLevel,
trigger: trigger,
optional: optional);
}
if (id == "feedFronts") {
return DropdownButtonComponent(
app: app,
componentId: id,
value: value,
privilegeLevel: privilegeLevel,
trigger: trigger,
optional: optional);
}
if (id == "feedMenus") {
return DropdownButtonComponent(
app: app,
componentId: id,
value: value,
privilegeLevel: privilegeLevel,
trigger: trigger,
optional: optional);
}
if (id == "posts") {
return DropdownButtonComponent(
app: app,
componentId: id,
value: value,
privilegeLevel: privilegeLevel,
trigger: trigger,
optional: optional);
}
if (id == "postComments") {
return DropdownButtonComponent(
app: app,
componentId: id,
value: value,
privilegeLevel: privilegeLevel,
trigger: trigger,
optional: optional);
}
if (id == "postLikes") {
return DropdownButtonComponent(
app: app,
componentId: id,
value: value,
privilegeLevel: privilegeLevel,
trigger: trigger,
optional: optional);
}
if (id == "profiles") {
return DropdownButtonComponent(
app: app,
componentId: id,
value: value,
privilegeLevel: privilegeLevel,
trigger: trigger,
optional: optional);
}
return Text("Id $id not found");
}