katana_scoped library

A state management package to allow for retention and management while specifying the scope of the state.

To use, import package:katana_scoped/katana_scoped.dart.

Classes

Api
Provides static methods for making HTTP requests.
AppRef
ScopedValue in the scope of the application.
AppScoped
Place it close to the route (e.g., on top of MaterialApp) to use state management in the app.
AppScopedQuery<Result>
ScopedQuery available at app scope.
AppScopedQueryFamily<Result, Param>
You can pass one parameter AppScopedQuery.
AppScopedValueListener
ScopedValueListener that targets the app.
AppScopedValueOrAppRef
AppRef or AppScopedValueRef to store state in App scope.
AppScopedValueRef
ScopedValueRef of the application.
ChangeNotifierAppScopedQuery<Result extends Listenable?>
ChangeNotifierScopedQuery available at app scope.
ChangeNotifierAppScopedQueryFamily<Result extends Listenable?, Param>
You can pass one parameter ChangeNotifierAppScopedQuery.
ChangeNotifierPageScopedQuery<Result extends Listenable?>
ChangeNotifierScopedQuery available at page scope.
ChangeNotifierPageScopedQueryFamily<Result extends Listenable?, Param>
You can pass one parameter ChangeNotifierPageScopedQuery.
ChangeNotifierScopedQuery<Result extends Listenable?>
ChangeNotifierScopedQuery makes it possible to define values globally and manage states individually and safely.
ChangeNotifierScopedQueryBase<Result, TRef extends Ref>
Base class that can specify the type of the provider part of ScopedQuery.
ChangeNotifierScopedQueryFamily<Result extends Listenable?, Param>
You can pass one parameter ChangeNotifierScopedQuery.
ChangeNotifierScopedQueryFamilyBase<Result extends Listenable?, TRef extends Ref, Param>
You can pass one parameter ChangeNotifierScopedQuery.
ChangeNotifierWidgetScopedQuery<Result extends Listenable?>
ChangeNotifierScopedQuery available in the widget scope.
ChangeNotifierWidgetScopedQueryFamily<Result extends Listenable?, Param>
You can pass one parameter ChangeNotifierWidgetScopedQuery.
ConsoleLoggerAdapter
LoggerAdapter for outputting logs to the console.
DateDuration
A class that represents a date period.
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
FutureContext<T>
Object returned when future is executed.
Immutable
Used to annotate a class.
LocalLoggerAdapter
Logging can be done locally on the terminal LoggerAdapter.
Loggable
Interface for objects that can be passed directly to Logger.send.
Logger
Used for active logging.
LoggerAdapter
Base class for defining platform adapters for storing logs.
LoggerAdapterScope
Place it on top of MaterialApp, etc., and set LoggerAdapter for the entire app.
LoggerDatabase
A simple database for logging information.
LoggerExporter
Import and export DynamicMap data used in LoggerDatabase to external files.
LoggerTrace
LoggerTraceValue
Base class for tracing logs and measuring performance.
LogValue
Class for defining log values for viewing.
NumRange<TNum extends num>
A class that represents a range of numbers.
OnContext
Object returned when executing on.
PageOrAppScopedValueOrAppRef
AppScopedValueOrAppRef that stores state in page scope and App scope.
PageOrWidgetScopedValueRef
ScopedValueRef of the Page or Widget (whose state can be monitored).
PageRef
A page-scoped reference passed from PageScopedWidget.build.
PageScopedQuery<Result>
ScopedQuery available at page scope.
PageScopedQueryFamily<Result, Param>
You can pass one parameter PageScopedQuery.
PageScopedValueListener
ScopedValueListener that targets the page.
PageScopedValueRef
Page's ScopedValueRef.
PageScopedWidget
Abstract class for creating widgets for use on pages.
QueryScopedValue<TResult, TRef extends Ref>
Class for extensions to manage state.
QueryScopedValueRef<TRef extends Ref>
Ref used inside ScopedQuery.
QueryScopedValueState<TResult, TRef extends Ref, TScopedValue extends QueryScopedValue<TResult, TRef>>
State created by ScopedValue.
RectRange<TNum extends num>
A class that represents a range of numbers.
Ref
Base class for References passed from ScopedWidget, etc.
RefHasAny
RefHasApp or RefHasPage, RefHasWidget.
RefHasApp
Reference with ScopedValueRef in the application scope.
RefHasPage
Reference with page scope Ref.
RefHasWidget
Reference with widget scope Ref.
RefOrRefHasAny
Ref or RefHasApp, RefHasPage, RefHasWidget.
Required
Used to annotate a named parameter p in a method or function f.
RuntimeLoggerAdapter
Logging in memory LoggerAdapter.
ScheduleContext
Object returned when schedule is executed.
Scoped
Widgets for state management within a page or widget.
ScopedQuery<Result>
ScopedQuery makes it possible to define values globally and manage state individually and safely.
ScopedQueryBase<Result, TRef extends Ref>
Base class that can specify the type of the provider part of ScopedQuery.
ScopedQueryFamily<Result, Param>
You can pass one parameter ScopedQuery.
ScopedQueryFamilyBase<Result, TRef extends Ref, Param>
Base class that allows specifying the type of the provider part of ScopedQuery that allows passing a single parameter.
ScopedValue<TResult>
Class for extensions to manage state.
ScopedValueContainer
Container object for storing ScopedValue.
ScopedValueListener
An object to monitor ScopedValue in the widget.
ScopedValueRef
Ref associated with the widget.
ScopedValueState<TResult, TScopedValue extends ScopedValue<TResult>>
State created by ScopedValue.
ScopedWidget
Abstract class for creating widgets that can perform state management under the page.
ScopedWidgetBase
Base class from which widgets can be retrieved with ScopedWidgetScope.of.
ScopedWidgetScope
InheritedWidget for making ScopedWidgetBase retrievable from descendant widgets.
TestAppScoped
Test scope for AppScoped.
TestLoggerAdapterScope
Test scope for LoggerAdapter.
WidgetRef
A reference scoped to the widget passed from ScopedWidget.build or Scoped.builder.
WidgetScopedQuery<Result>
ScopedQuery available in the widget scope.
WidgetScopedQueryFamily<Result, Param>
You can pass one parameter WidgetScopedQuery.
WidgetScopedValueRef
Widget's ScopedValueRef.

