LocalSearchAndReplaceController class
This controller provides a method to control the animations and required
show/dismiss operations to interact with the SearchAndReplaceWidget in an intra-file
context (hence the Local prefix).
In order to correctly implement the mechanism for the search-and-replace overlay, instantiate this class in the State object of the parent widget. Pass the overlayKey generated by this class to the Widget.key property of the SearchAndReplaceWidget. Then, call the
Constructors
- LocalSearchAndReplaceController({required TickerProvider tickerProvider, required double cellWidth, required double cellHeight, required TextEditingController textController, VoidCallback? onDismiss})
Properties
- cellHeight → double
-
final
- cellWidth → double
-
final
- currentItemOffset ↔ double
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isShown → bool
-
no setter
- localSearchAndReplaceData → LocalSearchAndReplaceData
-
final
-
matches
↔ Iterable<
Match> -
getter/setter pair
- onDismiss → VoidCallback?
-
final
-
overlayKey
→ GlobalKey<
SearchAndReplaceWidgetState> -
final
- replaceText ↔ String?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchAndReplaceAnimationController ↔ AnimationController
-
latefinal
-
searchAndReplaceMatchHighlights
→ List<
Positioned> -
final
-
searchAndReplaceOffsetAnimation
→ Animation<
Offset> -
latefinal
- searchItemCurrentIndex ↔ int
-
getter/setter pair
- searchText ↔ String
-
getter/setter pair
- textController → TextEditingController
-
final
Methods
-
charNumAtIndex(
int index, {required String controllerText}) → int -
dismiss(
) → void -
generateSearchAndReplaceHighlights(
{required Iterable< Match> matches, required int wordWidth}) → List<Positioned> -
nextMatch(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prevMatch(
) → void -
regenerateMatches(
{required String newText}) → void -
replaceAllMatches(
) → void -
replaceCurrentMatch(
) → void -
scrollIfActiveMatchOutsideViewport(
{required double scrollOffset, required double viewportHeight, required void scrollCallback(double)}) → void -
show(
) → void -
toggle(
) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited