model_exports library

Classes

AggregateApiReader
ApiClient
ApiConfig
A portable object for passing api configuration across isolates.
ApiCreateSignal<T>
ApiDeleteSignal<T>
ApiErrorItem
ApiErrorPayload
ApiKeyAuth
ApiReader
ApiRegistry
ApiSignal<T>
ApiUpdateSignal<T>
AsciiCodec
An AsciiCodec allows encoding strings as ASCII bytes and decoding ASCII bytes to strings.
AsciiDecoder
Converts ASCII bytes to string.
AsciiEncoder
Converts strings of only ASCII characters to bytes.
AsyncValueStream<T>
The AsyncValueStream is used as a clearing house when more than one consumer need to update a single value, but you want to control the lifecycle around updates, so that older updates that take longer to calculate don't clobber newer values.
Authentication
AuthUserProfile
The combination of a firebase user + a reliveit user profile. Most places in the app want to subscribe to auth events after the user profile has been loaded to distinguish from an account that's in the process of being created.
Base64Codec
A base64 encoder and decoder.
Base64Decoder
Decoder for base64 encoded data.
Base64Encoder
Base64 and base64url encoding converter.
BaseMediaContentType<F extends Object>
Adds equality
BearerAuthentication
ByteConversionSink
The ByteConversionSink provides an interface for converters to efficiently transmit byte data.
Change
ChangeBase
ChangeFields
ChangePaths
ChangeResult
ChangeResultBase
ChangeResultFields
ChangeResultPaths
ChunkedConversionSink<T>
A ChunkedConversionSink is used to transmit data more efficiently between two converters during chunked conversions.
ClientIdSecretCredentials
ClosableStringSink
A ClosableStringSink extends the StringSink interface by adding a close method.
Codec<S, T>
A Codec encodes and (if supported) decodes data.
CollectionAwareApiReader
ContactInfoPart
DatePart
DateParts
Debouncer
DefaultFlexiDateParser
DefaultMEntity
DefaultMModelList<M>
Definition
Definitions
DeleteResponse
DeviceInfo
DiffLogEntry
DiffLogEntryBase
DiffLogEntryFields
DiffLogEntryPaths
Encoding
Open-ended set of encodings.
Entity
EntityExtensions
ErrorStack
FlexiDate
FlexiDate2
FlexiDateData
A flexible container for date components that provides a robust parsing/building mechanism. If the input type is known to be a String, Map or DateTime, then use the corresponding constructors.
FlexiDateParser
FStream<T>
A value stream based where the first element is a future
Functions
FuturesStream
GeoLocation
GeoPoint
HasBaseCode
HasDisposers
HasMverseMeta
HeadedEntryStream<K, V>
HStream<T>
HtmlEscape
Converter which escapes characters with special meaning in HTML.
HtmlEscapeMode
HTML escape modes.
HttpBasicAuthentication
IMediaService
Immutable
Used to annotate a class.
InfoX
InvalidFlexiDate
Represents a date that's couldn't be parsed.
ISchemaProperty
JsonCodec
A JsonCodec encodes JSON objects to strings and decodes strings to JSON objects.
JsonDecoder
This class parses JSON strings and builds the corresponding objects.
JsonEncoder
This class converts JSON objects to strings.
JsonPath<T>
Represents a json-pointer - can be used to do json-pointer operations on MModel instances.
JsonUtf8Encoder
Encoder that encodes a single object as a UTF-8 encoded JSON string.
Keyed<K, V>
Latin1Codec
A Latin1Codec encodes strings to ISO Latin-1 (aka ISO-8859-1) bytes and decodes Latin-1 bytes to strings.
Latin1Decoder
This class converts Latin-1 bytes (lists of unsigned 8-bit integers) to a string.
Latin1Encoder
This class converts strings of only ISO Latin-1 characters to bytes.
Limiter
LineSplitter
A StreamTransformer that splits a String into individual lines.
ListDelegateMixin<T>
ListIndex<T>
Lists
MapModel
Maps
MArtifactRef
MBaseModel
MediaContentType<F extends Object>
MEntity
Represents an entity defined by a json-schema that's backed by json value using the wrapped field. A MModel is a non-persisted entity, where as MEntity represents a persisted entity that has an ID
Contains all registered enum types to support deserialization.
MKey
Inside the sunny datastore, each record is identified by a key that provides 3 parts:
MLiteral<T>
MMeta
MModel
Represents an entity defined by a json-schema.
MModelList<M>
MModelRegistry
Contains all registered MBaseModel types to support deserialization. The registry reads the mtype property in the json object, and finds the appropriate factory method.
MModelRegistryReader
MModuleRef
MOperationRef
A reference that points to a versioned json-schema for an operation or action
MSchemaRef
A reference that points to a versioned json-schema for an entity
MSchemaTypes
OAuth
PrimitiveApiReader
ProgressTracker<T>
QueryParams
RecordKey
Repository<V extends Entity>
Base interface for defining persistence endpoints. Can be plugged into SunnyStore for convenient API access
RequestBuilder
Required
Used to annotate a named parameter p in a method or function f.
Result<T>
SafeCompleter<T>
StringConversionSink
A sink for converters to efficiently transmit String data.
StringJoiner
SunnyApi<M extends Entity>
SunnyDart
Makes it easier to import
SunnyGet
Base interface for doing service lookups. This can work with the provider package, or a injector framework like kiwi
SunnyLocalization
Based on the timezone package - provides the user's timezone and location (not GPS, just generalized)
SunnyPlace
Represents a physical location. Represented by a few different generated models. See Location and ContactAddress
SyncStream<T>
The SyncStream is used to control (and potentially debounce) updates to a single value, that are then dispatched as a single stream of updates
ThirdPartyApi<C>
Throttler
TimedResult<T>
TimeSpan
Represents a user-defined duration. Unlike Duration, this class does not normalize down to microseconds value, but preserves the original precision.
TimeUnit
TimeUnitBase
Token
Tokenizer
Tuple<A, B>
UpdateRequest<T>
UpdateResult<T>
UserDetails
UseResult
See useResult for more details.
UserPrefKey
Utf8Codec
A Utf8Codec encodes strings to utf-8 code units (bytes) and decodes UTF-8 code units to strings.
Utf8Decoder
This class converts UTF-8 code units (lists of unsigned 8-bit integers) to a string.
Utf8Encoder
This class converts strings to their UTF-8 code units (a list of unsigned 8-bit integers).
ValidationError
ValueStream<T>
Interface representing a stream that has a current or initial value as well.
ValueStreamController<T>
A class that tracks a single value as a stream, but can also provide the latest value;
WordBuilder
ZipList<T>

