|
|
|
@ -21,65 +21,75 @@ class SmartwatchInstructionsPage extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
return Consumer<HealthProvider>(builder: (context, healthProvider, child) {
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
final errorMessage = healthProvider.error;
|
|
|
|
body: CollapsingListView(
|
|
|
|
if (errorMessage != null && errorMessage.isNotEmpty) {
|
|
|
|
title: "smartwatchHowItWorks".tr(context: context),
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
bottomChild: Container(
|
|
|
|
Utils.showToast(errorMessage, longDuration: false);
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
healthProvider.clearError();
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
});
|
|
|
|
borderRadius: 24.r,
|
|
|
|
}
|
|
|
|
),
|
|
|
|
return Scaffold(
|
|
|
|
child: CustomButton(
|
|
|
|
backgroundColor: AppColors.bgScaffoldColor,
|
|
|
|
text: LocaleKeys.getStarted.tr(context: context),
|
|
|
|
body: CollapsingListView(
|
|
|
|
onPressed: () {
|
|
|
|
title: "smartwatchHowItWorks".tr(context: context),
|
|
|
|
context.read<HealthProvider>().initDevice();
|
|
|
|
bottomChild: Container(
|
|
|
|
},
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
backgroundColor: AppColors.primaryRedColor,
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
borderColor: AppColors.primaryRedColor,
|
|
|
|
borderRadius: 24.r,
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
),
|
|
|
|
fontSize: 16.f,
|
|
|
|
child: CustomButton(
|
|
|
|
isBold: true,
|
|
|
|
text: LocaleKeys.getStarted.tr(context: context),
|
|
|
|
borderRadius: 12.r,
|
|
|
|
onPressed: () {
|
|
|
|
height: 50.h,
|
|
|
|
context.read<HealthProvider>().initDevice();
|
|
|
|
).paddingSymmetrical(24.w, 30.h),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
backgroundColor: AppColors.primaryRedColor,
|
|
|
|
child: Column(
|
|
|
|
borderColor: AppColors.primaryRedColor,
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
spacing: 18.h,
|
|
|
|
fontSize: 16.f,
|
|
|
|
children: [
|
|
|
|
isBold: true,
|
|
|
|
Utils.buildImgWithAssets(
|
|
|
|
borderRadius: 12.r,
|
|
|
|
icon: smartwatchDetails.watchIcon,
|
|
|
|
height: 50.h,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
).paddingSymmetrical(24.w, 30.h),
|
|
|
|
height: 280.h,
|
|
|
|
|
|
|
|
width: 280.w,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
DecoratedBox(
|
|
|
|
child: Column(
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.h),
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
child: Column(
|
|
|
|
spacing: 18.h,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
watchContentDetails(
|
|
|
|
Utils.buildImgWithAssets(
|
|
|
|
title: smartwatchDetails.detailsTitle,
|
|
|
|
icon: smartwatchDetails.watchIcon,
|
|
|
|
description: smartwatchDetails.details,
|
|
|
|
fit: BoxFit.contain,
|
|
|
|
icon: smartwatchDetails.smallIcon,
|
|
|
|
height: 280.h,
|
|
|
|
descriptionTextColor: AppColors.primaryRedColor,
|
|
|
|
width: 280.w,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(
|
|
|
|
DecoratedBox(
|
|
|
|
color: AppColors.dividerColor,
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.h),
|
|
|
|
thickness: 1.h,
|
|
|
|
child: Column(
|
|
|
|
).paddingOnly(top: 16.h, bottom: 16.h),
|
|
|
|
children: [
|
|
|
|
watchContentDetails(
|
|
|
|
watchContentDetails(
|
|
|
|
title: smartwatchDetails.secondTitle,
|
|
|
|
title: smartwatchDetails.detailsTitle,
|
|
|
|
description: LocaleKeys.updatetheinformation.tr(),
|
|
|
|
description: smartwatchDetails.details,
|
|
|
|
icon: AppAssets.bluetooth,
|
|
|
|
icon: smartwatchDetails.smallIcon,
|
|
|
|
descriptionTextColor: AppColors.greyTextColor,
|
|
|
|
descriptionTextColor: AppColors.primaryRedColor,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
Divider(
|
|
|
|
).paddingSymmetrical(16.w, 16.h),
|
|
|
|
color: AppColors.dividerColor,
|
|
|
|
)
|
|
|
|
thickness: 1.h,
|
|
|
|
],
|
|
|
|
).paddingOnly(top: 16.h, bottom: 16.h),
|
|
|
|
).paddingSymmetrical(24.w, 16.h),
|
|
|
|
watchContentDetails(
|
|
|
|
),
|
|
|
|
title: smartwatchDetails.secondTitle,
|
|
|
|
|
|
|
|
description: LocaleKeys.updatetheinformation.tr(),
|
|
|
|
|
|
|
|
icon: AppAssets.bluetooth,
|
|
|
|
|
|
|
|
descriptionTextColor: AppColors.greyTextColor,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
).paddingSymmetrical(16.w, 16.h),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
).paddingSymmetrical(24.w, 16.h),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|