SharedChecker<_SiblingModel extends Model> class
A utility to legibly assert a DartType against core types
Optionally declare a model to discover "sibling" models, or models that share
the same domain or provider (e.g. SqliteModel).
Constructors
-
A utility to legibly assert a
DartTypeagainst core types
Properties
- argType → DartType
-
Retrieves type argument, i.e.
TypeinFuture<Type>orList<Type>no setter - asPrimitive → Type
-
no setter
- canSerializeArgType → bool
-
no setter
- fromJsonConstructor → ConstructorElement?
-
Retrieves the
fromJsonfactory element. If the constructor can't be found,nullis returned.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isArgTypeAFuture → bool
-
no setter
- isArgTypeASibling → bool
-
If the sub type has super type of a related
ModelReturns true forFuture<SqliteModel>,List<Future<SqliteModel>>, andList<SqliteModel>.no setter - isBool → bool
-
no setter
- isDartCoreType → bool
-
If this is a bool, DateTime, double, int, num, or String
no setter
- isDateTime → bool
-
no setter
- isDouble → bool
-
no setter
- isEnum → bool
-
no setter
- isFuture → bool
-
no setter
- isInt → bool
-
no setter
- isIterable → bool
-
no setter
- isList → bool
-
no setter
- isMap → bool
-
no setter
- isNullable → bool
-
no setter
- isNum → bool
-
no setter
- isSerializable → bool
-
Not all Types are parseable. For consistency, one catchall before smaller checks
no setter
- isSet → bool
-
no setter
- isSibling → bool
-
If this is a class similarly annotated by the current generator.
no setter
- isString → bool
-
If this is a String
no setter
- isUnFuturedTypeNullable → bool
-
If the type is a
FutureorFutureOr, returns the nullability of the type of the Future.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
superClassTypeArgs
→ List<
DartType> -
The arguments passed to a super class definition.
For example, a field
final Currency amountwith a type definitionclass Currency extends OfflineFirstSerdes<T, X, Y> {}would return[T, X, Y].no setter - targetType → DartType
-
The checked type
final
- toJsonMethod → MethodElement?
-
Retrieves the
toJsonmethod element. If the method can't be found,nullis returned.no setter -
typeArguments
→ List<
DartType> ? -
Returns type arguments of targetType. For example, given
Map<Key, Value>,[Key, Value]is returned. If the targetType does not declare type arguments, return isnull.no setter - unFuturedArgType → DartType
-
argType without
Futureif it is aFuture.no setter - unFuturedType → DartType
-
targetType without
Futureif it is aFutureno setter - withoutNullResultType → String
-
Returns the final version of a type without decoration. It will not have a null suffix.
no setter
Methods
-
enumDeserializeFactory(
String providerName) → String? -
enumSerializeMethod(
String providerName) → String? -
isSerializableViaJson(
bool doesDeserialize) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
typeOfFuture<
_SiblingModel extends Model> (DartType type) → DartType? - Destructs a type to determine the bottom type after going through Futures and Iterables.
-
withoutNullability(
DartType type) → String -
Print the
DartTypewithout nullability