EliteORMEditorState<T extends EliteORMEditor> class abstract

Derive your state class from EliteORMEditorState instead of State. This will ensure that your widget class extends EliteORMEditor and still perform the same functionality as the State class.

The build method is overridden to provide a default implementation that gives the user the ability to edit and update elite_orm database objects.

Inheritance
Mixed in types

Constructors

EliteORMEditorState()

Properties

context BuildContext
The location in the tree where this widget builds.
no setterinherited
controls List<DBMemberControl>
A set of controls that match the entity provided.
final
hashCode int
The hash code for this object.
no setterinherited
modified bool
Boolean to keep track of whether or not changes have been made in this editor.
getter/setter pairinherited
mounted bool
Whether this State object is currently in a tree.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style EliteORMEditorStyle
Override this in the child class to change the style.
no setter
title String
Override this in your child class to provide the AppBar title.
no setter
widget → T
The current configuration.
no setterinherited
willPopConfig → _WillPopConfig
Configuration for the onWillPop handler.
final

Methods

activate() → void
Called when this object is reinserted into the tree after having been removed via deactivate.
inherited
addListeners(dynamic listener()) → void
Add the same listener to each control.
build(BuildContext context) Widget
The default implementation uses a simple Scaffold wrapped by a PopScope. Override this in your child class if this implementation does not suit your needs.
override
buildGroups() List<Widget>
Override this in the child class to create your groups of settings.
createDefaultControls(Entity entity) → void
Creates a list of DBMemberControl objects stored in controls that correspond to the data members of the Entity passed in. These can be cast to their derived type as needed in order to customize the settings for the control object.
deactivate() → void
Called when this object is removed from the tree.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
didChangeDependencies() → void
Called when a dependency of this State object changes.
inherited
didUpdateWidget(covariant T oldWidget) → void
Called whenever the widget configuration changes.
inherited
dispose() → void
Called when this object is removed from the tree permanently.
inherited
getControl(String key) DBMemberControl?
Get a control by it's database key.
hasPrimaryChanged(Entity? original, Entity entity) bool
Determine if any of the primary keys have changed.
initializeControlValues(Entity initial) → void
Set each control to an initial value that comes from the Entity passed in.
initState() → void
Called when this object is inserted into the tree.
inherited
isValid(Entity entity) bool
Override this such that it verifies that the object about to be stored in the database contains valid data. The default implementation only works with string primary keys.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onWillPop(bool didPop) → void
Configure the text portion of this dialog by modifying the willPopConfig object. Override this in the child class, if this implementation does not suit your needs. Return false to keep the user on the editing screen.
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload.
inherited
renderAppBar() PreferredSizeWidget
By default, return an AppBar widget with a text title.
renderBottomIcons() Row?
Override this in your child class and return a Row containing a list of widgets to show a bottom navigation bar.
renderBottomNavigationBar() Widget?
Override this in your child class if this implementation does not suit your needs.
renderContent() Widget
Override this in your child class if this implementation does not suit your needs.
renderListChooser({required DBMemberControl control, required String title, required List items, Function? toString, Function? toSubtitle, int? index, bool allowDuplicates = false}) Future<void>
Show a modal bottom sheet that contains a list of Card buttons. When one of the Card buttons is tapped, it will add that item to the list associated with the control object.
renderTextAdder({required String title, required bool adder(String), bool onSubmit = false, String addText = "Add", String cancelText = "Cancel", TextField textFieldCreator(void submitter(String)?)?}) → void
Renders a modal bottom sheet to display a text input widget.
save(Bloc<Entity> bloc, Entity? original, Entity entity) Future<SaveStatus>
Provide the Bloc, the original Entity (if available) and the Entity to be stored in the database. It will either create or update the database entry, if the Entity is deemed valid, and return status.
setState(VoidCallback fn) → void
Notify the framework that the internal state of this object has changed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited
translateGroup(ControlGroup group) List<Widget>
Translate the ControlGroup into a list of widgets to be used to make up a portion of the editing screen.
translateGroups(List<ControlGroup> groups) List<Widget>
Translate a list of groups into a Widget list. Use this method in your implementation of buildGroups().

Operators

operator ==(Object other) bool
The equality operator.
inherited