flutter_provider_utilities 0.0.4
flutter_provider_utilities: ^0.0.4 copied to clipboard

Flutter Android iOS web

A set of utilities for provider package.

provider_utilities #

A set of utilities for provider package.

Mixins #

MessageNotifierMixin #

mixin to be user on a [ChangeNotifier] class It provides two fields [error] and [info] and two methods [notifyError] and [notifyInfo] Useful used in combination with [MessageListener] to display error or information messages to users

NotificationNotifierMixin #

mixin to be user on a [ChangeNotifier] class It provides a method [notifyNotification] Useful used in combination with [NotificationListener] to display in-app notifications

SafeNotifierMixin #

mixin to be user on a [ChangeNotifier] class it provides a method [notifySafe] the can be called to [notifyListeners] in a safe manner Useful when using [ChangeNotifier] in pages that can be dismisses or popped

Listeners #

MessageListener #

A listener for [ChangeNotifier] that extends [MessageNotifierMixin] mixin Wrapping a widget with [MessageListener] will use [Scaffold.context] to show Snackbars called from the ChangeNotifier class with [notifyError] or [notifyInfo] methods Useful to display error or information messages

As an example:

ChangeNotifierProvider.value(
  value: _model,
  child: Scaffold(
   appBar: AppBar(),
   body: MessageListener<Model>(
      child: ListView()
   )
  )
);

NotificationListener #

A listener for [ChangeNotifier] that extends [NotificationNotifierMixin] mixin Wrapping a widget with [NotificationListener] will display an [Overlay] called from the ChangeNotifier class with [notifyNotification] Useful to display in-app notifications

As an example:

ChangeNotifierProvider.value(
  value: _model,
  child: Scaffold(
   appBar: AppBar(),
   body: NotificationListener<Model>(
      child: ListView()
   )
  )
);
0
likes
80
pub points
21%
popularity

A set of utilities for provider package.

Homepage

Documentation

API reference

Uploader

info@quantos.it

License

MIT (LICENSE)

Dependencies

flutter, provider, tuple

More

Packages that depend on flutter_provider_utilities