@ -6,6 +6,7 @@ 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 ' ;
@ -64,7 +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 ) {
@ -338,10 +339,11 @@ 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 (
@ -487,124 +489,132 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
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 ) ) ,
) ,
) ,
) ,
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: ( ) {
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 ( ) ;
} ,
c hild: Text ( " ALREADY SYNCED " , style: TextStyle ( fontSize: 18.0 ) ) ,
color: Color ( 0xff359846 ) ,
) ,
) ,
)
: 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 ( ) ,
] ,
) ,
) ) ;