UserLocationTracker class

Quyền + vị trí của một bản đồ. Đổi context hoặc prompt thì báo listener.

Inheritance

Constructors

UserLocationTracker({UserLocationPlatform? platform, bool autoPrompt = true, bool highAccuracy = true})

Properties

autoPrompt → bool
final
context → UserLocationContext
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
highAccuracy → bool
final
platform → UserLocationPlatform
final
prompt → UserLocationPrompt?
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dismiss() → void
"Để sau" / "Đóng".
dispose() → void
Discards any resources used by the object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
openSettings() → Future<void>
Nút phụ của popup: mở cài đặt app (bị chặn) / cài đặt vị trí (tắt dịch vụ).
recheck() → Future<void>
Kiểm lại quyền — gọi khi app quay lại foreground (người dùng vừa đổi trong cài đặt) và khi dịch vụ vị trí bật lại.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
request() → Future<void>
Người dùng muốn dùng vị trí (bấm "Cho phép", "Thử lại", nút vị trí, hoặc app gọi requestUserLocation()).
start() → Future<void>
toString() → String
A string representation of this object.
inherited

Operators

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