SuperEditorIosControlsScope class
An InheritedWidget that provides shared access to a SuperEditorIosControlsController, which coordinates the state of iOS controls like the caret, handles, magnifier, etc.
This widget and its associated controller exist so that SuperEditor has maximum freedom in terms of where to implement iOS gestures vs carets vs the floating cursor vs the magnifier vs the toolbar. Each of these responsibilities have some unique differences, which make them difficult or impossible to implement within a single widget. By sharing a controller, a group of independent widgets can work together to cover those various responsibilities.
Centralizing a controller in an InheritedWidget also allows SuperEditor to share that control with application code outside of SuperEditor, by placing an SuperEditorIosControlsScope above the SuperEditor in the widget tree. For this reason, SuperEditor should access the SuperEditorIosControlsScope through rootOf.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- ProxyWidget
- InheritedWidget
- SuperEditorIosControlsScope
Constructors
- SuperEditorIosControlsScope({Key? key, required SuperEditorIosControlsController controller, required Widget child})
-
const
Properties
- child → Widget
-
The widget below this widget in the tree.
finalinherited
- controller → SuperEditorIosControlsController
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → InheritedElement -
Inflates this configuration to a concrete instance.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
-
updateShouldNotify(
covariant SuperEditorIosControlsScope oldWidget) → bool -
Whether the framework should notify widgets that inherit from this widget.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
maybeNearestOf(
BuildContext context) → SuperEditorIosControlsController? -
maybeRootOf(
BuildContext context) → SuperEditorIosControlsController? -
nearestOf(
BuildContext context) → SuperEditorIosControlsController -
Finds the nearest SuperEditorIosControlsScope in the widget tree, above the given
context, and returns its associated SuperEditorIosControlsController. -
rootOf(
BuildContext context) → SuperEditorIosControlsController -
Finds the highest SuperEditorIosControlsScope in the widget tree, above the given
context, and returns its associated SuperEditorIosControlsController.