TypeIdentifier class sealed
represents a type identifier consists of name and full library name
- Available extensions
- Annotations
-
- @freezed
Constructors
- TypeIdentifier.new({required String typeName, required String packageName, required String packageRelativeLibraryPath})
-
constfactory
- TypeIdentifier.fromNameAndLibraryPath({required String typeName, required String? libraryPath})
-
factory
Properties
-
copyWith
→ $TypeIdentifierCopyWith<
TypeIdentifier> -
Create a copy of TypeIdentifier
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDynamic → bool
-
returns true if this type identifier is the dynamic type
no setter
- isNullable → bool
-
returns true if this type identifier contains the nullable flag
no setter
- nonNullablePackageAndTypeName → String
-
returns a String containing the package name and the type name without nullable flag
no setter
- nonNullableTypeName → String
-
returns the name without the nullable flag
no setter
- nullableTypeName → String
-
returns the name with the nullable flag
no setter
- packageAndTypeName → String
-
returns a String containing the package name and the type name
no setter
- packageName → String
-
the name of the package defining that type
no setterinherited
- packageRelativeLibraryPath → String
-
the library path inside the package defining that type
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- typeName → String
-
the name of this type
no setterinherited
Methods
-
asNonNullable(
) → TypeIdentifier - returns a copy of this type identifier without the nullable flag
-
asNullable(
) → TypeIdentifier - returns a copy of this type identifier with the nullable flag
-
map<
TResult extends Object?> (TResult $default(_TypeIdentifier value)) → TResult -
Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_TypeIdentifier value)?) → TResult? -
Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_TypeIdentifier value)?, {required TResult orElse()}) → TResult -
Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String typeName, String packageName, String packageRelativeLibraryPath)?, {required TResult orElse()}) → TResult -
Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
when<
TResult extends Object?> (TResult $default(String typeName, String packageName, String packageRelativeLibraryPath)) → TResult -
Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String typeName, String packageName, String packageRelativeLibraryPath)?) → TResult? -
Available on TypeIdentifier, provided by the TypeIdentifierPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited