You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
uco-mobile-poc/lib/app/custom_widgets/widget_interactions.dart

44 lines
1.5 KiB
Dart

// import 'package:mfsys_include_app/app/core/constants/app_constants.dart';
// import 'package:mfsys_include_app/app/core/constants/widget_types.dart';
// import 'package:mfsys_include_app/app/presentations/widgets/parent_widget.dart';
// import 'package:mfsys_include_app/app/presentations/widgets/widget_operation.dart';
// import 'package:uco_ciihive/app/core/constants/widget_types.dart';
// import 'package:uco_ciihive/app/custom_widgets/custom_input_field.dart';
// import 'package:uco_ciihive/app/custom_widgets/widget_operation.dart';
//
// import 'custom_text_field.dart';
// import 'otp_pin.dart';
//
// class WidgetInteractions {
// static Map<String, WidgetOperations> map = {};
//
// WidgetInteractions._privateConstructor() {
// _registerWidgets();
// }
//
// static WidgetInteractions instance = WidgetInteractions._privateConstructor();
//
// _registerWidgets() {
// map[WidgetTypes.CUSTOM_EDIT_TEXT] = CustomInputFieldCustom();
// }
//
// bool validateWidget(ParentWidget field, String type) {
// return map[type]!.validate(field);
// }
//
// Object getValue(ParentWidget field, String type) {
// return map[type]!.getValue(field);
// }
//
// static bool validateAll([List<ParentWidget> args = const []]) {
// bool hasError = false;
// for (ParentWidget inputField in args) {
// bool isError = WidgetInteractions.instance.validateWidget(inputField, inputField.tags[AppConstants.FIELD_TYPE].toString());
// if (isError) {
// hasError = true;
// }
// }
// return hasError;
// }
// }