RunLocation class Null safety

Run location

Inheritance
Implemented types
Available Extensions
Annotations

Constructors

RunLocation({required Json coords, required Json activity, required Json battery, required String runId, required Json meta, required bool triggeredSplitTime, required String recordedTimestamp, required String locationServiceTimestamp, required String uuid, RunLocationOdometer? odometers})
Run location
RunLocation.empty()
Empty run locaiton
RunLocation.fromLocation({required Map location, required String runId})
Create run location from location

Properties

activity Json
Activity
@Sqlite(toGenerator: 'SyncGeneratorHelper.mapToSql(%INSTANCE_PROPERTY%)'), final
battery Json
Battery
@Sqlite(toGenerator: 'SyncGeneratorHelper.mapToSql(%INSTANCE_PROPERTY%)'), final
coords Json
Coords
@Sqlite(toGenerator: 'SyncGeneratorHelper.mapToSql(%INSTANCE_PROPERTY%)'), final
hashCode int
The hash code for this object. [...]
read-only, inherited
isNewRecord bool
If true, this model has not yet been inserted into SQLite.
read-only, inherited
locationServiceTimestamp String
The ISO 8601 timestamp retrieved by the location service. Might be wrong in some cases (e.g. android sequence issue).
final
meta Json
Additional entries as meta-data to implement project-specific use cases.
@Sqlite(toGenerator: 'SyncGeneratorHelper.mapToSql(%INSTANCE_PROPERTY%)'), final
odometers RunLocationOdometer
Odometers
@Rest(toGenerator: 'SyncGeneratorHelper.engineModelToSqlOrRest(%INSTANCE_PROPERTY%)', fromGenerator: 'SyncGeneratorHelper.sqlOrRestToEngineModel<RunLocationOdometer>' '(RunLocationOdometer.odometerFromJson, %DATA_PROPERTY%)'), @Sqlite(columnType: Column.varchar, toGenerator: 'SyncGeneratorHelper.engineModelToSqlOrRest(%INSTANCE_PROPERTY%)', fromGenerator: 'SyncGeneratorHelper.sqlOrRestToEngineModel<RunLocationOdometer>' '(RunLocationOdometer.odometerFromJson, %DATA_PROPERTY%)'), final
primaryKey int?
The fields needs to be overwritten, to keep it out of the json
@JsonKey(ignore: true), read / write, inherited
recordedTimestamp String
The ISO 8601 timestamp on which the location was recorded. This is the local date time of the App, so if the user has set the wrong device-time, it will be wrong as well.
final
runId String
Run id
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
triggeredSplitTime bool
Indicates whether this location has triggered the composition of a split-time
final
uuid String
Identifier
@Sqlite(index: true, unique: true), final

Methods

afterSave({Provider<Model>? provider, ModelRepository<Model>? repository}) Future<void>
Hook invoked after the model is successfully entered in the SQLite database. Useful to update or save associations.
inherited
beforeSave({Provider<Model>? provider, ModelRepository<Model>? repository}) Future<void>
Hook invoked before the model is successfully entered in the SQLite database. Useful to update or save associations.
inherited
copyWith({Map<String, dynamic>? coords, Map<String, dynamic>? activity, Map<String, dynamic>? battery, String? runId, Map<String, dynamic>? meta, bool? triggeredSplitTime, String? recordedTimestamp, String? locationServiceTimestamp, String? uuid, RunLocationOdometer? odometers}) RunLocation
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
Run location to json
override
toString() String
A string representation of this object. [...]
inherited

Operators

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

Static Methods

fromJson(Json json) RunLocation
Create RunLocation from a json representation