DoctorCommand class

Diagnostic command for a magic_deeplink install.

The install has a half no manifest installer can automate: artisan's transactional DSL can publish files and inject lines, but it cannot place an <intent-filter> inside a specific <activity> or tell an adopter their <meta-data> landed on the wrong element. Every way of getting that hand-written half wrong is SILENT: a deep link simply opens the browser, with no exception and no log line anywhere. This command reads the consumer's project files and says, before a device is ever involved, which of the platform prerequisites are actually in place.

Checks are local and read-only by default. --remote additionally fetches the two association files the app's own web host is expected to serve, to confirm the SERVER side agrees with the config, not just the repo.

What this command can never prove: that a real device matches an incoming link to this app. swcutil verify needs root and Android verifies at install time, so the last mile is always a real device — generateReport says so explicitly rather than letting a green run imply it.

Usage

dart run <app>:artisan deeplink:doctor
dart run <app>:artisan deeplink:doctor --verbose
dart run <app>:artisan deeplink:doctor --remote

Constructors

DoctorCommand()

Properties

boot → CommandBoot
What boot context the dispatcher must establish before calling handle. See CommandBoot for the V1 taxonomy (none, connected).
no setter
description String
One-line description (rendered in artisan list next to name).
no setter
hashCode int
The hash code for this object.
no setterinherited
name String
Dispatch key. Colons (:) act as namespace prefixes for artisan list grouping (e.g. dusk:snap groups under dusk).
no setterinherited
parsedSignature → CommandSignature?
Lazy-parsed signature. Cached for the lifetime of the instance.
no setterinherited
projectRoot String
Absolute path to the Flutter project root, resolved on access.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signature String
Optional Laravel-style signature DSL. When set, name derives from it and configure auto-registers the declared options/flags.
no setter

Methods

checkConfigExists() bool
Whether lib/config/deeplink.dart exists in the project root.
checkPlatformSetup() Map<String, dynamic>
Check platform-specific setup plus the association files.
checkRemoteAssociationFiles() Future<RemoteCheckResult>
GET both association files from the live domain and check status, JSON-parseability, and (for the AASA) content-type.
checkWiring() Map<String, dynamic>
Whether the Dart half of the install actually reached the app.
configure(ArgParser parser) → void
Auto-applies signature to the parser when set. Override to register extra ArgParser features (mandatory options, aliases, custom value validators). When you override, call super.configure(parser) first if you also use the signature DSL.
inherited
fetchRemoteFile(Uri uri) Future<RemoteAssociationFile>
Perform the actual GET request behind --remote.
generateReport({bool verbose = false, RemoteCheckResult? remoteResult}) String
Generate a human-readable diagnostic report.
getMissingRequirements() List<String>
Every unmet requirement across config, platform, and association checks.
getProjectRoot() String
Resolve the Flutter project root — overridable in tests.
getWarnings() List<String>
Everything configured correctly that still deserves a second look. Never fails the command; a doctor that always fails gets ignored.
handle(ArtisanContext ctx) Future<int>
Execute the command. Returns the process exit code.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseConfig(String content) Map<String, dynamic>
Parse content into the fields this doctor validates.
toString() String
A string representation of this object.
inherited
validateConfig() List<String>
Validate config presence and reject scaffold placeholders.

Operators

operator ==(Object other) bool
The equality operator.
inherited