Mixins

CachingApiReaderMixin
Disposable
LoggingMixin
MBaseModelMixin
MModelFactoryRegistry
SignalingApiMixin<V extends Entity>
This mixin is applied to auto-generated apis, and ensures that the modification events are propagated and can be listened to.
TupleMixin<A, B>

Extensions

AnyExtensions on T?
AnyFutureExtensions on Future<T>
AnyFutureNullableExtensions on Future<T>?
ApiReaderExt on ApiReader
ApiSignalStream on Stream<ApiSignal>?
AsyncExpand on Stream<T>
Alternatives to asyncExpand.
AsyncMap on Stream<T>
Alternatives to asyncMap.
BoolExtension on bool
BoolNullableExtension on bool?
CombineLatest on Stream<T>
Utilities to combine events from multiple streams through a callback or into a list.
ComparableIterXX on Iterable<T>
Concatenate on Stream<T>
Utilities to append or prepend to a stream.
CoreListExtension on List<T>
CoreListNullableExtension on List<T>?
DateComponentsComparisons on FlexiDate
DateComponentsFormat on FlexiDate
DateTimeNullableExtensions on DateTime?
DateTimeNullableXX on DateTime?
DateTimeToFlexiDateExtensions on DateTime
DateTimeXX on DateTime
DoubleExt on double
DurationExt on Duration
DurationExtensions on int
DynamicExtension on dynamic
DynamicMapExtensionMap on Map<K, dynamic>
EnumValueExtensions on Object?
ErrorList on List<ValidationError>
FlexiDateExt on FlexiDate
FlexiDateTimeExt on DateTime
FutureExtensions on Future<T>
FutureIterableExt on Iterable<Future<T>>
FutureIterableStreamExtension on Stream<Iterable<Future<V>>>
FutureNullableExtensions on Future<T?>
FutureOrExts on FutureOr<T>
FutureOrIterableExt on Iterable<FutureOr<T>>
FutureOrIterableNullExt on Iterable<FutureOr<T>>?
FutureOrNullableExts on FutureOr<T?>
HasMMetaExt on HasMverseMeta
IntList on List<int>
IterableEntryExtensions on Iterable<MapEntry<K, V>>
IterableFutureExt on FutureOr<Iterable<T>>
IterationPositionExtensions on IterationPosition
IterDynXX on Iterable<T>
IterIterXX on Iterable<Iterable<V>>
IterMapEntryXX on Iterable<MapEntry<K, V>>
IterObjXX on Iterable<T>
IterOfNullableXX on Iterable<V?>
IterOfNumNullableXX on Iterable<num>?
JsonPathOperatorExtensions on JsonPath<T>
JsonPathOperatorNullExtensions on JsonPath<T>?
ListStringXX on Iterable<String>
LocalizationDateTimeExt on DateTime
LoggerExtensions on Logger
MapDebug on Map
MapExtensions on Map<K, V>
MapListDebug on Map<K, List<V>>?
MapNullableExtensions on Map<K, V>?
MapValueNullXX on Map<K, V?>
MapXX on Map<K, V>
MEntityEquality on MEntity
Merge on Stream<T>
Utilities to interleave events from multiple streams.
MKeyExt on MKey
MModelExt on MModel?
ModelMapExtensions on Map<String, dynamic>
MSchemaRefExtensions on MSchemaRef
MSchemaRefFactoryExt on MSchemaRef
Multiples on int
NestedFuture on Future<Future<T>?>
NestedFutureOr on FutureOr<FutureOr<T>>
NestedNullableFutureOr on FutureOr<FutureOr<T>?>?
NullIterXX on Iterable<V>?
NullListXX on List<V>?
NullSetXX on Set<V>?
NumExt on num
NumXX on num
NumXXNullable on num?
ObjectAsListExtension on Object?
ObjectBaseCodeExtension on Object?
ObjectExtension on dynamic
ObjectToListExtension on T
ObjectTupleExt on X
PlatformInfoFuture on FutureOr<DeviceInfo>
PropSchemaTypeExtensions on PropSchemaType
RateLimit on Stream<T>
Utilities to rate limit events.
RepositoryExtensions on Repository<X>
ResultExtension on Result?
SafeStreamController on StreamController<X>
Scan on Stream<T>
A utility similar to fold which emits intermediate accumulations.
SetNullableExtension on Set<T>?
StateObserverAutoStream on StreamSubscription<T>
StreamAutoReader on Stream<T>
StreamDisposableMixin on Stream<X>
StreamExt on Stream<T>
StreamIterableExtension on Stream<Iterable<X>>
StreamNullableExt on Stream<X?>
StreamSortSampleExtension on Stream<T>
StreamToVStreamExtensions on Stream<X>
StreamTxrNullableExtensions on Stream<X>?
StringBufferExt on StringBuffer
StringNullableXX on String?
StringTitleExt on String?
StringUriExtensions on String?
StringXX on String
SunnyIterableExtensionExt on Iterable<T?>
SunnyIterableExtensions on Iterable<V>?
SunnyIterableSafeExtensionExt on Iterable<T>
SunnyLocalizationExt on Future<SunnyLocalization>
Switch on Stream<T>
A utility to take events from the most recent sub stream returned by a callback.
SwitchLatest on Stream<Stream<T>>
A utility to take events from the most recent sub stream.
TakeUntil on Stream<T>
A utility to end a stream based on an external trigger.
Tap on Stream<T>
A utility to chain extra behavior on a stream.
ThirdPartyCredsApis on _ThirdPartyCreds
TimeSpanExtensions on TimeSpan
TimeSpanNullableExtensions on TimeSpan?
TimeSpanUnitExt on TimeSpanUnit?
TypeExtensions on Type
UriTemplateExtensions on UriTemplate?
ValueStreamExtensions on ValueStream<T>
ValueStreamFutureExtensions on ValueStream<Future<X>>
ValueStreamIterableExtensions on ValueStream<Iterable<X>>
ValueStreamIterableFutureExtensions on ValueStream<Iterable<Future<X>>>
ValueStreamIterableMapEntryExtensions on ValueStream<Iterable<MapEntry<K, V>>>
ValueStreamOfMapExtensions on ValueStream<Map<K, V>>
Where on Stream<T>
Utilities to filter events.
WhereNotNull on Stream<T?>

