The Flutter plugin for Apple HealthKit and Google fit.
Flutter Health fit provides access to data points from Google fit and Apple health. The plugin wraps everything in a friendly and easy to use commands.
Sex Date of birth Height weight Body fat % waist circumference
Forced Vital Capacity Peak Expiratory Flow Rate
Carbohydrates Fiber Dietary sugar Blood glucode Protein Total Fat
Dietary energy Active energy Resting Energy Steps Cycling distance Flights climbed walking + running distance
Sleep
Heart Rate Heart Rate Variability walking heart rate average
Menstruation
Workouts
pubspec.yaml
: flutter_health_fit
.info.plist
In order to access a data point we need to request an explicit permission. For example if we want to access steps:
if(await isStepsAuthorized()){
UserActivityDataPointValue steps = await getStepsBySegment(startMillis, endMillis);
}
Type | Param name |
---|---|
double | value |
DateTime | date |
DateTime | endDate |
DataPointUnit | units |
String | sourceApp |
Copyright 2022 Metaflow.co
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.