|
@@ -36,27 +36,27 @@ abstract class TypeOptionWidgetBuilder {
|
|
|
|
|
|
Widget? makeTypeOptionWidget({
|
|
Widget? makeTypeOptionWidget({
|
|
required BuildContext context,
|
|
required BuildContext context,
|
|
- required GridFieldContext fieldContext,
|
|
|
|
|
|
+ required TypeOptionDataController dataController,
|
|
required TypeOptionOverlayDelegate overlayDelegate,
|
|
required TypeOptionOverlayDelegate overlayDelegate,
|
|
}) {
|
|
}) {
|
|
- final builder = makeTypeOptionWidgetBuilder(fieldContext, overlayDelegate);
|
|
|
|
|
|
+ final builder = makeTypeOptionWidgetBuilder(dataController, overlayDelegate);
|
|
return builder.build(context);
|
|
return builder.build(context);
|
|
}
|
|
}
|
|
|
|
|
|
TypeOptionWidgetBuilder makeTypeOptionWidgetBuilder(
|
|
TypeOptionWidgetBuilder makeTypeOptionWidgetBuilder(
|
|
- GridFieldContext fieldContext,
|
|
|
|
|
|
+ TypeOptionDataController dataController,
|
|
TypeOptionOverlayDelegate overlayDelegate,
|
|
TypeOptionOverlayDelegate overlayDelegate,
|
|
) {
|
|
) {
|
|
- switch (fieldContext.field.fieldType) {
|
|
|
|
|
|
+ switch (dataController.field.fieldType) {
|
|
case FieldType.Checkbox:
|
|
case FieldType.Checkbox:
|
|
final context = CheckboxTypeOptionContext(
|
|
final context = CheckboxTypeOptionContext(
|
|
- fieldContext: fieldContext,
|
|
|
|
|
|
+ dataController: dataController,
|
|
dataParser: CheckboxTypeOptionWidgetDataParser(),
|
|
dataParser: CheckboxTypeOptionWidgetDataParser(),
|
|
);
|
|
);
|
|
return CheckboxTypeOptionWidgetBuilder(context);
|
|
return CheckboxTypeOptionWidgetBuilder(context);
|
|
case FieldType.DateTime:
|
|
case FieldType.DateTime:
|
|
final context = DateTypeOptionContext(
|
|
final context = DateTypeOptionContext(
|
|
- fieldContext: fieldContext,
|
|
|
|
|
|
+ dataController: dataController,
|
|
dataParser: DateTypeOptionDataParser(),
|
|
dataParser: DateTypeOptionDataParser(),
|
|
);
|
|
);
|
|
return DateTypeOptionWidgetBuilder(
|
|
return DateTypeOptionWidgetBuilder(
|
|
@@ -65,7 +65,7 @@ TypeOptionWidgetBuilder makeTypeOptionWidgetBuilder(
|
|
);
|
|
);
|
|
case FieldType.SingleSelect:
|
|
case FieldType.SingleSelect:
|
|
final context = SingleSelectTypeOptionContext(
|
|
final context = SingleSelectTypeOptionContext(
|
|
- fieldContext: fieldContext,
|
|
|
|
|
|
+ fieldContext: dataController,
|
|
dataBuilder: SingleSelectTypeOptionWidgetDataParser(),
|
|
dataBuilder: SingleSelectTypeOptionWidgetDataParser(),
|
|
);
|
|
);
|
|
return SingleSelectTypeOptionWidgetBuilder(
|
|
return SingleSelectTypeOptionWidgetBuilder(
|
|
@@ -74,7 +74,7 @@ TypeOptionWidgetBuilder makeTypeOptionWidgetBuilder(
|
|
);
|
|
);
|
|
case FieldType.MultiSelect:
|
|
case FieldType.MultiSelect:
|
|
final context = MultiSelectTypeOptionContext(
|
|
final context = MultiSelectTypeOptionContext(
|
|
- fieldContext: fieldContext,
|
|
|
|
|
|
+ dataController: dataController,
|
|
dataBuilder: MultiSelectTypeOptionWidgetDataParser(),
|
|
dataBuilder: MultiSelectTypeOptionWidgetDataParser(),
|
|
);
|
|
);
|
|
return MultiSelectTypeOptionWidgetBuilder(
|
|
return MultiSelectTypeOptionWidgetBuilder(
|
|
@@ -83,7 +83,7 @@ TypeOptionWidgetBuilder makeTypeOptionWidgetBuilder(
|
|
);
|
|
);
|
|
case FieldType.Number:
|
|
case FieldType.Number:
|
|
final context = NumberTypeOptionContext(
|
|
final context = NumberTypeOptionContext(
|
|
- fieldContext: fieldContext,
|
|
|
|
|
|
+ dataController: dataController,
|
|
dataParser: NumberTypeOptionWidgetDataParser(),
|
|
dataParser: NumberTypeOptionWidgetDataParser(),
|
|
);
|
|
);
|
|
return NumberTypeOptionWidgetBuilder(
|
|
return NumberTypeOptionWidgetBuilder(
|
|
@@ -92,14 +92,14 @@ TypeOptionWidgetBuilder makeTypeOptionWidgetBuilder(
|
|
);
|
|
);
|
|
case FieldType.RichText:
|
|
case FieldType.RichText:
|
|
final context = RichTextTypeOptionContext(
|
|
final context = RichTextTypeOptionContext(
|
|
- fieldContext: fieldContext,
|
|
|
|
|
|
+ dataController: dataController,
|
|
dataParser: RichTextTypeOptionWidgetDataParser(),
|
|
dataParser: RichTextTypeOptionWidgetDataParser(),
|
|
);
|
|
);
|
|
return RichTextTypeOptionWidgetBuilder(context);
|
|
return RichTextTypeOptionWidgetBuilder(context);
|
|
|
|
|
|
case FieldType.URL:
|
|
case FieldType.URL:
|
|
final context = URLTypeOptionContext(
|
|
final context = URLTypeOptionContext(
|
|
- fieldContext: fieldContext,
|
|
|
|
|
|
+ dataController: dataController,
|
|
dataParser: URLTypeOptionWidgetDataParser(),
|
|
dataParser: URLTypeOptionWidgetDataParser(),
|
|
);
|
|
);
|
|
return URLTypeOptionWidgetBuilder(context);
|
|
return URLTypeOptionWidgetBuilder(context);
|