Constants

aggresiveTokenizer → const String
alwaysThrows → const _AlwaysThrows
Used to annotate a function f. Indicates that f always throws an exception. Any functions that override f, in class inheritance, are also expected to conform to this contract.
ascii → const AsciiCodec
An instance of the default implementation of the AsciiCodec.
base64 → const Base64Codec
A base64 encoder and decoder.
base64Url → const Base64Codec
A base64url encoder and decoder.
ChangeRef → const MSchemaRef
ChangeResultRef → const MSchemaRef
chars → const String
checked → const _Checked
Used to annotate a parameter of an instance method that overrides another method.
DiffLogEntryRef → const MSchemaRef
digits → const Set<String>
doNotStore → const _DoNotStore
Used to annotate a method, getter or top-level getter or function to indicate that the value obtained by invoking it should not be stored in a field or top-level variable. The annotation can also be applied to a class to implicitly annotate all of the valid members of the class, or applied to a library to annotate all of the valid members of the library, including classes. If a value returned by an element marked as doNotStore is returned from a function or getter, that function or getter should be similarly annotated.
emptyList → const List
experimental → const _Experimental
Used to annotate a library, or any declaration that is part of the public interface of a library (such as top-level members, class members, and function parameters) to indicate that the annotated API is experimental and may be removed or changed at any-time without updating the version of the containing package, despite the fact that it would otherwise be a breaking change.
factory → const _Factory
Used to annotate an instance or static method m. Indicates that m must either be abstract or must return a newly allocated object or null. In addition, every method that either implements or overrides m is implicitly annotated with this same annotation.
htmlEscape → const HtmlEscape
A String converter that converts characters to HTML entities.
immutable → const Immutable
Used to annotate a class C. Indicates that C and all subtypes of C must be immutable.
internal → const _Internal
Used to annotate a declaration which should only be used from within the package in which it is declared, and which should not be exposed from said package's public API.
isTest → const _IsTest
Used to annotate a test framework function that runs a single test.
isTestGroup → const _IsTestGroup
Used to annotate a test framework function that runs a group of tests.
json → const JsonCodec
An instance of the default implementation of the JsonCodec.
kday → const String
kmonth → const String
kyear → const String
latin1 → const Latin1Codec
An instance of the default implementation of the Latin1Codec.
literal → const _Literal
Used to annotate a const constructor c. Indicates that any invocation of the constructor must use the keyword const unless one or more of the arguments to the constructor is not a compile-time constant.
metaFields → const Set<String>
Fields in the json payload that are metadata (not values)
months → const Set<int>
mustBeOverridden → const _MustBeOverridden
Used to annotate an instance member m declared on a class or mixin C. Indicates that every subclass of C, concrete or abstract, must directly override m.
mustCallSuper → const _MustCallSuper
Used to annotate an instance member (method, getter, setter, operator, or field) m. Indicates that every invocation of a member that overrides m must also invoke m. In addition, every method that overrides m is implicitly annotated with this same annotation.
nonVirtual → const _NonVirtual
Used to annotate an instance member (method, getter, setter, operator, or field) m in a class C or mixin M. Indicates that m should not be overridden in any classes that extend or mixin C or M.
numberPattern → const String
numbers → const String
operation → const String
optionalTypeArgs → const _OptionalTypeArgs
Used to annotate a class, mixin, extension, function, method, or typedef declaration C. Indicates that any type arguments declared on C are to be treated as optional.
protected → const _Protected
Used to annotate an instance member in a class or mixin which is meant to be visible only within the declaring library, and to other instance members of the class or mixin, and their subtypes.
redeclare → const _Redeclare
Used to annotate an instance member of an extension type that redeclares a member from a superinterface.
reopen → const _Reopen
Annotation for intentionally loosening restrictions on subtyping that would otherwise cause lint warnings to be produced by the implicit_reopen lint.
required → const Required
Used to annotate a named parameter p in a method or function f. Indicates that every invocation of f must include an argument corresponding to p, despite the fact that p would otherwise be an optional parameter.
schema → const String
sealed → const _Sealed
Annotation marking a class as not allowed as a super-type.
spaceTokenizer → const String
spanPattern → const String
unicodeBomCharacterRune → const int
The Unicode Byte Order Marker (BOM) character U+FEFF.
unicodeReplacementCharacterRune → const int
The Unicode Replacement character U+FFFD (�).
useResult → const UseResult
Used to annotate a method, field, or getter within a class, mixin, or extension, or a or top-level getter, variable or function to indicate that the value obtained by invoking it should be used. A value is considered used if it is assigned to a variable, passed to a function, or used as the target of an invocation, or invoked (if the result is itself a function).
utf8 → const Utf8Codec
An instance of the default implementation of the Utf8Codec.
virtual → const _Virtual
Used to annotate a field that is allowed to be overridden in Strong Mode.
visibleForOverriding → const _VisibleForOverriding
Used to annotate an instance member that was made public so that it could be overridden but that is not intended to be referenced from outside the defining library.
visibleForTesting → const _VisibleForTesting
Used to annotate a declaration that was made public, so that it is more visible than otherwise necessary, to make code testable.

