sunny_sdk_core 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> - 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.
-
BaseMediaContentType<
F extends Object> - Adds equality
- BearerAuthentication
- BuildContextResolver
- Change
- ChangeBase
- ChangeFields
- ChangePaths
- ChangeResult
- ChangeResultBase
- ChangeResultFields
- ChangeResultPaths
- ClientIdSecretCredentials
- CollectionAwareApiReader
- ContactInfoPart
-
DataService<
T> - Container for data that allows easy subscriptions and rendering
- DefaultMEntity
-
DefaultMModelList<
M> - Definition
- Definitions
- DeleteResponse
- DeviceInfo
- DiffLogEntry
- DiffLogEntryBase
- DiffLogEntryFields
- DiffLogEntryPaths
- Entity
- EntityExtensions
- ErrorStack
- FlexiDate2
- GeoLocation
- GeoPoint
- HasBaseCode
- HasMverseMeta
- HttpBasicAuthentication
- IAuthState
- IMediaService
- Immutable
- Used to annotate a class.
- InfoX
-
Inst<
T extends Object> - Class used for defining container instances
- ISchemaProperty
- IUserPreferencesService
- LifecycleAware
- LifecycleAwareBase
- 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
- MEnumRegistry
- Contains all registered enum types to support deserialization.
- MKey
- Inside the sunny datastore, each record is identified by a key that provides 3 parts:
- 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
-
MutableRecordDataService<
RType, KType, CType, UType> - OAuth
- PrimitiveApiReader
-
ProgressTracker<
T> - QueryParams
-
RecordDataService<
RType, KType> -
RecordEvent<
D extends Object> - RecordEventService
- 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 functionf
. -
Result<
T> - RProxy
- RProxyServer
-
StreamChange<
RType> -
SunnyApi<
M extends Entity> - SunnyCore
- Context holder for sunny-related services
- SunnyGet
- Base interface for doing service lookups. This can work with the provider package, or a injector framework like kiwi
- SunnyGetLib
- Makes it easier to import
- 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
-
ThirdPartyApi<
C> -
TimedResult<
T> - TimeUnit
- TimeUnitBase
- UserDetails
- UseResult
- See useResult for more details.
- UserPrefKey
- ValidationError
Enums
Mixins
- CachingApiReaderMixin
- LifecycleAwareMixin
- MBaseModelMixin
- MModelFactoryRegistry
-
RecordDataServiceMixin<
RType, KType> - Can be used to apply the delegate pattern in cases where inheritance doesn't make sense.
-
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.
Extensions
- ApiReaderExt on ApiReader
-
ApiSignalStream
on Stream<
ApiSignal> ? - BuildContextResolverExt on BuildContextResolver
- DateComponentsFormat on FlexiDate
- DateTimeToFlexiDateExtensions on DateTime
-
ErrorList
on List<
ValidationError> - HasMMetaExt on HasMverseMeta
- LifecycleAwareBaseExt on LifecycleAwareBase
- MEntityEquality on MEntity
- MKeyExt on MKey
- MModelExt on MModel?
- MSchemaRefExtensions on MSchemaRef
- MSchemaRefFactoryExt on MSchemaRef
- ObjectBaseCodeExtension on Object?
-
PlatformInfoFuture
on FutureOr<
DeviceInfo> - PropSchemaTypeExtensions on PropSchemaType
-
RecordDateServiceUpdate
on RecordDataService<
RType, KType> -
RepositoryExtensions
on Repository<
X> - ResultExtension on Result?
-
StreamOfEventExt
on Stream<
RecordEvent< D> > - StreamSubscriptionDisposingExt on StreamSubscription
- SunnyCoreCastExt on SunnyGet
- SunnyCoreEssentialExt on SunnyGet
- ThirdPartyCredsApis on _ThirdPartyCreds
Constants
- alwaysThrows → const _AlwaysThrows
-
Used to annotate a function
f
. Indicates thatf
always throws an exception. Any functions that overridef
, in class inheritance, are also expected to conform to this contract. - ChangeRef → const MSchemaRef
- ChangeResultRef → const MSchemaRef
- checked → const _Checked
- Used to annotate a parameter of an instance method that overrides another method.
- DiffLogEntryRef → const MSchemaRef
- 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. - 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 thatm
must either be abstract or must return a newly allocated object ornull
. In addition, every method that either implements or overridesm
is implicitly annotated with this same annotation. - immutable → const Immutable
-
Used to annotate a class
C
. Indicates thatC
and all subtypes ofC
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.
- literal → const _Literal
-
Used to annotate a const constructor
c
. Indicates that any invocation of the constructor must use the keywordconst
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 mixinC
. Indicates that every subclass ofC
, concrete or abstract, must directly overridem
. - mustCallSuper → const _MustCallSuper
-
Used to annotate an instance member (method, getter, setter, operator, or
field)
m
. Indicates that every invocation of a member that overridesm
must also invokem
. In addition, every method that overridesm
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 classC
or mixinM
. Indicates thatm
should not be overridden in any classes that extend or mixinC
orM
. - 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 onC
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 functionf
. Indicates that every invocation off
must include an argument corresponding top
, despite the fact thatp
would otherwise be an optional parameter. - schema → const String
- sealed → const _Sealed
- Annotation marking a class as not allowed as a super-type.
- 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).
- 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
- apiClient → ApiClient
-
no setter
- apiRegistry → ApiRegistry
-
no setter
- flexiDateFormatter ↔ FlexiDateFormatter
-
getter/setter pair
- infoX → InfoX
-
no setter
- inputSchemaPath → JsonPath
-
final
- mediaService → IMediaService
-
no setter
- mEnumRegistry → MEnumRegistry
-
no setter
- mmodelRegistry → MModelRegistry
-
no setter
- rproxy → RProxyServer
-
no setter
- 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
Functions
-
addressToString(
SunnyPlace? address) → Iterable< String> ? -
durationOf(
TimeUnit? timeUnit, int? timeAmount) → Duration? -
extractMverseType(
Map< String, dynamic> map) → String? -
flexiDateOf(
dynamic dyn) → FlexiDate? -
formatFlexiDate(
dynamic input, {bool withYear = true, bool withMonth = true, bool withDay = true}) → String? -
initializeMEnumRegistry(
MEnumRegistry registry) → dynamic -
initializeMModelRegistry(
MModelRegistry registry) → dynamic -
jsonLiteral(
dynamic element) → dynamic -
nullDataService<
T> () → DataService< T> -
parseUris(
dynamic uris) → List< Uri> -
setDeep(
Object container, JsonPath path, dynamic value) → void
Typedefs
- AsyncOrCallback = FutureOr Function()
- Deserializer = dynamic Function(dynamic input)
- FlexiDateFormatter = String Function(FlexiDate date, {String? dateLabel, String? futureLabel, String? historyLabel, bool? withYear})
-
InstDispose<
T> = FutureOr Function(T t) -
InstInitFn<
T> = T Function(BuildContext context) -
KeyMapper<
RType, KType> = KType Function(RType input) -
LifecycleCallback<
T> = FutureOr< T> Function() -
MEnumFactory<
M> = M Function(String literal) -
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) -
RecordLoader<
RType, KType> = Future< RType> Function(KType id) -
ShouldNotify<
T> = bool Function(T a, T b) -
TypeExtractor
= String? Function(Map<
String, dynamic> json) - Attempts to determine the entity type