bit/bit library

Classes

BitBuilder<M, V, L, B extends BitControl<M, V, L>>
BitBuildProvider<M, V, L, B extends BitControl<M, V, L>>
BitControl<M, V, L>
a class that helps you manage the state of a bit. It has a generic type L that represents the loading state of the bit. You can use MsgBitControl if you want to use a string as the loading state.
BitNotifier<M, V, L, B extends BitControl<M, V, L>>
BitProvider<B extends BitControl>
BitState<V, L>
ElbeErrorView

Extensions

BitContext on BuildContext

Functions

bitEmpty(dynamic _, dynamic __) Widget
bitEmptyView() Widget
bitErrorView(BitControl bit, dynamic error) Widget
bitLoadingView(BitControl bit) Widget

Typedefs

BitMapper<M, V> = M Function(V value, M? previous)
MapMsgBitBuilder<V, B extends MsgBitControl<V, V>> = MsgBitBuilder<V, V, B>
MapMsgBitControl<V> = MsgBitControl<V, V>
A simplified version of MsgBitControl automatically handles the mapping of the data to a state.
MsgBit<V> = Bit<V, String>
MsgBitBuilder<M, V, B extends MsgBitControl<M, V>> = BitBuilder<M, V, String, B>
MsgBitControl<M, V> = BitControl<M, V, String>
PlainBitBuilder<D, B extends PlainBitControl<D>> = MapMsgBitBuilder<D, B>
PlainBitControl<D> = MapMsgBitControl<D>
defines a simple BitControl. This allows you to manage global state. Provide a worker function that will be called when the bit is first accessed. The worker function should return a FutureOr<V>. The V type is the type of the data that the bit will hold. The Bit will automatically also have a loading state and an error state.