DataController class
Determines the API for data management.
The user can use this API to insert, delete, update, and read data, as well as query the data statistics of the current day and past days.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearAll(
) → Future< void> - Clears all data inserted by the app from the device and the cloud.
-
delete(
DeleteOptions options) → Future< void> - Deletes inserted sampling datasets by specifying a time range or deletes them all. It can also be used to delete workout records.
-
insert(
SampleSet sampleSet) → Future< void> - Inserts a sampling dataset into the Health platform.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
ReadOptions readOptions) → Future< ReadReply?> - Reads user data.
-
readDailySummation(
DataType dataType, int startTime, int endTime) → Future< SampleSet?> - Reads the daily statistics of a specified data type.
-
readDailySummationList(
List< DataType> dataTypes, int startTime, int endTime) → Future<List< SampleSet?> ?> - Reads the daily statistics of multiple data types.
-
readLatestData(
List< DataType> types, String packageName) → Future<Map< DataType, SamplePoint> > - Reads the latest data points of the specified data type.
-
readTodaySummation(
DataType dataType) → Future< SampleSet?> - Reads the summary data of a specified data type of the current day.
-
readTodaySummationList(
List< DataType> dataTypes) → Future<List< SampleSet?> ?> - Reads the summary data of multiple data types of the current day.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
UpdateOptions options) → Future< void> - Updates existing data.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
init(
) → Future< DataController> - Initializes a DataController instance.