* localization of string is performed.

* date time handling converting it to locale time before consuming it.
* loader issue handled that was not hiding after call to hide loader
Main_App_Replacement
taha 1 week ago
parent 3234d493fe
commit 77b2011fcd

@ -1,4 +1,4 @@
package com.cloudsolutions.hmg.PermissionManager;
package com.ejada.hmg.PermissionManager;
import android.content.Context;
import android.content.SharedPreferences;

@ -1533,6 +1533,7 @@
"vatPercent": "ضريبة القيمة المضافة (15%)",
"proceedToPayment": "المتابعة للدفع",
"supportedSmartWatches": "كيف تعمل؟",
"smartwatchHowItWorks": "كيف تعمل الساعة الذكية",
"pleaseMakeSureSamsungWatchConnected": "يرجى التأكد من أن ساعة Samsung الخاصة بك متصلة بهاتفك، ومتزامنة ومحدثة بشكل نشط.",
"beforeSyncingDataFollowInstructions": "قبل مزامنة البيانات، يرجى التأكد من اتباع التعليمات بشكل صحيح.",
"viewWatchInstructions": "عرض تعليمات الساعة",
@ -1544,6 +1545,18 @@
"seconds": "ثواني",
"secs": "ثواني",
"noAllergiesDataFound": "لم يتم العثور على بيانات الحساسية...",
"allHealthData": "جميع البيانات الصحية",
"activityCalories": "سعرات النشاط",
"activityCaloriesDescription": "توفر حلقات النشاط مرجعًا بصريًا سريعًا لمدى نشاطك خلال كل يوم.",
"steps": "الخطوات",
"distanceCovered": "المسافة المقطوعة",
"distanceCoveredDescription": "المسافة المقطوعة على مدار اليوم",
"sleepScore": "مؤشر النوم",
"sleepScoreDescription": "يتتبع هذا عدد ساعات نومك خلال اليوم",
"bloodOxygen": "أكسجين الدم",
"bloodOxygenTrackingDescription": "يتتبع هذا مستوى أكسجين الدم لمراقبة السجل الصحي وتحديثه",
"bodyTemperature": "درجة حرارة الجسم",
"bodyTemperatureTrackingDescription": "يتتبع هذا درجة حرارة الجسم لمراقبة السجل الصحي وتحديثه",
"heartRateDescription": "معدل ضربات قلبك يشير إلى عدد المرات التي ينبض فيها قلبك في الدقيقة",
"bloodOxygenDescription": "مستوى الأكسجين في الدم يشير إلى كمية الأكسجين التي تحملها خلايا الدم الحمراء",
"stepsDescription": "عدد الخطوات المتخذة على مدار اليوم",

@ -1526,6 +1526,7 @@
"vatPercent": "VAT (15%)",
"proceedToPayment": "Proceed to Payment",
"supportedSmartWatches": "Supported Smart Watches",
"smartwatchHowItWorks": "How does it work",
"pleaseMakeSureSamsungWatchConnected": "Please make sure that your Samsung Watch is connected to your Phone, is actively synced & updated.",
"beforeSyncingDataFollowInstructions": "Before syncing data, please make sure that you have followed the instructions properly.",
"viewWatchInstructions": "View watch instructions",
@ -1537,6 +1538,18 @@
"seconds": "Seconds",
"secs": "Secs",
"noAllergiesDataFound": "No allergies data found...",
"allHealthData": "All Health Data",
"activityCalories": "Activity Calories",
"activityCaloriesDescription": "Activity rings give you a quick visual reference of how active you are each day.",
"steps": "Steps",
"distanceCovered": "Distance Covered",
"distanceCoveredDescription": "Distance covered throughout the day",
"sleepScore": "Sleep Score",
"sleepScoreDescription": "This keeps track of how many hours you sleep in a day",
"bloodOxygen": "Blood Oxygen",
"bloodOxygenTrackingDescription": "This tracks your blood oxygen to monitor and update your health history",
"bodyTemperature": "Body Temperature",
"bodyTemperatureTrackingDescription": "This tracks your body temperature to monitor and update your health history",
"heartRateDescription": "Your heart rate indicates how many times your heart beats per minute",
"bloodOxygenDescription": "Blood oxygen level indicates how much oxygen your red blood cells are carrying",
"stepsDescription": "Number of steps taken throughout the day",

