molc library
Classes
- Disposable
- Interface for objects that need cleanup when removed from the widget tree.
- InitialBuilder
- A widget that provides lifecycle hooks (init, reassemble, dispose) alongside a regular builder.
- InitialBuilderState
- State for InitialBuilder.
- Logic
- Base class for business logic.
-
LogicWidget<
T extends Logic> - A widget that provides a Logic to its subtree.
- Model
- Base class for UI state models.
-
ModelWidget<
T extends Model> - A widget that provides a Model to its subtree and rebuilds on refresh.
-
MoLcWidget<
T extends Model, R extends Logic> - A widget that provides both a Model and a Logic to its subtree.
-
MoLogic<
T extends Model> -
A WidgetLogic tightly bound to a specific Model type
T. - MoMultiProvider
- A widget that stacks multiple providers from outer to inner.
-
MoNotifierProvider<
T extends ChangeNotifier> - A provider that makes a ChangeNotifier value available and triggers rebuilds in descendants when the notifier fires notifications.
-
MoProvider<
T> - A provider that makes a plain (non-notify) value available to descendants.
-
MoScope<
T> - An InheritedNotifier that provides a typed value to descendant widgets.
-
Mutable<
T> - A reactive value that triggers rebuilds in surrounding MutableWidgets.
- MutableWidget
- A widget that enables Mutable values to trigger rebuilds.
-
NoMo2Widget<
A, B> - A lightweight widget for simple two-value state.
-
NoMo3Widget<
A, B, C> - A lightweight widget for simple three-value state.
-
NoMoWidget<
T> - A lightweight widget for simple single-value state.
- RefreshDelegate
- Base class for Mutable that holds the static build-phase delegate.
- TopModel
- A Model registered at the app root via TopProvider.
- TopProvider
- The root provider that holds app-level TopModel instances.
-
Value2Model<
A, B> - A simple Model wrapping two values.
-
Value3Model<
A, B, C> - A simple Model wrapping three values.
-
ValueModel<
T> - A simple Model wrapping a single value.
- WidgetLogic
- A Logic that holds a reference to the BuildContext of its owning widget.
- WidgetModel
- A Model that holds a reference to the BuildContext of its owning widget.
Mixins
- EventConsumerMixin
- Mixin for Model that allows it to listen to events from an EventModel.
- EventContainerMixin
- Internal mixin that stores event-to-listener mappings.
-
EventModel<
T> - Mixin for TopModel that supports event-driven local refresh.
- ExposedContainerMixin
- Internal mixin that provides a registry for ExposedMixin instances.
- ExposedMixin
-
Mixin that registers the current instance in the
CoreContainerso it can be looked up from anywhere via find(). -
SelectorMixin<
T> - Mixin that enables conditional refresh based on selected values.
Extensions
- MoReadContext on BuildContext
- Extension on BuildContext to read values from the nearest MoScope.
- MoWatchContext on BuildContext
- Extension on BuildContext to watch values from the nearest MoScope.
- MutableBoolExt on bool
- Convert a bool to a Mutable<bool>.
-
MutableBoolFunExt
on Mutable<
bool?> - Boolean operations on Mutable<bool?>.
- MutableDoubleExt on double
- Convert a double to a Mutable<double>.
- MutableIntExt on int
- Convert an int to a Mutable<int>.
-
MutableListExtension
on List<
T> - Convert a List to a Mutable<List<T>>.
- MutableNumExt on num
- Convert a num to a Mutable<num>.
-
MutableNumFunExt
on Mutable<
T?> -
Numeric operations on Mutable<T?> where
Textends num. - MutableStringExt on String
- Convert a String to a Mutable<String>.
-
MutableStringFunExt
on Mutable<
String?> - String operations on Mutable<String?> that delegate to the inner value.
- MutableT on T
- Convert any value to a Mutable<T>.
Properties
-
debugTopKey
→ GlobalKey<
State< ?StatefulWidget> > -
Debug access to the internal GlobalKey of the current TopProvider.
no setter
Functions
-
find<
T extends ExposedMixin> ({BuildContext? context}) → T? -
Find the last-registered ExposedMixin of type
T. -
findFuzzy(
String type, {BuildContext? context}) → ExposedMixin? - Fuzzy lookup for an exposed instance by its type name string.
-
moNotifierProvider<
T extends ChangeNotifier> (Create< T> create) → MoProviderBuilder - Create a MoNotifierProvider builder function for MoMultiProvider.
-
moNotifierProviderValue<
T extends ChangeNotifier> (T value) → MoProviderBuilder - Create a MoNotifierProvider.value builder function for MoMultiProvider.
-
moProvider<
T> (Create< T> create, {Dispose<T> ? dispose}) → MoProviderBuilder - Create a MoProvider builder function for MoMultiProvider.
-
moProviderValue<
T> (T value) → MoProviderBuilder - Create a MoProvider.value builder function for MoMultiProvider.
-
top<
T extends TopModel> () → T - Retrieve a TopModel from the app root.
Typedefs
-
Create<
T> = T Function(BuildContext context) - Factory function that creates an instance given a BuildContext.
-
Dispose<
T> = void Function(T value) - Cleanup function called when a provider disposes its value.
- Init = void Function(BuildContext context, VoidCallback refresh)
- Initialization callback that receives a refresh function.
-
LogicInit<
T> = void Function(BuildContext context, T logic) -
Logic init signature. No
refreshcallback is exposed: state lives on the Model, so triggering a rebuild from Logic goes throughmodel.refresh()(orMoLogic.refresh), not a widget-local setter. -
LogicWidgetBuilder<
T> = Widget Function(BuildContext, T) - Builder signature for LogicWidget.
-
ModelLogicInit<
T, R> = void Function(BuildContext context, T model, R logic) - Same convention as LogicInit: refresh goes through the Model.
-
ModelLogicWidgetBuilder<
T, R> = Widget Function(BuildContext, T, R, Widget?) - Builder signature for MoLcWidget.
-
ModelWidgetBuilder<
T> = Widget Function(BuildContext, T, Widget?) - Builder signature for ModelWidget.
- MoProviderBuilder = Widget Function(Widget child)
- Wraps a child widget with a provider.
- RefreshCallback = bool Function()
-
Callback returned by a refreshable widget to check if it is still mounted.
Returns
trueif the widget should remain subscribed.