Enums

DayOfWeek
Day of the week.
ScopedLoggerEvent
Status management events for logging.
ScopedLoggerScope
State management scope for logging.

Extensions

BooleanExtensions on bool
Provides extended methods for bool.
DateTimeExtensions on DateTime
Provides extended methods for DateTime.
DateTimeIterableExtensions on Iterable<DateTime>
Provides extended methods for DateTime arrays.
DoubleExtensions on double
Provides extended methods for double.
DoubleIterableExtensions on Iterable<double>
Provides extended methods for double arrays.
DurationExtensions on Duration
Provides extended methods for Duration.
DynamicMapExtensions on Map<String, dynamic>
Provides extended methods for DynamicMap.
InterableOfIterableExtensions on Iterable<Iterable<T>>
Provides extended methods for Iterable arrays.
IntExtensions on int
Provides extended methods for int.
IntIterableExtensions on Iterable<int>
Provides extended methods for int arrays.
IterableExtensions on Iterable<T>
Provides extended methods for T arrays.
JsonDynamicListExtensions on DynamicList
Provides Json extension methods for DynamicList.
JsonDynamicMapExtensions on DynamicMap
Provides Json extension methods for DynamicMap.
ListExtensions on List<T>
Provides extended methods for List in T.
MapExtensions on Map<K, V>
Provides extended methods for Map.
NullableDoubleExtensions on double?
Provides an extension method for double that is nullable.
NullableIntExtensions on int?
Provides an extension method for int that is nullable.
NullableIterableExtensions on Iterable<T>?
Provides an extension method for Iterable that is nullable.
NullableListExtensions on List<T>?
Provides an extension method for List that is nullable.
NullableMapExtensions on Map<K, V>?
Provides an extension method for Map that is nullable.
NullableNumExtensions on num?
Provides an extension method for num that is nullable.
NullableObjectExtensions on Object?
Provides an extension method for List that is nullable.
NullableSetExtensions on Set<T>?
Provides an extension method for Set that is nullable.
NullableStringExtensions on String?
Provides an extension method for String that is nullable.
NullableUriExtensions on Uri?
Provides an extension method for Uri that is nullable.
NullableValueIterableExtensions on Iterable<T?>
Provides an extension method for Iterable whose value is nullable.
PageOrWidgetScopedValueRefCacheExtensions on PageOrWidgetScopedValueRef
Provides an extension method for PageOrWidgetScopedValueRef to perform caching.
PageOrWidgetScopedValueRefFutureExtensions on PageOrWidgetScopedValueRef
Provides an extended method for PageOrWidgetScopedValueRef to monitor Future.
PageOrWidgetScopedValueRefOnExtensions on PageOrWidgetScopedValueRef
Provides extension methods for PageOrWidgetScopedValueRef for processing in the lifecycle.
PageOrWidgetScopedValueRefPeriodicExtensions on PageOrWidgetScopedValueRef
Provides extension methods for PageOrWidgetScopedValueRef to perform periodic processing.
PageOrWidgetScopedValueRefRefreshExtensions on PageOrWidgetScopedValueRef
Provides an extension method for PageOrWidgetScopedValueRef to update the widget.
PageOrWidgetScopedValueRefScheduleExtensions on PageOrWidgetScopedValueRef
Provides an extension method for PageOrWidgetScopedValueRef to perform scheduling.
PageOrWidgetScopedValueRefTimerExtensions on PageOrWidgetScopedValueRef
Provides an extension method for PageOrWidgetScopedValueRef to process Timer.
PageOrWidgetScopedValueRefWatchExtensions on PageOrWidgetScopedValueRef
Provides an extended method for PageOrWidgetScopedValueRef to monitor ChangeNotifier.
PageScopedValueRefAncestorExtensions on PageOrWidgetScopedValueRef
Provides an extension method for PageOrWidgetScopedValueRef to retrieve a ScopedValue that already exists in the page or widget scope.
QueryScopedValueRefPageOrWidgetScopedValueRefCacheExtensions on QueryScopedValueRef<PageOrWidgetScopedValueRef>
Provides an extension method for QueryScopedValueRef to perform caching.
QueryScopedValueRefPageOrWidgetScopedValueRefWatchExtensions on QueryScopedValueRef<PageOrWidgetScopedValueRef>
Provides an extended method for QueryScopedValueRef to monitor ChangeNotifier.
QueryScopedValueRefQueryExtensions on QueryScopedValueRef<TRef>
Provides an extension method for QueryScopedValueRef to manage state using ScopedQuery.
RandomExtensions on Random
Provides extended methods for Random.
RefCacheExtensions on Ref
Provides an extension method for Ref to perform caching.
RefFetchExtensions on AppScopedValueOrAppRef
Provides an extension method for AppScopedValueOrAppRef to retrieve a ScopedValue that already exists.
RefFutureExtensions on Ref
Provides an extended method for Ref to monitor Future.
RefHasAppQueryExtensions on RefHasApp
Provides an extension method for RefHasApp to manage state using ScopedQuery.
RefHasPageCacheExtensions on RefHasPage
Provides an extension method for RefHasPage to perform caching.
RefHasPageFetchExtensions on RefHasPage
Provides an extension method for RefHasPage to retrieve an already existing ScopedValue.
RefHasPageFutureExtensions on RefHasPage
Provides an extended method for RefHasPage to monitor Future.
RefHasPageOnExtensions on RefHasPage
Provides extension methods for RefHasPage for processing in the lifecycle.
RefHasPagePeriodicExtensions on RefHasPage
Provides extension methods for RefHasPage to perform periodic processing.
RefHasPageRefreshExtensions on RefHasPage
Provides an extension method for RefHasPage to update the widget.
RefHasPageScheduleExtensions on RefHasPage
Provides extended methods for RefHasPage to perform scheduling.
RefHasPageTimerExtensions on RefHasPage
Provides extended methods for RefHasPage to process Timer.
RefHasPageWatchExtensions on RefHasPage
Provides an extended method for RefHasPage to monitor ChangeNotifier.
RefQueryExtensions on Ref
Provides an extension method for Ref to manage state using ScopedQuery.
RefWatchExtensions on Ref
Provides an extended method for Ref to monitor ChangeNotifier.
ScopedWidgetBuildContextExtensions on BuildContext
ScopedWidget related extensions for BuildContext.
SetExtensions on Set<T>
Provides extended methods for Set.
StringExtensions on String
Provides extended methods for String.
UriExtensions on Uri
Provides extended methods for Uri.