Properties

aggresiveTokenizerPattern RegExp
final
apiClient ApiClient
no setter
apiRegistry ApiRegistry
no setter
compactFormat → NumberFormat
final
currencyFormat → NumberFormat
final
dateUnits List<TimeSpanUnit>
final
defaultLabels Map<TimeSpanUnit, String>
final
durationPattern String
final
durationRegex RegExp
final
equalsChecker → DeepCollectionEquality
final
flexiDateFormatter FlexiDateFormatter
getter/setter pair
infoX InfoX
no setter
inputSchemaPath JsonPath
final
isLetters RegExp
final
knownSpans Map<String, TimeSpan>
final
knownSpanUnits Map<String, TimeSpanUnit>
final
mediaService IMediaService
no setter
no setter
mmodelRegistry MModelRegistry
no setter
nameSeparator RegExp
final
newLinesPattern RegExp
final
notLetterOrNumber Pattern
final
phoneNumberSplitCharacters Pattern
final
shortLabels Map<TimeSpanUnit, String?>
final
spaceTokenizerPattern RegExp
final
spanRegex RegExp
Not used for the ISO parsing, but this helps us in our parsing to find tokens like "3y"
final
sunny SunnyGet
getter/setter pair
sunnyLocalization SunnyLocalization
Global getter for the sunny localization object. Requires that the instance has been registered with a SunnyGet container somewhere.
no setter
ThirdPartyCreds → _ThirdPartyCreds
final
timeUnits List<TimeSpanUnit>
final
typeParameters RegExp
final
upToLastDot RegExp
final
wordSeparator RegExp
final

