MethodChannelLocationAndroidEasy class

Inheritance

Properties

channelBasicMessage BasicMessageChannel
getter/setter pairinherited
channelMethod MethodChannel
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
methodBasicMessage String
finalinherited
methodCancelLocationUpdatesListener String
finalinherited
methodChannel String
finalinherited
methodCheckGPS String
finalinherited
methodCheckLocationPermission String
finalinherited
methodGetLastKnownLocation String
finalinherited
methodRequestLocationPermission String
finalinherited
methodRequestLocationUpdatesListener String
finalinherited
methodToSettingsTurnOnGPS String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelLocationListener() Future<void>
override
checkGPS() Future<bool>
检测GPS是否打开
override
checkLocationPermission() Future<bool>
检测定位权限
override
getLastKnownLocation() Future<LocationInfo?>
override
getLocation({int timeout = 6, bool useLastKnownLocation = false}) Future<LocationInfo?>
获取定位信息 timeout:获取location超时时间 useLastKnownLocation:是否优先将上次的位置信息作为结果返回。如为false,则会获取当前最新值
override
getLocationListener(dynamic callback(LocationInfo), {int? locationUpdateTime, int? locationUpdateDistance}) Future<void>
locationUpodateInterval:位置信息更新触发的时间间隔 ms locationUpodateDistance:位置信息更新触发的距离 m 上面两个条件都符合时才会更新
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestLocationPermission() Future<void>
请求定位权限
override
toSettingsTurnOnGPS() Future<void>
跳转手机设置中打开GPS的位置
override
toString() String
A string representation of this object.
inherited

Operators

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