LocationDiagnostics class

The setup doctor's report.

final report = await BaabaLocation.instance.diagnose();
if (!report.ok) print(report.toChecklist());

// In a baaba_app_config debug panel:
DebugSection.info('Location', () => report.toMap())

Constructors

LocationDiagnostics({required String platform, Map<String, Object?> facts = const {}, ConfigurationCheck? configuration, LocationAccess? access, bool? serviceEnabled, LocationResult? fix, bool? geocoderAvailable, AddressResult? geocoderTest, LocationResult? lastKnown, List<DiagnosticIssue> issues = const []})
const

Properties

access → LocationAccess?
final
configuration → ConfigurationCheck?
final
facts → Map<String, Object?>
What the native side reported: declared permissions, Play services, location mode, battery state, device maker (Android); Info.plist keys, authorization, accuracy (iOS).
final
fix → LocationResult?
A short no-UI fix attempt, when diagnose(tryFix: true).
final
geocoderAvailable → bool?
final
geocoderTest → AddressResult?
A reverse geocode of fix, when there was one.
final
hashCode → int
The hash code for this object.
no setterinherited
issues → List<DiagnosticIssue>
final
lastKnown → LocationResult?
final
ok → bool
No DiagnosticSeverity.error issues.
no setter
platform → String
android, ios, or unsupported.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serviceEnabled → bool?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toChecklist() → String
A readable checklist with the snippet for every problem.
toMap() → Map<String, String>
Label → value rows, ready for DebugSection.info('Location', () => report.toMap()).
toString() → String
A string representation of this object.
override

Operators

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