Functions

addressToString(SunnyPlace? address) Iterable<String>?
alwaysFalse<T>(T input) bool
alwaysTrue<T>(T input) bool
anyMatch(String? subject, List<String> potentials, {bool caseSensitive = true}) bool
assertNotNull<T>(T value) → T
awaitBoth<A, B>(FutureOr<A> a, FutureOr<B> b) Future<Tuple<A, B>>
badArgument<T>({dynamic value, String? name, String? message}) → T
base64Decode(String source) Uint8List
Decodes base64 or base64url encoded bytes.
base64Encode(List<int> bytes) String
Encodes bytes using base64 encoding.
base64UrlEncode(List<int> bytes) String
Encodes bytes using base64url encoding.
buildString(void builder(StringBuffer buffer)) String
capitalize(String? source) String?
catching<I, O>(O execute(I input), {String? debugLabel, Logger? logger}) Mapping<I, O?>
chopList<T>(Iterable<T> items) List<T>
cloneDate(DateTime orig, {int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond}) DateTime
compact<T>(Iterable<T?>? list) List<T>
compareBool<T>(bool toBool(T input)) Comparator<T>
convert<F, T>(F obj, {Transformer<F, T>? converter, Predicate<F>? predicate}) → T?
create<T>(Factory<T>? factory) → T?
createIf<T>(bool condition, Factory<T> factory) → T?
dateTimeOf(dynamic json) DateTime?
deepClone(dynamic _in) → dynamic
This assumes that the data coming in is a map, list, or primitive (json).
deepCloneList(Iterable _in) List
This assumes that the data coming in is a map, list, or primitive (json).
deepCloneMap(Map _in) Map<String, dynamic>
This assumes that the data coming in is a map, list, or primitive (json).
defaultIfEmpty(String? primary, String ifBlank) String?
delay([Duration duration = const Duration(milliseconds: 300)]) Future
distinctBy<T>(Iterable<T>? list, dynamic by(T input)) Iterable<T>
durationOf(TimeUnit? timeUnit, int? timeAmount) Duration?
extractMverseType(Map<String, dynamic> map) String?
filterKeys<K, V>(Map<K, V> source, bool filter(K key)) Map<K, V>
filterValues<K, V>(Map<K, V> source, bool filter(V value)) Map<K, V>
find<T>(Map<String, T> container, String? id) → T?
findInitials(List? sources) String?
firstNonEmpty(Iterable<String?>? strings) String?
firstNonNull<T>([T? a, T? b, T? c, T? d, T? e, T? f]) → T?
flexiDateOf(dynamic dyn) FlexiDate?
formatFlexiDate(dynamic input, {bool withYear = true, bool withMonth = true, bool withDay = true}) String?
groupBy<K, V>(List<V> values, K mappedBy(V item)) Map<K, List<V>>
hashFromList(Iterable<Object?>? arguments) int
Combine the Object.hashCode values of an arbitrary number of objects from an Iterable into one value. This function will return the same value if given null as if given an empty list.
hashOf(Object? arg01, Object? arg02, [Object? arg03 = _hashEnd, Object? arg04 = _hashEnd, Object? arg05 = _hashEnd, Object? arg06 = _hashEnd, Object? arg07 = _hashEnd, Object? arg08 = _hashEnd, Object? arg09 = _hashEnd, Object? arg10 = _hashEnd, Object? arg11 = _hashEnd, Object? arg12 = _hashEnd, Object? arg13 = _hashEnd, Object? arg14 = _hashEnd, Object? arg15 = _hashEnd, Object? arg16 = _hashEnd, Object? arg17 = _hashEnd, Object? arg18 = _hashEnd, Object? arg19 = _hashEnd, Object? arg20 = _hashEnd]) int
Combine up to twenty objects' hash codes into one value.
hasTime(DateTime time) bool
ifEmpty<T>(Iterable<T>? list, {T? then}) List<T?>
illegalArg<T>(String prop, [String? message]) → T
illegalState<T>([String? message]) → T
initializeMEnumRegistry(MEnumRegistry registry) → dynamic
initializeMModelRegistry(MModelRegistry registry) → dynamic
initials(dynamic from, {int max = 2}) String?
isFuture(DateTime? time) bool
isNullOrBlank(String? input) bool
isPast(DateTime? time) bool
isPhone(String input) bool
joinOrNull(Iterable<String?>? items, {String separator = " "}) String?
joinString(void builder(StringJoiner buffer), [String? separator]) String
jsonDecode(String source, {Object? reviver(Object? key, Object? value)?}) → dynamic
Parses the string and returns the resulting Json object.
jsonEncode(Object? object, {Object? toEncodable(Object? nonEncodable)?}) String
Converts object to a JSON string.
jsonLiteral(dynamic element) → dynamic
locationOf(dynamic name) → Location
loggerNameOf(Type type) String
Converts a type name to snake case
mapExceptFirst<T>(Iterable<T>? list, T map(T t)) List<T>
mapExceptLast<T>(Iterable<T>? list, T map(T t)) List<T>
mapIndexed<R, T>(Iterable<T> input, R mapper(T item, int index)) Iterable<R>
mapOf<K, V>(Iterable<V> values, {required K keyOf(V item)}) Map<K, V>
matchAll<T>() Predicate<T>
md5(Uint8List bytes) String
nonBlank(String? input) String?
notImplemented<T>() → T
notNull<T>() Predicate<T?>
notNullOrBlank() Predicate<String?>
nullPointer<T>(String? property) → T
parseTimeSpans(String query) List<TimeSpan>
parseUris(dynamic uris) List<Uri>
properCase(String? source) String?
randomString(int length, {bool? numbersOnly, Random? rnd}) String
rangeOf(int low, int high) Iterable<int>
removeElement<T>(Iterable<T>? elements, T toRemove) List<T>
repeat(String source, int times) String
returnNull<T>() Factory<T?>
simpleNameOfType(Type type) String
sort<T>(Iterable<T> list, Comparator<T> comparator) Iterable<T>
splitSnakeCase(String? source) String?
startsWith(String? first, String? second, {bool ignoreCase = true}) bool
streamOfNullableFuture<T>(Future<T?>? nullable) Stream<T>
sunnyLogger(Type type, {Type? subscript}) → Logger
Produces a logger using snake case naming conventions. If subscript is provided, it will be appended to the name in square brackets, eg sunny_listcontact
timed<R>(R block(), {dynamic result(R result, Duration time)?}) → R
timedAsync<R>(FutureOr<R> block(), {dynamic result(R result, Duration time)?}) Future<R>
timeSpanOf(String duration) TimeSpan?
timeSpanUnitOf(dynamic input) TimeSpanUnit?
timeZoneOf(dynamic name) → TimeZone
todo<T>([String? message]) → T
tokenizePhoneNumber(String? phoneNumber) Iterable<String>
tokenizeString(String? input, {bool splitAll = false, Tokenizer? tokenizer}) List<String>
toList<T>(dynamic value, DynTransformer<T> txr) List<T>
Converts a dynamic json value into a list, using the provided transformer to convert
toMap<T>(dynamic value, DynTransformer<T> txr) Map<String, T>
Converts a dynamic json value into a map, using the provided transformer to convert
trim(String? target, List<String>? chars, {bool trimWhitespace = true}) String?
trying<O>(O execute(), {Logger? log}) → O
tryParseTimeSpanUnit(dynamic input) List<TimeSpanUnit>
uncapitalize(String source) String
uncapitalizeNull(String? source) String?
uriOf(dynamic json) Uri?
uuid() String
uuidb() List<int?>
withoutTime(DateTime time) DateTime
withString<R>(Iterable<String?> strings, R handler(String string)) → R?
wrongType<T>(String name, dynamic value, List<Type> accepted) → T

