| 1234567891011121314151617181920212223242526272829 |
- class LocationOption {
- bool isOnceLocation;
- bool isNeedAddress;
- bool mockEnable;
- int locationInterval;
- int locationTimeOut;
- LocationMode locationMode;
- LocationOption(
- {this.isOnceLocation = true,
- this.isNeedAddress = true,
- this.mockEnable = false,
- this.locationInterval = 2000,
- this.locationTimeOut = 30000,
- this.locationMode = LocationMode.Hight_Accuracy});
- Map<String, dynamic> toMap() {
- return {
- "isOnceLocation": isOnceLocation,
- "isNeedAddress": isNeedAddress,
- "mockEnable": mockEnable,
- "locationInterval": locationInterval,
- "locationTimeOut": locationTimeOut,
- "locationMode": locationMode.index,
- };
- }
- }
- enum LocationMode { Battery_Saving, Device_Sensors, Hight_Accuracy }
|