self_storing_input 2.0.1

Flutter Android iOS web

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 #

http://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.closeOverlay();
  },
  child: Scaffold(
    body: ...

Pass _controller to each self storing widget:

SelfStoringText(
  overlayController: _controller,
  ...
3
likes
105
pub points
0%
popularity

Publisher

google.dev

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD (LICENSE)

Dependencies

flutter

More

Packages that depend on self_storing_input