CreateOptions class

Parsed options common to every create <kind>:<name> generator.

Constructors

CreateOptions({required String kind, required String name, required String path, required bool force, required bool dryRun, required bool withTest, required List<FieldSpec> fields, required String? jsonSample})
const
CreateOptions.parse(List<String> args)
Parses the args that follow the create command. Reads a --from-json file from disk if given (missing files are reported and ignored).
factory

Properties

dryRun bool
final
fields List<FieldSpec>
Fields parsed from --fields "a:String, b:int?" (empty when absent).
final
force bool
final
hashCode int
The hash code for this object.
no setterinherited
isValid bool
no setter
jsonSample String?
Raw JSON sample (from --json or a --from-json file) used to infer a model, or null when not supplied.
final
kind String
The generator kind: page, screen, model, repository, widget, feature (empty if no kind:name token was supplied).
final
name String
The target name as typed by the user (normalized per generator).
final
path String
Feature/page output root (--path), default lib/presentation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
withTest bool
Generate a matching round-trip test (--with-test).
final

Methods

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