AbstractSimpleInputPageHelper class abstract
Abstract helper for Simple Input Page.
- we retrieve the initial list of terms.
- we add a term to the list.
- we remove a term from the list.
- Inheritance
-
- Object
- ChangeNotifier
- AbstractSimpleInputPageHelper
- Implementers
- Available extensions
Constructors
Properties
- editable → bool
-
Are items editable?
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- product ↔ Product
-
Product we are about to edit.
getter/setter pair
- reorderable → bool
-
Is the list of terms reorderable?
no setter
- robotoffInsightType → InsightType?
-
no setter
-
robotoffQuestionsNotifier
→ ValueNotifier<
Map< RobotoffQuestion, InsightAnnotation?> > -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- separator → String
-
no setter
-
terms
→ List<
String> -
Returns the current terms to be displayed.
no setter
Methods
-
addItemsFromController(
TextEditingController controller, {bool clearController = true}) → bool - Adds all the non-already existing items from the controller.
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addTerm(
String term) → bool - Returns true if the term was not in the list and then was added.
-
answerRobotoffQuestion(
RobotoffQuestion question, InsightAnnotation? annotation) → void -
changeProduct(
Product changedProduct) → void - Impacts a product in order to take the changes into account.
-
containsTerm(
String term) → bool -
dispose(
) → void -
Discards any resources used by the object.
override
-
getAddButtonLabel(
AppLocalizations appLocalizations) → String - Returns the label of the corresponding "add" button.
-
getAddExplanationsContent(
) → WidgetBuilder? - Returns additional examples about the "add" text field.
-
getAddExplanationsTitle(
AppLocalizations appLocalizations) → String? - Returns additional examples about the "add" text field.
-
getAddHint(
AppLocalizations appLocalizations) → String - Returns the hint of the "add" text field.
-
getAddTooltip(
AppLocalizations appLocalizations) → String - Returns the Tooltip for the "add" text field.
-
getAllowEmojis(
) → bool - Allow emojis in the text field.
-
getAnalyticsEditEvent(
) → AnalyticsEditEvents - Returns the enum to be used for matomo analytics.
-
getAutocompleteManager(
) → AutocompleteManager? - Instead of the tag type, returns the autocomplete manager.
-
getChangedProduct(
Product product) → bool - Returns true if changes were made.
-
getExtraPhotoWidget(
BuildContext context, Product product, String title) → Widget - Typical extra widget for the "add other pics" button.
-
getExtraWidget(
BuildContext context, Product product) → Widget? - Extra widget to be displayed after the list.
-
getIcon(
) → Widget - Returns the icon data for the list tile.
-
getLanguage(
) → OpenFoodFactsLanguage - Returns the current language.
-
getStamp(
) → BackgroundTaskDetailsStamp - Stamp to identify similar updates on the same product.
-
getStandardAddButtonLabel(
AppLocalizations appLocalizations) → String - Returns the label of the corresponding standard "add" button.
-
getSubtitle(
AppLocalizations appLocalizations) → String? - Returns the subtitle on the main "edit product" page.
-
getSuggestions(
) → ValueNotifier< SimpleInputSuggestionsState> - Allows to provide some suggestions to the user.
-
getTagType(
) → TagType? - Returns the tag type for autocomplete suggestions.
-
getTextCapitalization(
) → TextCapitalization? - Text capitalization for the text field.
-
getTitle(
AppLocalizations appLocalizations) → String - Returns the title on the main "edit product" page.
-
getTypeLabel(
AppLocalizations appLocalizations) → String - Returns the type of the text field (eg: label, category…).
-
hasChanged(
) → bool -
initTerms(
Product product) → List< String> - Returns the terms as they were initially in the product.
-
isNewTerm(
String term) → bool -
isOwnerField(
Product product) → bool - Returns true if the field is an owner field.
-
isPopulated(
Product product) → bool - Returns true if the field is populated.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
reInit(
Product product, {bool backgroundTask = false}) → void - Starts from scratch with a new (or refreshed) Product.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeTerm(
String term) → bool - Returns true if the term was in the list and then was removed.
-
replaceItem(
int position, String term) → void -
replaceItems(
List< String> items) → void - Mainly used when reordering the list.
-
replaceListener(
VoidCallback listener) → void -
Available on ChangeNotifier, provided by the ChangeNotifierExtensions extension
-
restoreItemsBeforeLastAddition(
) → void -
splitString(
String? input) → List< String> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited