@ -6,8 +6,11 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import ' package:diplomaticquarterapp/locator.dart ' ;
import ' package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart ' ;
import ' package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart ' ;
import ' package:diplomaticquarterapp/theme/colors.dart ' ;
import ' package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/uitl/utils_new.dart ' ;
import ' package:diplomaticquarterapp/widgets/buttons/defaultButton.dart ' ;
import ' package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart ' ;
import ' package:diplomaticquarterapp/widgets/transitions/fade_page.dart ' ;
import ' package:flutter/cupertino.dart ' ;
@ -24,13 +27,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
bool hasAlreadySynced = false ;
AuthenticatedUserObject authenticatedUserObject =
locator < AuthenticatedUserObject > ( ) ;
AuthenticatedUserObject authenticatedUserObject = locator < AuthenticatedUserObject > ( ) ;
@ override
void initState ( ) {
WidgetsBinding . instance . addPostFrameCallback ( ( timeStamp ) {
if ( authenticatedUserObject . isLogin ) getLastPatientRecord ( context ) ;
if ( authenticatedUserObject . isLogin ) getLastPatientRecord ( context ) ;
} ) ;
super . initState ( ) ;
}
@ -49,9 +51,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
ImagesInfo ( imageEn: ' https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/1.png ' , imageAr: ' https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/1.png ' )
] ,
body: Container (
child: Platform . isIOS
? _getAppleWatchInstructions ( )
: _getGoogleWatchInstructions ( ) ,
child: Platform . isIOS ? _getAppleWatchInstructions ( ) : _getGoogleWatchInstructions ( ) ,
) ) ;
}
@ -65,10 +65,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
/ / margin: EdgeInsets . only ( top: 10.0 ) ,
child: CarouselSlider (
carouselController: buttonCarouselController ,
options: CarouselOptions (
enableInfiniteScroll: false ,
viewportFraction: 0.95 ,
height: MediaQuery . of ( context ) . size . height * 0.9 ) ,
options: CarouselOptions ( enableInfiniteScroll: false , viewportFraction: 0.95 , height: MediaQuery . of ( context ) . size . height * 0.65 ) ,
items: [ 1 , 2 ] . map ( ( i ) {
return Builder (
builder: ( BuildContext context ) {
@ -83,33 +80,24 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
child: i = = 1
? Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Container (
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Text ( " Supported Smartwatches " ,
style: TextStyle (
fontSize: 22.0 ,
fontWeight: FontWeight . bold ) ) ,
margin: EdgeInsets . only ( top: 10.0 , left: 15.0 , right: 15.0 ) ,
child: Text ( TranslationBase . of ( context ) . supportedWatches , style: TextStyle ( fontSize: 22.0 , fontWeight: FontWeight . bold ) ) ,
) ,
Container (
child: Row (
children: [
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 10.0 ) ,
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/apple-watch-1.jpeg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/apple-watch-1.jpeg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" Apple Watch Series 1 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 1 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -117,20 +105,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 10.0 ) ,
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/apple-watch-2.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/apple-watch-2.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" Apple Watch Series 2 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 2 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -145,20 +126,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/apple-watch-3.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/apple-watch-3.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" Apple Watch Series 3 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 3 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -166,20 +140,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/apple-watch-4.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/apple-watch-4.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" Apple Watch Series 4 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 4 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -194,20 +161,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/apple-watch-5.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/apple-watch-5.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" Apple Watch Series 5 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 5 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -215,20 +175,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/Apple-Watch-6.png " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/Apple-Watch-6.png " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" Apple Watch Series 6 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 6 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -243,19 +196,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/miBand3.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/miBand3.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 3 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 3 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -263,19 +210,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/miBand4.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/miBand4.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 4 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 4 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -285,143 +226,78 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
) ,
Container (
margin: EdgeInsets . fromLTRB (
10.0 , 30.0 , 10.0 , 10.0 ) ,
child: Text (
" It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
margin: EdgeInsets . fromLTRB ( 10.0 , 30.0 , 10.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" Before syncing data, please make sure that you have followed the instructions properly " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 15.0 ) ,
child: ButtonTheme (
shape: RoundedRectangleBorder (
borderRadius:
BorderRadius . circular ( 10.0 ) ,
) ,
minWidth:
MediaQuery . of ( context ) . size . width ,
height: 45.0 ,
child: RaisedButton (
color: new Color ( 0xFF60686b ) ,
textColor: Colors . white ,
elevation: 0 ,
disabledTextColor: Colors . white ,
disabledColor: new Color ( 0xFFbcc2c4 ) ,
onPressed: ( ) {
buttonCarouselController . nextPage ( ) ;
} ,
child: Text ( " CONTINUE " ,
style: TextStyle ( fontSize: 18.0 ) ) ,
) ,
margin: EdgeInsets . fromLTRB ( 15.0 , 40.0 , 15.0 , 0.0 ) ,
child: DefaultButton (
TranslationBase . of ( context ) . continues ,
( ) {
buttonCarouselController . nextPage ( ) ;
} ,
color: Color ( 0xff359846 ) ,
) ,
) ,
] ,
)
: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Container (
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Text ( " Watch Instructions: " ,
style: TextStyle (
fontSize: 22.0 ,
fontWeight: FontWeight . bold ,
fontFamily: " WorkSans " ) ) ,
margin: EdgeInsets . fromLTRB ( 10.0 , 20.0 , 10.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . watchInstructions , style: TextStyle ( fontSize: 22.0 , fontWeight: FontWeight . bold ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
margin: EdgeInsets . fromLTRB ( 10.0 , 20.0 , 10.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
margin: EdgeInsets . fromLTRB (
10.0 , 20.0 , 10.0 , 10.0 ) ,
child: Text (
" Before syncing data, please make sure that following instructions are met: " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
margin: EdgeInsets . fromLTRB ( 10.0 , 20.0 , 10.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
margin: EdgeInsets . fromLTRB (
10.0 , 20.0 , 10.0 , 10.0 ) ,
child: Text (
" 1. Make sure that you have installed 'Health' App & 'Watch' App from Apple Store. " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
margin: EdgeInsets . fromLTRB ( 10.0 , 20.0 , 10.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . iosInstructions1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" 2. Make sure that your Apple Watch is connected with the Watch & Health Apps. " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
margin: EdgeInsets . fromLTRB ( 10.0 , 20.0 , 10.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . iosInstructions2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" 3. Make sure that data like heart rate, steps, distance etc. are being shown on your health app. " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
margin: EdgeInsets . fromLTRB ( 10.0 , 20.0 , 10.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . iosInstructions3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
margin: EdgeInsets . fromLTRB (
15.0 , 80.0 , 15.0 , 15.0 ) ,
child: ButtonTheme (
shape: RoundedRectangleBorder (
borderRadius:
BorderRadius . circular ( 10.0 ) ,
) ,
minWidth:
MediaQuery . of ( context ) . size . width ,
height: 45.0 ,
child: RaisedButton (
color: new Color ( 0xFF60686b ) ,
textColor: Colors . white ,
elevation: 0 ,
disabledTextColor: Colors . white ,
disabledColor: new Color ( 0xFFbcc2c4 ) ,
onPressed: ( ) {
buttonCarouselController . nextPage ( ) ;
} ,
child: Text ( " SYNC HEALTH DATA " ,
style: TextStyle ( fontSize: 18.0 ) ) ,
) ,
Padding (
padding: const EdgeInsets . fromLTRB ( 12.0 , 50.0 , 12.0 , 20.0 ) ,
child: Row (
children: [
Expanded (
child: DefaultButton (
TranslationBase . of ( context ) . syncHealthData ,
( ) { } ,
color: Color ( 0xFFD02127 ) ,
disabledColor: Color ( 0xff28323A ) . withOpacity ( 0.3 ) ,
) ,
) ,
mWidth ( 12 ) ,
if ( hasAlreadySynced )
Expanded (
child: DefaultButton (
TranslationBase . of ( context ) . alreadySynced ,
( ) {
_openHealthDataList ( ) ;
} ,
color: Color ( 0xff359846 ) ,
) ,
) ,
] ,
) ,
) ,
hasAlreadySynced ? Container (
margin: EdgeInsets . fromLTRB (
15.0 , 0.0 , 15.0 , 15.0 ) ,
child: ButtonTheme (
shape: RoundedRectangleBorder (
borderRadius:
BorderRadius . circular ( 10.0 ) ,
) ,
minWidth:
MediaQuery . of ( context ) . size . width ,
height: 45.0 ,
child: RaisedButton (
color: new Color ( 0xFF60686b ) ,
textColor: Colors . white ,
elevation: 0 ,
disabledTextColor: Colors . white ,
disabledColor: new Color ( 0xFFbcc2c4 ) ,
onPressed: ( ) {
_openHealthDataList ( ) ;
} ,
child: Text ( " ALREADY SYNCED " ,
style: TextStyle ( fontSize: 18.0 ) ) ,
) ,
) ,
) : Container ( ) ,
] ,
) ,
) ) ;
@ -447,7 +323,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
options: CarouselOptions (
/ / enableInfiniteScroll: true ,
viewportFraction: 0.99 ,
height: MediaQuery . of ( context ) . size . height * 1.02 ) ,
height: MediaQuery . of ( context ) . size . height * 0.9 ) ,
items: [ 1 , 2 ] . map ( ( i ) {
return Builder (
builder: ( BuildContext context ) {
@ -455,7 +331,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: MediaQuery . of ( context ) . size . width ,
margin: EdgeInsets . symmetric ( horizontal: 5.0 ) ,
child: Card (
margin: EdgeInsets . only ( top: 16.0 , bottom: 8.0 ) ,
margin: EdgeInsets . only ( top: 16.0 , bottom: 8.0 ) ,
/ / fromLTRB ( 8.0 , 16.0 , 8.0 , 8.0 ) ,
color: Colors . white . withOpacity ( 1.0 ) ,
shape: RoundedRectangleBorder (
@ -463,34 +339,24 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
child: i = = 1
? Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Container (
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Text ( " Supported Smartwatches " ,
style: TextStyle (
fontSize: 22.0 ,
fontWeight: FontWeight . bold ,
fontFamily: " WorkSans " ) ) ,
margin: EdgeInsets . only ( top: 10.0 , left: 15.0 , right: 15.0 ) ,
child: Text ( TranslationBase . of ( context ) . supportedWatches , style: TextStyle ( fontSize: 22.0 , fontWeight: FontWeight . bold ) ) ,
) ,
Container (
child: Row (
children: [
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 10.0 ) ,
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/huawei-watch-2.png " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/huawei-watch-2.png " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" Huawei Watch 2 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Huawei Watch 2 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -498,21 +364,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 10.0 ) ,
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/ticwatche2.png " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/ticwatche2.png " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" Mobovi TicWatch E2 " ,
overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mobovi TicWatch E2 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -527,19 +385,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/huawei-watch-2-classic.png " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/huawei-watch-2-classic.png " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Huawei Watch " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Huawei Watch " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -547,19 +399,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/ticwatche2.png " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/ticwatche2.png " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Fossil Sport " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Fossil Sport " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -574,20 +420,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/misfit-vapor-2.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/misfit-vapor-2.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" MisFit Vapor 2 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " MisFit Vapor 2 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -595,20 +434,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/lg-watch-sport.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/lg-watch-sport.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text (
" LG Watch Sport " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " LG Watch Sport " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -623,19 +455,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/miBand3.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/miBand3.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 3 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 3 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -643,19 +469,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
Expanded (
child: Container (
margin:
EdgeInsets . only ( top: 15.0 ) ,
margin: EdgeInsets . only ( top: 15.0 ) ,
child: Row (
children: [
Image . asset (
" assets/images/SmartWatches/miBand4.jpg " ,
width: 70.0 ,
height: 70.0 ) ,
Image . asset ( " assets/images/SmartWatches/miBand4.jpg " , width: 70.0 , height: 70.0 ) ,
Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 4 " , overflow: TextOverflow . clip ,
style: TextStyle (
fontSize: 12.0 ) ) ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 4 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
)
] ,
) ,
@ -666,162 +486,135 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
InkWell (
onTap: ( ) {
launch (
" https://wearos.google.com/#find-your-watch " ) ;
launch ( " https://wearos.google.com/#find-your-watch " ) ;
} ,
child: Container (
margin: EdgeInsets . only ( top: 20.0 ) ,
child: Text (
" More Supported Smartwatches... " ,
style: TextStyle (
fontSize: 17.0 ,
color: Colors . blue ,
decoration:
TextDecoration . underline ) ) ,
margin: EdgeInsets . only ( top: 20.0 , left: 15.0 , right: 15.0 ) ,
child: Text ( TranslationBase . of ( context ) . moreSupportedWatches ,
textAlign: TextAlign . center , style: TextStyle ( fontSize: 14.0 , color: Colors . blue , decoration: TextDecoration . underline , letterSpacing: - 0.36 ) ) ,
) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" Before syncing data, please make sure that you have followed the instructions properly " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 15.0 ) ,
child: ButtonTheme (
shape: RoundedRectangleBorder (
borderRadius:
BorderRadius . circular ( 10.0 ) ,
) ,
minWidth:
MediaQuery . of ( context ) . size . width ,
height: 45.0 ,
child: RaisedButton (
color: new Color ( 0xFF60686b ) ,
textColor: Colors . white ,
elevation: 0 ,
disabledTextColor: Colors . white ,
disabledColor: new Color ( 0xFFbcc2c4 ) ,
onPressed: ( ) {
buttonCarouselController . nextPage ( ) ;
} ,
child: Text ( " CONTINUE " ,
style: TextStyle ( fontSize: 18.0 ) ) ,
) ,
child: DefaultButton (
TranslationBase . of ( context ) . continues ,
( ) {
buttonCarouselController . nextPage ( ) ;
} ,
color: CustomColors . green ,
) ,
) ,
] ,
)
: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Container (
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Text ( " Watch Instructions: " ,
style: TextStyle (
fontSize: 22.0 ,
fontWeight: FontWeight . bold ,
fontFamily: " WorkSans " ) ) ,
margin: EdgeInsets . only ( top: 10.0 , left: 15.0 , right: 15.0 ) ,
child: Text ( TranslationBase . of ( context ) . watchInstructions , style: TextStyle ( fontSize: 22.0 , fontWeight: FontWeight . bold ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" Before syncing data, please make sure that following instructions are met: " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" 1. Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore. " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" 2. Make sure that you have installed your watch related apps from Google PlayStore. " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" 3. Make sure that your Smart Watch is connected with the WearOS app & your watch apps. " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text (
" 4. Make sure that your smart watch apps are linked/associated with Google Fit App. " ,
textAlign: TextAlign . center ,
style: TextStyle ( fontSize: 17.0 ) ) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions4 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
) ,
Container (
margin: EdgeInsets . fromLTRB (
15.0 , 75.0 , 15.0 , 15.0 ) ,
child: ButtonTheme (
shape: RoundedRectangleBorder (
borderRadius:
BorderRadius . circular ( 10.0 ) ,
) ,
minWidth:
MediaQuery . of ( context ) . size . width ,
height: 45.0 ,
child: RaisedButton (
color: new Color ( 0xFF60686b ) ,
textColor: Colors . white ,
elevation: 0 ,
disabledTextColor: Colors . white ,
disabledColor: new Color ( 0xFFbcc2c4 ) ,
onPressed: ( ) {
buttonCarouselController . nextPage ( ) ;
} ,
child: Text ( " SYNC HEALTH DATA " ,
style: TextStyle ( fontSize: 18.0 ) ) ,
) ,
Padding (
padding: const EdgeInsets . fromLTRB ( 12.0 , 50.0 , 12.0 , 20.0 ) ,
child: Row (
children: [
Expanded (
child: DefaultButton (
TranslationBase . of ( context ) . syncHealthData ,
( ) { } ,
color: Color ( 0xFFD02127 ) ,
disabledColor: Color ( 0xff28323A ) . withOpacity ( 0.3 ) ,
) ,
) ,
mWidth ( 12 ) ,
if ( hasAlreadySynced )
Expanded (
child: DefaultButton (
TranslationBase . of ( context ) . alreadySynced ,
( ) {
_openHealthDataList ( ) ;
} ,
color: Color ( 0xff359846 ) ,
) ,
) ,
] ,
) ,
) ,
hasAlreadySynced ? Container (
margin: EdgeInsets . fromLTRB (
15.0 , 0.0 , 15.0 , 15.0 ) ,
child: ButtonTheme (
shape: RoundedRectangleBorder (
borderRadius:
BorderRadius . circular ( 10.0 ) ,
) ,
minWidth:
MediaQuery . of ( context ) . size . width ,
height: 45.0 ,
child: RaisedButton (
color: new Color ( 0xFF60686b ) ,
textColor: Colors . white ,
elevation: 0 ,
disabledTextColor: Colors . white ,
disabledColor: new Color ( 0xFFbcc2c4 ) ,
onPressed: ( ) {
_openHealthDataList ( ) ;
} ,
child: Text ( " ALREADY SYNCED " ,
style: TextStyle ( fontSize: 18.0 ) ) ,
) ,
) ,
) : Container ( ) ,
/ / Container (
/ / margin: EdgeInsets . fromLTRB ( 15.0 , 75.0 , 15.0 , 15.0 ) ,
/ / child: ButtonTheme (
/ / shape: RoundedRectangleBorder (
/ / borderRadius: BorderRadius . circular ( 10.0 ) ,
/ / ) ,
/ / minWidth: MediaQuery . of ( context ) . size . width ,
/ / height: 45.0 ,
/ / child: RaisedButton (
/ / color: new Color ( 0xFF60686b ) ,
/ / textColor: Colors . white ,
/ / elevation: 0 ,
/ / disabledTextColor: Colors . white ,
/ / disabledColor: new Color ( 0xFFbcc2c4 ) ,
/ / onPressed: ( ) {
/ / buttonCarouselController . nextPage ( ) ;
/ / } ,
/ / child: Text ( " SYNC HEALTH DATA " , style: TextStyle ( fontSize: 18.0 ) ) ,
/ / ) ,
/ / ) ,
/ / ) ,
/ / hasAlreadySynced
/ / ? Container (
/ / margin: EdgeInsets . fromLTRB ( 15.0 , 0.0 , 15.0 , 15.0 ) ,
/ / child: ButtonTheme (
/ / shape: RoundedRectangleBorder (
/ / borderRadius: BorderRadius . circular ( 10.0 ) ,
/ / ) ,
/ / minWidth: MediaQuery . of ( context ) . size . width ,
/ / height: 45.0 ,
/ / child: RaisedButton (
/ / color: new Color ( 0xFF60686b ) ,
/ / textColor: Colors . white ,
/ / elevation: 0 ,
/ / disabledTextColor: Colors . white ,
/ / disabledColor: new Color ( 0xFFbcc2c4 ) ,
/ / onPressed: ( ) {
/ / _openHealthDataList ( ) ;
/ / } ,
/ / child: Text ( " ALREADY SYNCED " , style: TextStyle ( fontSize: 18.0 ) ) ,
/ / ) ,
/ / ) ,
/ / )
/ / : Container ( ) ,
] ,
) ,
) ) ;