MainDartScaffoldDetector class

Heuristic detector for the default flutter create counter-app scaffold.

Uses a simple marker-count strategy: if a main.dart source string contains at least 3 of the 4 well-known counter-app identifiers, it is treated as an unmodified (or lightly modified) scaffold that is safe to overwrite during magic:install.

Accepted limitation: markers matched via plain String.contains, so a marker that appears only inside a comment still increments the count. This favors silent overwrite for the common case and is documented at the call site.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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

Static Methods

isFlutterCreateScaffold(String source) → bool
Returns true when source contains at least 3 of the 4 default Flutter counter-app markers, indicating the file is an unmodified (or minimally modified) flutter create scaffold.