Typedefs

ByteConversionSinkBase = ByteConversionSink
This class provides a base-class for converters that need to accept byte inputs.
Consumer<T> = dynamic Function(T input)
Converter<T> = T Function(String input)
Deserializer = dynamic Function(dynamic input)
Disposer = FutureOr Function()
DynTransformer<T> = T Function(dynamic from)
Factory<T> = T Function()
FlexiDateFormatter = String Function(FlexiDate date, {String? dateLabel, String? futureLabel, String? historyLabel, bool? withYear})
Formatter<T> = String Function(T from)
Func<R> = R Function()
Getter<T> = T Function()
ListFactory<T> = List<T> Function()
Loader<K, T> = FutureOr<T> Function(K key)
Mapping<F, T> = T Function(F from)
MModelFactory<M extends MBaseModel> = M Function(dynamic json)
Given json, produces an MBaseModel of that type
MModelFactoryResolver<M extends MBaseModel> = MModelFactory<M>? Function(String type)
Given a string, returns a function that knows how to instantiate objects of that type
MModelInstantiator<M extends Entity> = M Function([dynamic json])
PersistenceLifecycleEvent<T> = dynamic Function(T input)
Predicate<T> = bool Function(T input)
Producer<T> = FutureOr<T> Function()
StringConversionSinkBase = StringConversionSink
This class provides a base-class for converters that need to accept String inputs.
StringConversionSinkMixin = StringConversionSink
This class provides a mixin for converters that need to accept String inputs.
TimeSpanValue = num Function(TimeSpan span)
Transformer<F, T> = T Function(F from)
TypeExtractor = String? Function(Map<String, dynamic> json)
Attempts to determine the entity type

Exceptions / Errors

ApiException
ApiResponseException
ApiSocketException
ApiWrappedException
BadRequestException
JsonCyclicError
Reports that an object could not be stringified due to cyclic references.
JsonUnsupportedObjectError
Error thrown by JSON serialization if an object cannot be serialized.