@ -122,15 +122,15 @@ class HealthProvider with ChangeNotifier {
notifyListeners();
final result = await _healthService.initDevice();
isLoading = false;
LoaderBottomSheet.hideLoader();
// LoaderBottomSheet.hideLoader();
if (result.isError) {
print("the result is error ${(result.asError?.error as PlatformException)?.message}");
error = 'Error initializing device: ${result.asError}';
if(result.asError?.error is PlatformException) {
error = 'Error initializing device: ${(result.asError?.error as PlatformException)?.message}';
}
} else {
print("the result is not error");
LoaderBottomSheet.showLoader();
// LoaderBottomSheet.showLoader();
await getVitals();
// LoaderBottomSheet.hideLoader();
LoaderBottomSheet.hideLoader();
// await Future.delayed(Duration(seconds: 5));
getIt.get<NavigationService>().pushPage(page: SmartWatchesHealthDataScreen());
}
@ -289,4 +289,8 @@ class HealthProvider with ChangeNotifier {
}
return formattedString;
}
void clearError(){
error = null;
}
}

@ -22,6 +22,7 @@ class Vitals {
if (timestamp.isEmpty) {
timestamp = DateTime.now().toIso8601String();
}
timestamp = DateTime.parse(timestamp).toLocal().toIso8601String();
return Vitals(
value: map['value'] ?? "",
timestamp: timestamp,

@ -0,0 +1 @@
class IllegalWatchTypeException implements Exception {}

@ -6,6 +6,8 @@ import 'package:hmg_patient_app_new/features/smartwatch_health_data/watch_connec
import 'package:hmg_patient_app_new/features/smartwatch_health_data/watch_connectors/samsung_health.dart';
import 'package:hmg_patient_app_new/features/smartwatch_health_data/watch_connectors/watch_helper.dart';
import 'IllegalWatchTypeException.dart';
class CreateWatchHelper {
static WatchHelper getWatchName(SmartWatchTypes watchType) {
/// if running device is ios
@ -16,7 +18,7 @@ class CreateWatchHelper {
case SmartWatchTypes.huawei:
return HuaweiHealthDataConnector();
default:
return SamsungHealth();
throw IllegalWatchTypeException();
}
}
}

@ -1,5 +1,6 @@
import 'dart:math';
import 'package:easy_localization/easy_localization.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
@ -43,7 +44,7 @@ class _ActivityDetailsState extends State<ActivityDetails> {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "All Health Data".needTranslation,
title: "allHealthData".tr(),
child: Column(
spacing: 16.h,
children: [
@ -113,8 +114,8 @@ class _ActivityDetailsState extends State<ActivityDetails> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
widget.sectionName.capitalizeFirstofEach.toText32(isBold: true, color: AppColors.textColor),
"Average".toText12(isBold: true, color: AppColors.greyTextColor)
widget.sectionName.capitalizeFirstofEach.tr().toText32(isBold: true, color: AppColors.textColor),
"average".tr().needTranslation.toText12(isBold: true, color: AppColors.greyTextColor)
],
),
Selector<HealthProvider, Tuple2<double?, String?>>(

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
@ -20,14 +21,14 @@ class SmartWatchesHealthDataScreen extends StatelessWidget {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "All Health Data".needTranslation,
title: "allHealthData".tr(context: context),
child: Column(
spacing: 16.h,
children: [
resultItem(
leadingIcon: AppAssets.watchActivity,
title: "Activity Calories".needTranslation,
description: "Activity rings give you a quick visual reference of how active you are each day. ".needTranslation,
title: "activityCalories".tr(context: context),
description: "activityCaloriesDescription".tr(context: context),
trailingIcon: AppAssets.watchActivityTrailing,
result: context.read<HealthProvider>().sumOfNonEmptyData(context.read<HealthProvider>().vitals?.activity ?? []),
unitsOfMeasure: "Kcal")
@ -36,12 +37,12 @@ class SmartWatchesHealthDataScreen extends StatelessWidget {
context.read<HealthProvider>().deleteDataIfSectionIsDifferent("activity");
context.read<HealthProvider>().saveSelectedSection("activity");
context.read<HealthProvider>().fetchData();
context.read<HealthProvider>().navigateToDetails("activity", sectionName: "Activity Calories", uom: "Kcal");
context.read<HealthProvider>().navigateToDetails("activity", sectionName: "activityCalories".tr(), uom: "Kcal");
}),
resultItem(
leadingIcon: AppAssets.watchSteps,
title: "Steps".needTranslation,
description: "Step count is the number of steps you take throughout the day.".needTranslation,
title: "steps".tr(context: context),
description: "stepsDescription".tr(context: context),
trailingIcon: AppAssets.watchStepsTrailing,
result: context.read<HealthProvider>().sumOfNonEmptyData(context.read<HealthProvider>().vitals?.step ?? []),
unitsOfMeasure: "Steps")
@ -60,12 +61,12 @@ class SmartWatchesHealthDataScreen extends StatelessWidget {
context.read<HealthProvider>().deleteDataIfSectionIsDifferent("steps");
context.read<HealthProvider>().saveSelectedSection("steps");
context.read<HealthProvider>().fetchData();
context.read<HealthProvider>().navigateToDetails("steps", sectionName: "Steps", uom: "Steps");
context.read<HealthProvider>().navigateToDetails("steps", sectionName: "steps".tr(), uom: "Steps");
}),
resultItem(
leadingIcon: AppAssets.watchSteps,
title: "Distance Covered".needTranslation,
description: "Step count is the distance you take throughout the day.".needTranslation,
title: "distanceCovered".tr(context: context),
description: "distanceCoveredDescription".tr(context: context),
trailingIcon: AppAssets.watchStepsTrailing,
result: context.read<HealthProvider>().sumOfNonEmptyData(context.read<HealthProvider>().vitals?.distance ?? []),
unitsOfMeasure: "Km")
@ -74,12 +75,12 @@ class SmartWatchesHealthDataScreen extends StatelessWidget {
context.read<HealthProvider>().deleteDataIfSectionIsDifferent("distance");
context.read<HealthProvider>().saveSelectedSection("distance");
context.read<HealthProvider>().fetchData();
context.read<HealthProvider>().navigateToDetails("distance", sectionName: "Distance Covered", uom: "km");
context.read<HealthProvider>().navigateToDetails("distance", sectionName: "distanceCovered".tr(), uom: "km");
}),
resultItem(
leadingIcon: AppAssets.watchSleep,
title: "Sleep Score".needTranslation,
description: "This will keep track of how much hours you sleep in a day".needTranslation,
title: "sleepScore".tr(context: context),
description: "sleepScoreDescription".tr(context: context),
trailingIcon: AppAssets.watchSleepTrailing,
result: DateUtil.millisToHourMin(
int.parse(context.read<HealthProvider>().firstNonEmptyValue(context.read<HealthProvider>().vitals?.sleep ?? [])))
@ -94,12 +95,12 @@ class SmartWatchesHealthDataScreen extends StatelessWidget {
context.read<HealthProvider>().deleteDataIfSectionIsDifferent("sleep");
context.read<HealthProvider>().saveSelectedSection("sleep");
context.read<HealthProvider>().fetchData();
context.read<HealthProvider>().navigateToDetails("sleep", sectionName: "Sleep Score", uom: "");
context.read<HealthProvider>().navigateToDetails("sleep", sectionName: "sleepScore".tr(), uom: "");
}),
resultItem(
leadingIcon: AppAssets.watchWeight,
title: "Blood Oxygen".needTranslation,
description: "This will calculate your Blood Oxygen to keep track and update history".needTranslation,
title: "bloodOxygen".tr(context: context),
description: "bloodOxygenTrackingDescription".tr(context: context),
trailingIcon: AppAssets.watchWeightTrailing,
result: context.read<HealthProvider>().firstNonEmptyValue(
context.read<HealthProvider>().vitals?.bodyOxygen ?? [],
@ -110,12 +111,12 @@ class SmartWatchesHealthDataScreen extends StatelessWidget {
context.read<HealthProvider>().deleteDataIfSectionIsDifferent("bodyOxygen");
context.read<HealthProvider>().saveSelectedSection("bodyOxygen");
context.read<HealthProvider>().fetchData();
context.read<HealthProvider>().navigateToDetails("bodyOxygen", uom: "%", sectionName: "Blood Oxygen");
context.read<HealthProvider>().navigateToDetails("bodyOxygen", uom: "%", sectionName: "bloodOxygen".tr());
}),
resultItem(
leadingIcon: AppAssets.watchWeight,
title: "Body temperature".needTranslation,
description: "This will calculate your Body temprerature to keep track and update history".needTranslation,
title: "bodyTemperature".tr(context: context),
description: "bodyTemperatureTrackingDescription".tr(context: context),
trailingIcon: AppAssets.watchWeightTrailing,
result: context.read<HealthProvider>().firstNonEmptyValue(context.read<HealthProvider>().vitals?.bodyTemperature ?? []),
unitsOfMeasure: "C")
@ -124,7 +125,7 @@ class SmartWatchesHealthDataScreen extends StatelessWidget {
context.read<HealthProvider>().deleteDataIfSectionIsDifferent("bodyTemperature");
context.read<HealthProvider>().saveSelectedSection("bodyTemperature");
context.read<HealthProvider>().fetchData();
context.read<HealthProvider>().navigateToDetails("bodyTemperature", sectionName: "Body temperature".capitalizeFirstofEach, uom: "C");
context.read<HealthProvider>().navigateToDetails("bodyTemperature", sectionName: "bodyTemperature".tr().capitalizeFirstofEach, uom: "C");
}),
],
).paddingSymmetrical(24.w, 24.h),

@ -25,6 +25,12 @@ class SmartwatchHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Consumer<HealthProvider>(builder: (context, healthProvider, child) {
if (healthProvider.error != null &&
healthProvider.error?.isNotEmpty == true) {
Utils.showToast(healthProvider.error!);
healthProvider.clearError();
}
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
@ -62,7 +68,8 @@ class SmartwatchHomePage extends StatelessWidget {
child: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.h),
padding:
EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.h),
child: GridView(
padding: EdgeInsets.zero,
shrinkWrap: true,
@ -71,37 +78,55 @@ class SmartwatchHomePage extends StatelessWidget {
crossAxisCount: 2,
crossAxisSpacing: 16.h,
mainAxisSpacing: 16.w,
childAspectRatio: isFoldable ? 1.1 : (isTablet ? 1.3 : 0.7),
childAspectRatio:
isFoldable ? 1.1 : (isTablet ? 1.3 : 0.7),
),
children: [
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
decoration:
RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.r,
),
child: Column(
children: [
Utils.buildImgWithAssets(icon: "assets/images/png/smartwatches/apple-watch-5.jpg", width: 136.h, height: 136.h).paddingSymmetrical(24.w, 8.h),
"Apple Watch".needTranslation.toText16(isBold: true),
Utils.buildImgWithAssets(
icon:
"assets/images/png/smartwatches/apple-watch-5.jpg",
width: 136.h,
height: 136.h)
.paddingSymmetrical(24.w, 8.h),
"applewatch"
.tr()
.needTranslation
.toText16(isBold: true),
CustomButton(
text: LocaleKeys.selectSmartWatch.tr(context: context),
text: LocaleKeys.selectSmartWatch
.tr(context: context),
onPressed: () {
context
.read<HealthProvider>()
.setSelectedWatchType(SmartWatchTypes.apple, "assets/images/png/smartwatches/apple-watch-5.jpg");
context.read<HealthProvider>().setSelectedWatchType(
SmartWatchTypes.apple,
"assets/images/png/smartwatches/apple-watch-5.jpg");
getIt.get<NavigationService>().pushPage(
page: SmartwatchInstructionsPage(
smartwatchDetails: SmartwatchDetails(
SmartWatchTypes.apple,
"assets/images/png/smartwatches/apple-watch-5.jpg",
AppAssets.bluetooth,
LocaleKeys.applehealthapplicationshouldbeinstalledinyourphone.tr(context: context),
LocaleKeys.unabletodetectapplicationinstalledpleasecomebackonceinstalled.tr(context: context),
LocaleKeys.applewatchshouldbeconnected.tr(context: context)),
LocaleKeys
.applehealthapplicationshouldbeinstalledinyourphone
.tr(context: context),
LocaleKeys
.unabletodetectapplicationinstalledpleasecomebackonceinstalled
.tr(context: context),
LocaleKeys.applewatchshouldbeconnected
.tr(context: context)),
));
},
backgroundColor: AppColors.primaryRedColor.withAlpha(40),
borderColor: AppColors.primaryRedColor.withAlpha(0),
backgroundColor:
AppColors.primaryRedColor.withAlpha(40),
borderColor:
AppColors.primaryRedColor.withAlpha(0),
textColor: AppColors.primaryRedColor,
fontSize: 14.f,
isBold: true,
@ -112,31 +137,51 @@ class SmartwatchHomePage extends StatelessWidget {
),
),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r),
decoration: RoundedRectangleBorder()
.toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.r),
child: Column(
children: [
Utils.buildImgWithAssets(icon: "assets/images/png/smartwatches/galaxy_watch_8_classic.jpeg", fit: BoxFit.contain, width: 136.w, height: 136.h)
Utils.buildImgWithAssets(
icon:
"assets/images/png/smartwatches/galaxy_watch_8_classic.jpeg",
fit: BoxFit.contain,
width: 136.w,
height: 136.h)
.paddingSymmetrical(24.w, 8.h),
"Samsung Watch".needTranslation.toText16(isBold: true),
"samsungwatch"
.tr()
.needTranslation
.toText16(isBold: true),
CustomButton(
text: LocaleKeys.selectSmartWatch.tr(context: context),
text: LocaleKeys.selectSmartWatch
.tr(context: context),
onPressed: () {
context
.read<HealthProvider>()
.setSelectedWatchType(SmartWatchTypes.samsung, "assets/images/png/smartwatches/galaxy_watch_8_classic.jpeg");
context.read<HealthProvider>().setSelectedWatchType(
SmartWatchTypes.samsung,
"assets/images/png/smartwatches/galaxy_watch_8_classic.jpeg");
getIt.get<NavigationService>().pushPage(
page: SmartwatchInstructionsPage(
smartwatchDetails: SmartwatchDetails(
SmartWatchTypes.samsung,
"assets/images/png/smartwatches/galaxy_watch_8_classic.jpeg",
AppAssets.bluetooth,
LocaleKeys.samsunghealthapplicationshouldbeinstalledinyourphone.tr(context: context),
LocaleKeys.unabletodetectapplicationinstalledpleasecomebackonceinstalled.tr(context: context),
LocaleKeys.samsungwatchshouldbeconnected.tr(context: context)),
LocaleKeys
.samsunghealthapplicationshouldbeinstalledinyourphone
.tr(context: context),
LocaleKeys
.unabletodetectapplicationinstalledpleasecomebackonceinstalled
.tr(context: context),
LocaleKeys
.samsungwatchshouldbeconnected
.tr(context: context)),
));
},
backgroundColor: AppColors.primaryRedColor.withAlpha(40),
borderColor: AppColors.primaryRedColor.withAlpha(0),
backgroundColor:
AppColors.primaryRedColor.withAlpha(40),
borderColor:
AppColors.primaryRedColor.withAlpha(0),
textColor: AppColors.primaryRedColor,
fontSize: 14.f,
isBold: true,
@ -147,30 +192,42 @@ class SmartwatchHomePage extends StatelessWidget {
),
),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
decoration:
RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.r,
),
child: Column(
children: [
Utils.buildImgWithAssets(icon: "assets/images/png/smartwatches/Huawei_Watch.png", width: 136.w, height: 136.h).paddingSymmetrical(24.w, 8.h),
"Huawei Watch".needTranslation.toText16(isBold: true),
Utils.buildImgWithAssets(
icon:
"assets/images/png/smartwatches/Huawei_Watch.png",
width: 136.w,
height: 136.h)
.paddingSymmetrical(24.w, 8.h),
"huaweiwatch"
.tr()
.needTranslation
.toText16(isBold: true),
CustomButton(
text: LocaleKeys.selectSmartWatch.tr(context: context),
text: LocaleKeys.selectSmartWatch
.tr(context: context),
onPressed: () {
context.read<HealthProvider>().setSelectedWatchType(SmartWatchTypes.huawei, "assets/images/png/smartwatches/Huawei_Watch.png");
getIt.get<NavigationService>().pushPage(page: SmartwatchInstructionsPage(
smartwatchDetails: SmartwatchDetails(SmartWatchTypes.huawei,
"assets/images/png/smartwatches/Huawei_Watch.png",
AppAssets.bluetooth,
LocaleKeys.huaweihealthapplicationshouldbeinstalledinyourphone.tr(context: context),
LocaleKeys.unabletodetectapplicationinstalledpleasecomebackonceinstalled.tr(context: context),
LocaleKeys.huaweiwatchshouldbeconnected.tr(context: context)),
));
// showUnavailableDialog(context);
// context.read<HealthProvider>().setSelectedWatchType(SmartWatchTypes.huawei, "assets/images/png/smartwatches/Huawei_Watch.png");
// getIt.get<NavigationService>().pushPage(page: SmartwatchInstructionsPage(
// smartwatchDetails: SmartwatchDetails(SmartWatchTypes.huawei,
// "assets/images/png/smartwatches/Huawei_Watch.png",
// AppAssets.bluetooth,
// LocaleKeys.huaweihealthapplicationshouldbeinstalledinyourphone.tr(context: context),
// LocaleKeys.unabletodetectapplicationinstalledpleasecomebackonceinstalled.tr(context: context),
// LocaleKeys.huaweiwatchshouldbeconnected.tr(context: context)),
// ));
showUnavailableDialog(context);
},
backgroundColor: AppColors.primaryRedColor.withAlpha(40),
borderColor: AppColors.primaryRedColor.withAlpha(0),
backgroundColor:
AppColors.primaryRedColor.withAlpha(40),
borderColor:
AppColors.primaryRedColor.withAlpha(0),
textColor: AppColors.primaryRedColor,
fontSize: 14.f,
isBold: true,
@ -181,16 +238,26 @@ class SmartwatchHomePage extends StatelessWidget {
),
),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
decoration:
RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.r,
),
child: Column(
children: [
Utils.buildImgWithAssets(icon: "assets/images/png/smartwatches/Whoop_Watch.png", width: 136.w, height: 136.h).paddingSymmetrical(24.w, 8.h),
"Whoop Watch".needTranslation.toText16(isBold: true),
Utils.buildImgWithAssets(
icon:
"assets/images/png/smartwatches/Whoop_Watch.png",
width: 136.w,
height: 136.h)
.paddingSymmetrical(24.w, 8.h),
"whoopwatch"
.tr()
.needTranslation
.toText16(isBold: true),
CustomButton(
text: LocaleKeys.selectSmartWatch.tr(context: context),
text: LocaleKeys.selectSmartWatch
.tr(context: context),
onPressed: () {
showUnavailableDialog(context);
// context.read<HealthProvider>().setSelectedWatchType(SmartWatchTypes.whoop, "assets/images/png/smartwatches/Whoop_Watch.png");
@ -203,8 +270,10 @@ class SmartwatchHomePage extends StatelessWidget {
// LocaleKeys.whoopwatchshouldbeconnected.tr(context: context)),
// ));
},
backgroundColor: AppColors.primaryRedColor.withAlpha(40),
borderColor: AppColors.primaryRedColor.withAlpha(0),
backgroundColor:
AppColors.primaryRedColor.withAlpha(40),
borderColor:
AppColors.primaryRedColor.withAlpha(0),
textColor: AppColors.primaryRedColor,
fontSize: 14.f,
isBold: true,
@ -222,6 +291,7 @@ class SmartwatchHomePage extends StatelessWidget {
),
),
);
});
}
void showUnavailableDialog(BuildContext context) {
@ -229,7 +299,8 @@ class SmartwatchHomePage extends StatelessWidget {
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText: LocaleKeys.featureComingSoonDescription.tr(context: context),
loadingText:
LocaleKeys.featureComingSoonDescription.tr(context: context),
isShowActionButtons: false,
showOkButton: true,
onConfirmTap: () async {

@ -24,7 +24,7 @@ class SmartwatchInstructionsPage extends StatelessWidget {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "How does it work".needTranslation,
title: "smartwatchHowItWorks".tr(context: context),
bottomChild: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,

Loading…
Cancel
Save