-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Widget: Tag Input #1893
base: main
Are you sure you want to change the base?
New Widget: Tag Input #1893
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of the code is duplicated for TextInput
. Can't we create a common util clean this up?
@@ -144,6 +145,7 @@ class WidgetRegistry { | |||
RadioButton.type: () => RadioButton(), | |||
EnsembleForm.type: () => EnsembleForm(), | |||
TextInput.type: () => TextInput(), | |||
TagInput.type: () => TagInput(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't register new widgets in legacyWidgetMap
, this should be registered in _registeredWidgets
map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
import 'package:ensemble/framework/action.dart'; | ||
import 'package:ensemble/framework/widget/widget.dart'; | ||
import 'package:ensemble/layout/form.dart'; | ||
import 'package:ensemble/model/item_template.dart'; | ||
import 'package:ensemble/screen_controller.dart'; | ||
import 'package:ensemble/util/debouncer.dart'; | ||
import 'package:ensemble/util/input_formatter.dart'; | ||
import 'package:ensemble/util/input_validator.dart'; | ||
import 'package:ensemble/util/utils.dart'; | ||
import 'package:ensemble/widget/helpers/HasTextPlaceholder.dart'; | ||
import 'package:ensemble/widget/helpers/form_helper.dart'; | ||
import 'package:ensemble/widget/helpers/input_wrapper.dart'; | ||
import 'package:ensemble/widget/helpers/widgets.dart'; | ||
import 'package:ensemble_ts_interpreter/invokables/invokablecontroller.dart'; | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:ensemble/layout/templated.dart'; | ||
import 'package:ensemble_ts_interpreter/invokables/invokable.dart'; | ||
import 'package:email_validator/email_validator.dart'; | ||
import 'package:ensemble/framework/model.dart' as model; | ||
import 'package:flutter/services.dart'; | ||
import 'package:flutter_html/flutter_html.dart'; | ||
import 'package:flutter_i18n/flutter_i18n.dart'; | ||
import 'package:form_validator/form_validator.dart'; | ||
import 'package:mask_text_input_formatter/mask_text_input_formatter.dart'; | ||
import 'package:fluttertagger/fluttertagger.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are there so many unused imports here? please only import the package/file which are required
we can do this, I'll make the common util for text and tag input |
Ticket: #1825
Example
Demo:
Screen.Recording.2025-02-28.at.7.23.53.PM.mov
CC: @sharjeelyunus @ridsashabbir