self_storing_input 4.0.1 copy "self_storing_input: ^4.0.1" to clipboard
self_storing_input: ^4.0.1 copied to clipboard

A set of input widgets that automatically save and load the entered value to a data store.

self_storing_input #

A set of input widgets that automatically save and load the entered value to a data store.

Demo #

https://self_storing_input_demo.surge.sh

Usage #

Define Saver #

Implement a Saver that loads, validates and saves data items by itemKey. The itemKey can be of any form. You can make it a resource URL string or a tuple <connectionString, table, objectId, column>.

Find example of an in-memory Saver here.

Define Input #

Add self storing input widgets to your screen and parameterize each with the defined Saver and itemKey. The widgets will take care of loading data, validating data, saving data, and handling failure modes like poor internet connection and data storage failures.

Close the Overlays on Tap #

Define an OverlayController in your screen state:

OverlayController _controller = OverlayController();

Wrap your screen widget body with a GestureDetector to close editing overlays on tap:

GestureDetector(
  onTap: () async {
    _controller.close();
  },
  child: Scaffold(
    body: ...

Pass _controller to each self storing widget:

SelfStoringText(
  overlayController: _controller,
  ...
12
likes
90
points
100
downloads

Publisher

verified publishergoogle.dev

Weekly Downloads

A set of input widgets that automatically save and load the entered value to a data store.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on self_storing_input