flows library

Flows - A light, modern and powerful Flutter framework

Main features:

  • Dependency Injection with Flows.put/Flows.find
  • Reactive state management with Rx types and Flx widget
  • Route management with Flows.to/Flows.toNamed
  • Snackbar and Dialog utilities with Flows.snackbar/Flows.dialog
  • Logic/State/View separation pattern

IMPORTANT: Flx is designed for SINGLE-LEVEL observation only.

Classes

FlowController
A base controller class that provides state management functionality.
FlowLogic
Base class for logic objects
Flows
Flows - Dependency Injection and Navigation
FlowsBinding
FlowsBinding for route-specific dependency injection
FlowsCupertinoApp
FlowsCupertinoApp - Cupertino app with Flows routing support
FlowsDialogRoute<T>
Flows Dialog Route
FlowsMaterialApp
FlowsMaterialApp - Material app with Flows routing support
FlowsPage
A page definition for Flows routing
FlowsSnackBar
FlowsSnackBar - Custom snackbar similar to GetX
FlowsSnackBarState
FlowState
Base class for state objects
FlowView
Base class for view objects
Flx
Flx widget - Single-level reactive widget
FlxBuilder<T>
FlxBuilder - Reactive widget with explicit tracking
FlxValue<T>
FlxValue - Simple reactive widget for a single Rx value
ListNotifier
Notifier that supports multiple listeners with optional IDs
Rx<T>
Base Rx class that manages all the stream logic for any Type.
RxBool
RxBool for boolean values
RxController
A base controller class for reactive state management using Rx variables.
RxDouble
RxDouble for double values
RxInt
RxInt for integer values
RxInterface<T>
Base interface for reactive types
RxList<T>
Reactive List that notifies listeners when modified
RxMap<K, V>
A reactive Map that notifies listeners when modified
Rxn<T>
Nullable Rx class
RxnBool
RxnBool for nullable boolean values
RxnDouble
RxnDouble for nullable double values
RxnInt
RxnInt for nullable integer values
RxnList<T>
RxnList - Nullable Reactive List
RxnString
RxnString for nullable string values
RxString
RxString for string values
SnackbarController
Snackbar Controller to manage snackbar
Worker
Worker class to manage reactive subscriptions
Workers
Workers container to manage multiple workers

Enums

RowStyle
SnackbarStatus
Indicates Status of snackbar
SnackHoverState
Indicates if the mouse entered or exited
SnackPosition
Indicates if snack is going to start at the TOP or at the BOTTOM
SnackStyle
Indicates if snack will be attached to the edge of the screen or not
TransitionType
Transition types for page navigation

Mixins

FlowLifeCycleMixin
Mixin that provides lifecycle callbacks for controllers

Extensions

BoolExtension on bool
DoubleExtension on double
IntExtension on int
RxBoolExt on Rx<bool>
RxnBoolExt on Rx<bool?>
RxNumExt on Rx<num>
RxT on T
RxTnew on Object
New extension to avoid conflicts with dart 3 features
RxWorkerExtension on RxInterface<T>
Extension on RxInterface for easier worker usage
StringExtension on String

Functions

debounce<T>(RxInterface<T> observable, WorkerCallback<T> callback, {Duration time = const Duration(milliseconds: 500)}) Worker
Executes a callback after delay of no changes (debounce). Similar to interval but sends the last value after user stops changing it.
ever<T>(RxInterface<T> observable, WorkerCallback<T> callback, {dynamic condition, Duration? debounce}) Worker
Executes a callback every time the value of observable changes.
everAll<T>(List<RxInterface<T>> observables, WorkerCallback<T> callback, {dynamic condition}) Worker
Similar to ever, but takes a list of observables. The condition is common to all observables.
flxTrack(ValueListenable listenable) → void
Register a ValueListenable with the current Flx widget
interval<T>(RxInterface<T> observable, WorkerCallback<T> callback, {Duration delay = const Duration(seconds: 1), dynamic condition}) Worker
Executes a callback after delay if the value of observable doesn't change.
once<T>(RxInterface<T> observable, WorkerCallback<T> callback, {dynamic condition}) Worker
Executes a callback the first time the value of observable changes.
workers() Workers
Create workers container

Typedefs

OnHover = void Function(FlowsSnackBar snack, SnackHoverState snackHoverState)
OnTap = void Function(FlowsSnackBar snack)
SnackbarStatusCallback = void Function(SnackbarStatus status)
WidgetBuilder = Widget Function()
WorkerCallback<T> = void Function(T value)