Constants

nullOfBool → const bool?
A null object with a defined type of bool?
nullOfDouble → const double?
A null object with a defined type of double?
nullOfDynamicList → const DynamicList?
A null object with a defined type of DynamicList?
nullOfDynamicMap → const DynamicMap?
A null object with a defined type of DynamicMap?
nullOfInt → const int?
A null object with a defined type of int?
nullOfNum → const num?
A null object with a defined type of num?
nullOfString → const String?
A null object with a defined type of String?
zeroOfNum → const num
A 0 object with a defined type of num?

Properties

sprintf ↔ PrintFormat
getter/setter pair

Functions

generateCode(int length, {int seed = 0, String charSet = "23456789abcdefghjkmnpqrstuvwxy"}) String
Generates and returns a random string with the number of characters given by length.
initializeDateFormatting([String? locale, String? ignored]) Future<void>
This should be called for at least one locale before any date formatting methods are called. It sets up the lookup for date symbols. Both the locale and ignored parameter are ignored, as the data for all locales is directly available.
jsonDecodeAsList<T extends Object?>(String json, [List<T> defaultValue = const []]) List<T>
Converts json to a Json-decoded List
jsonDecodeAsMap<T extends Object?>(String json, [Map<String, T> defaultValue = const {}]) Map<String, T>
Converts json to a Json-decoded Map<String, dynamic> object.
jsonEncodable(Object? o) bool
If this object is Json encodable, true is returned.
nullOfList<T>() List<T>?
A null object with a defined type of List<T>?
nullOfMap<K, V>() Map<K, V>?
A null object with a defined type of Map<K, V>?
nullOfSet<T>() Set<T>?
A null object with a defined type of Set<T>?
uuid({DateTime? baseTime, bool reverse = false}) String
Generate and retrieve the UUID for Version 7.
wait(Iterable futures) Future<void>
Wait until all Futures given in futures are completed.

Typedefs

ApiResponse = Response
An HTTP response where the entire response body is known in advance.
ApiResquest = Request
An HTTP request where the entire request body is known in advance.
DynamicList = List
Represents the type of List<dynamic>.
DynamicMap = Map<String, dynamic>
Represents the type of Map<String, dynamic>.