You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
3.3 KiB
Dart
96 lines
3.3 KiB
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:health/health.dart';
|
|
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
class HealthMetricInfo {
|
|
final HealthDataType type;
|
|
final String nameEn;
|
|
final String nameAr;
|
|
final String unit;
|
|
final Color color;
|
|
final IconData icon;
|
|
final String description;
|
|
final double minHealthyValue;
|
|
final double maxHealthyValue;
|
|
final String svgIcon;
|
|
|
|
const HealthMetricInfo(
|
|
{required this.type,
|
|
required this.nameEn,
|
|
required this.nameAr,
|
|
required this.unit,
|
|
required this.color,
|
|
required this.icon,
|
|
required this.description,
|
|
required this.minHealthyValue,
|
|
required this.maxHealthyValue,
|
|
required this.svgIcon});
|
|
}
|
|
|
|
class HealthMetrics {
|
|
static final metrics = [
|
|
HealthMetricInfo(
|
|
type: HealthDataType.HEART_RATE,
|
|
nameEn: "Heart Rate",
|
|
nameAr: "معدل النبض",
|
|
unit: 'BPM',
|
|
color: AppColors.primaryRedColor,
|
|
icon: Icons.favorite,
|
|
description: "Your heart rate indicates how many times your heart beats per minute".needTranslation,
|
|
minHealthyValue: 60,
|
|
maxHealthyValue: 100,
|
|
svgIcon: "assets/images/smartwatches/heartrate_icon.svg"),
|
|
HealthMetricInfo(
|
|
type: HealthDataType.BLOOD_OXYGEN,
|
|
nameEn: "Blood Oxygen",
|
|
nameAr: "أكسجين الدم",
|
|
unit: '%',
|
|
// color: Colors.blue,
|
|
color: Color(0xff3A3558),
|
|
icon: Icons.air,
|
|
description: "Blood oxygen level indicates how much oxygen your red blood cells are carrying".needTranslation,
|
|
minHealthyValue: 95,
|
|
maxHealthyValue: 100,
|
|
svgIcon: "assets/images/smartwatches/bloodoxygen_icon.svg"),
|
|
HealthMetricInfo(
|
|
type: HealthDataType.STEPS,
|
|
nameEn: "Steps",
|
|
nameAr: "خطوات",
|
|
unit: 'steps',
|
|
// color: Colors.green,
|
|
color: Color(0xff3263B8),
|
|
icon: Icons.directions_walk,
|
|
description: "Number of steps taken throughout the day".needTranslation,
|
|
minHealthyValue: 7000,
|
|
maxHealthyValue: 15000,
|
|
svgIcon: "assets/images/smartwatches/steps_icon.svg"),
|
|
HealthMetricInfo(
|
|
type: Platform.isIOS ? HealthDataType.ACTIVE_ENERGY_BURNED : HealthDataType.TOTAL_CALORIES_BURNED,
|
|
nameEn: "Active Calories",
|
|
nameAr: "السعرات الحرارية النشطة",
|
|
unit: 'kcal',
|
|
color: Color(0xffD59E95),
|
|
icon: Icons.local_fire_department,
|
|
description: "Calories burned during physical activity".needTranslation,
|
|
minHealthyValue: 300,
|
|
maxHealthyValue: 1000,
|
|
svgIcon: "assets/images/smartwatches/calories_icon.svg"),
|
|
HealthMetricInfo(
|
|
type: Platform.isIOS ? HealthDataType.DISTANCE_WALKING_RUNNING : HealthDataType.DISTANCE_DELTA,
|
|
nameEn: "Distance Covered",
|
|
nameAr: "المسافة المغطاة",
|
|
unit: 'KMs',
|
|
// color: mainPurple,
|
|
color: Color(0xff6A46F5),
|
|
icon: Icons.directions_run,
|
|
description: "Distance covered throughout the day".needTranslation,
|
|
minHealthyValue: 3,
|
|
maxHealthyValue: 10,
|
|
svgIcon: "assets/images/smartwatches/distance_icon.svg"),
|
|
// Add more metrics as needed
|
|
];
|
|
}
|