RequiredSymbol class sealed
A symbol that every provider of a role must generate, such as the
createAppRouter() function of a router.
Other code of the app refers to it by name, so it must be declared at the top level of the file at path. It must be callable the way that code calls it: with positionalArguments positional arguments and the named arguments namedParameters, and no other required parameters.
The contract test harness checks it structurally against the DartFileIndex of that file with checkIn; types are checked by compiling the generated app.
- Implementers
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- importRef → ImportRef
-
The import of path, for code that uses the symbol.
no setter
- name → String
-
The name of the symbol.
final
-
namedParameters
→ List<
String> -
The named parameters that callers pass; the symbol may have other
named parameters only if they are optional.
final
- path → String
-
The path of the file that declares it, relative to the project root,
such as
lib/bootstrap.dart.final - positionalArguments → int
-
How many positional arguments callers pass.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkIn(
Map< String, DartFileIndex> files) → List<SmfIssue> -
Checks that
files, indexes by path, declare this symbol as required, and returns the problems found. -
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