flutter_undo 0.0.2 copy "flutter_undo: ^0.0.2" to clipboard
flutter_undo: ^0.0.2 copied to clipboard

outdated

This package provides a mechanism to interact with UndoManager on iOS

Flutter Undo #

This package provides a mechanism to interact with UndoManager on iOS.

Getting Started #

The easiest way to use the plugin is to wrap a text editing widget in the UndoableTextElement widget:

UndoableTextElement(
  controller: controller,
  focusNode: focusNode,
  child: TextField(controller: controller, focusNode: focusNode),
);

For more control, you can interact with the UndoManager directly:

// Register a command
UndoManager.instance.registerCommand(
  UndoCommand(
    undo: (identifier) {
      widget.controller.value = lastValue;
    },
    redo: (identifier) {
      widget.controller.value = currentValue;
    },
  ),
);
// Clear the undo stack
UndoManager.instance.reset();
0
likes
0
pub points
0%
popularity

Publisher

verified publishertwinsun.dev

This package provides a mechanism to interact with UndoManager on iOS

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, logging

More

Packages that depend on flutter_undo