okito library

okito is the simplest state management solution ever, at least I think so.

It depends on nothing, works really fast with minimum code usage.

With okito, you don't need to wrap your material app for state, you don't need any complex libraries and most importantly your don't need context to have a state or update state.

Classes

AppController
The root controller of OkitoMaterialApp and OkitoCupertinoApp.
OkitoBuilder<T extends OkitoController>
OkitoBuilder is the easiest way to track state changes and re-render state on change.
OkitoBuilderLite<T extends OkitoController>
OkitoBuilderLite is the lite version of OkitoBuilder
OkitoController
OkitoController is the head of okito state management.
OkitoCupertinoApp
OkitoCupertinoApp is the replacement of CupertinoApp to use all of Okito features in your app!
OkitoMaterialApp
OkitoMaterialApp is the replacement of MaterialApp to use all of Okito features in your app!
OkitoObserver
For this file, I don't think that it is necessary to add detailed documents for each function, so I will describe them here.
OkitoTickerProvider
For newer versions of Flutter, you can just use this;
RockitofulWidget<T extends OkitoController>
An implementation of StatefulWidget using Rockitos

Mixins

OkitoDependencyInjection
The base of Okito dependency injection.
OkitoDevice
This mixin provides informations about the device in an easier way.
OkitoFunctions
Okito provides easier ways to use utility functions.
OkitoRouting
This is actually the most important mixin of Okito class. It handles all the routing and it has the navigatorKey property.
OkitoTickerProviderMixin
A simple ticker provider mixin. Usage:
OkitoWidgets
The way to use widgets like snackbar or bottom modal sheet without context, we have this mixin. We have to override the context in Okito.

Extensions

BuildContextExtensions on BuildContext
The extensions for BuildContext that helps in development.
StringExtensions on String
These extensions are both for utility and localization.

Properties

Okito → _Okito
The root of Okito library's utilities.
final
OkitoStorage → _OkitoStorage
OkitoStorage is a local storage implementation for Okito.
final

Functions

OkitoWatcher<T extends OkitoController>({required T watch, required WatcherCallback<T> onChange}) Function
OkitoWatcher is the easiest and the most lightweight way to observe controller changes outside of OkitoBuilder.
Rockito<T extends OkitoController>(ControllerCallback<T> callback, {FilterCallback<T>? filter}) Widget
The Rockito and other Rockitos are the way to use builders with Okito.inject().
RockitoBuilder<T extends OkitoController>({required ControllerCallback<T> builder, T? inject, bool watchAllStorageKeys = false, List<String> watchStorageKeys = const [], List<OkitoController> otherControllers = const [], FilterCallback<T>? filter}) Widget
The RockitoBuilder and other Rockitos are the way to use builders with Okito.inject().
RockitoWatcher<T extends OkitoController>(WatcherCallback<T> callback, {T? inject}) Function
RockitoWatcher is the easiest and the most lightweight way to observe controller changes outside of OkitoBuilder using Rockitos.