@ -9,7 +9,6 @@ import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchI
import ' package:diplomaticquarterapp/theme/colors.dart ' ;
import ' package:diplomaticquarterapp/theme/colors.dart ' ;
import ' package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart ' ;
import ' package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.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/buttons/defaultButton.dart ' ;
import ' package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart ' ;
import ' package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart ' ;
import ' package:diplomaticquarterapp/widgets/transitions/fade_page.dart ' ;
import ' package:diplomaticquarterapp/widgets/transitions/fade_page.dart ' ;
@ -52,7 +51,19 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
] ,
] ,
body: Container (
body: Container (
child: Platform . isIOS ? _getAppleWatchInstructions ( ) : _getGoogleWatchInstructions ( ) ,
child: Platform . isIOS ? _getAppleWatchInstructions ( ) : _getGoogleWatchInstructions ( ) ,
) ) ;
) ,
bottomSheet: Container (
color: Theme . of ( context ) . scaffoldBackgroundColor ,
padding: EdgeInsets . fromLTRB ( 15.0 , 0.0 , 15.0 , 30.0 ) ,
child: DefaultButton (
TranslationBase . of ( context ) . continues ,
( ) {
_openHealthDataList ( ) ;
} ,
color: Color ( 0xff359846 ) ,
) ,
) ,
) ;
}
}
_getAppleWatchInstructions ( ) {
_getAppleWatchInstructions ( ) {
@ -61,29 +72,15 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
mainAxisSize: MainAxisSize . min ,
mainAxisSize: MainAxisSize . min ,
children: [
children: [
Flexible (
Container (
child: CarouselSlider (
width: double . infinity ,
carouselController: buttonCarouselController ,
margin: EdgeInsets . only ( left: 16 , top: 16 , right: 16 , bottom: 8 ) ,
options: CarouselOptions ( enableInfiniteScroll: false , viewportFraction: 0.95 , height: MediaQuery . of ( context ) . size . height * 0.9 ) ,
child: Column (
items: [ 1 , 2 ] . map ( ( i ) {
return Builder (
builder: ( BuildContext context ) {
return Container (
width: MediaQuery . of ( context ) . size . width ,
margin: EdgeInsets . symmetric ( horizontal: 5.0 ) ,
child: Card (
margin: EdgeInsets . fromLTRB ( 8.0 , 16.0 , 8.0 , 8.0 ) ,
color: Colors . white . withOpacity ( 1.0 ) ,
shape: RoundedRectangleBorder (
borderRadius: BorderRadius . circular ( 10 ) ,
) ,
child: i = = 1
? Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
Container (
Container (
margin: EdgeInsets . only ( top: 10.0 , left: 15.0 , right: 15 .0) ,
margin: EdgeInsets . only ( top: 10.0 , bottom: 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . supportedWatches , style: TextStyle ( fontSize: 22.0 , fontWeight: FontWeight . bold ) ) ,
child: Text ( TranslationBase . of ( context ) . supportedWatches , style: TextStyle ( fontSize: 22.0 , fontWeight: FontWeight . w600 ) ) ,
) ,
) ,
Container (
Container (
child: Row (
child: Row (
@ -94,9 +91,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
child: Row (
child: Row (
children: [
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 (
Padding (
padding: const EdgeInsets . only ( left: 8.0 , right: 8.0 ) ,
child: Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 1 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
child: Text ( " Apple Watch Series 1 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
) ,
)
)
] ,
] ,
) ,
) ,
@ -108,9 +108,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
child: Row (
child: Row (
children: [
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 (
Padding (
padding: const EdgeInsets . only ( left: 8.0 , right: 8.0 ) ,
child: Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 2 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
child: Text ( " Apple Watch Series 2 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
) ,
)
)
] ,
] ,
) ,
) ,
@ -129,9 +132,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
child: Row (
child: Row (
children: [
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 (
Padding (
padding: const EdgeInsets . only ( left: 8.0 , right: 8.0 ) ,
child: Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 3 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
child: Text ( " Apple Watch Series 3 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
) ,
)
)
] ,
] ,
) ,
) ,
@ -143,9 +149,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
child: Row (
child: Row (
children: [
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 (
Padding (
padding: const EdgeInsets . only ( left: 8.0 , right: 8.0 ) ,
child: Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 4 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
child: Text ( " Apple Watch Series 4 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
) ,
)
)
] ,
] ,
) ,
) ,
@ -164,9 +173,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
child: Row (
child: Row (
children: [
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 (
Padding (
padding: const EdgeInsets . only ( left: 8.0 , right: 8.0 ) ,
child: Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 5 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
child: Text ( " Apple Watch Series 5 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
) ,
)
)
] ,
] ,
) ,
) ,
@ -178,9 +190,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
child: Row (
child: Row (
children: [
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 (
Padding (
padding: const EdgeInsets . only ( left: 8.0 , right: 8.0 ) ,
child: Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Apple Watch Series 6 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
child: Text ( " Apple Watch Series 6 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
) ,
)
)
] ,
] ,
) ,
) ,
@ -199,9 +214,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
child: Row (
child: Row (
children: [
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 (
Padding (
padding: const EdgeInsets . only ( left: 8.0 , right: 8.0 ) ,
child: Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 3 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
child: Text ( " Mi Band 3 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
) ,
)
)
] ,
] ,
) ,
) ,
@ -213,9 +231,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
child: Row (
child: Row (
children: [
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 (
Padding (
padding: const EdgeInsets . only ( left: 8.0 , right: 8.0 ) ,
child: Container (
width: MediaQuery . of ( context ) . size . width * 0.22 ,
width: MediaQuery . of ( context ) . size . width * 0.22 ,
child: Text ( " Mi Band 4 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
child: Text ( " Mi Band 4 " , overflow: TextOverflow . clip , style: TextStyle ( fontSize: 12.0 ) ) ,
) ,
)
)
] ,
] ,
) ,
) ,
@ -232,66 +253,14 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
margin: EdgeInsets . all ( 10.0 ) ,
margin: EdgeInsets . all ( 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
) ,
Container (
InkWell (
margin: EdgeInsets . fromLTRB ( 15.0 , 40.0 , 15.0 , 0.0 ) ,
onTap: ( ) {
child: DefaultButton (
showInstructionsDialog ( ) ;
TranslationBase . of ( context ) . continues ,
( ) {
buttonCarouselController . nextPage ( ) ;
} ,
color: Color ( 0xff359846 ) ,
) ,
) ,
] ,
)
: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Container (
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 . 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 ( 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 ( TranslationBase . of ( context ) . iosInstructions1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
Container (
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 . fromLTRB ( 10.0 , 20.0 , 10.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . iosInstructions3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
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 ) ,
child: Padding (
padding: const EdgeInsets . only ( left: 10.0 , right: 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . watchInstructions ,
style: TextStyle ( color: CustomColors . accentColor , fontWeight: FontWeight . w600 , letterSpacing: - 0.64 , decoration: TextDecoration . underline ) ) ,
) ,
) ,
) ,
) ,
] ,
] ,
@ -299,50 +268,19 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
) ,
) ,
] ,
] ,
) ,
) ,
) ) ;
} ,
) ;
} ) . toList ( ) ,
) ,
)
] ,
) ,
) ;
) ;
}
}
_getGoogleWatchInstructions ( ) {
_getGoogleWatchInstructions ( ) {
return SingleChildScrollView (
return SingleChildScrollView (
child: Container (
width: double . infinity ,
margin: EdgeInsets . only ( left: 16 , top: 16 , right: 16 , bottom: 8 ) ,
child: Column (
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
Container (
Container (
margin: EdgeInsets . only ( top: 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . supportedWatches , style: TextStyle ( fontSize: 22.0 , fontWeight: FontWeight . w600 ) ) ,
child: CarouselSlider (
carouselController: buttonCarouselController ,
options: CarouselOptions (
/ / enableInfiniteScroll: true ,
viewportFraction: 0.99 ,
height: MediaQuery . of ( context ) . size . height * 0.9 ) ,
items: [ 1 , 2 ] . map ( ( i ) {
return Builder (
builder: ( BuildContext context ) {
return Container (
width: MediaQuery . of ( context ) . size . width ,
margin: EdgeInsets . symmetric ( horizontal: 5.0 ) ,
child: Card (
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 (
borderRadius: BorderRadius . circular ( 10 ) ,
) ,
child: i = = 1
? Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Container (
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 (
Container (
child: Row (
child: Row (
@ -488,143 +426,130 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
launch ( " https://wearos.google.com/#find-your-watch " ) ;
launch ( " https://wearos.google.com/#find-your-watch " ) ;
} ,
} ,
child: Container (
child: Container (
margin: EdgeInsets . only ( top: 20.0 , left: 15.0 , right: 15.0 ) ,
margin: EdgeInsets . only ( top: 20.0 ) ,
child: Text ( TranslationBase . of ( context ) . moreSupportedWatches ,
child: Text ( TranslationBase . of ( context ) . moreSupportedWatches , style: TextStyle ( fontSize: 14.0 , color: Colors . blue , decoration: TextDecoration . underline , letterSpacing: - 0.36 ) ) ,
textAlign: TextAlign . center , style: TextStyle ( fontSize: 14.0 , color: Colors . blue , decoration: TextDecoration . underline , letterSpacing: - 0.36 ) ) ,
) ,
) ,
) ,
) ,
Container (
Container (
margin: EdgeInsets . all( 10.0 ) ,
margin: EdgeInsets . only( top: 10.0 , bottom: 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
) ,
Container (
Container (
margin: EdgeInsets . all( 10.0 ) ,
margin: EdgeInsets . only( top: 10.0 , bottom: 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
) ,
Container (
InkWell (
margin: EdgeInsets . all ( 15.0 ) ,
onTap: ( ) {
child: DefaultButton (
showInstructionsDialog ( ) ;
TranslationBase . of ( context ) . continues ,
( ) {
buttonCarouselController . nextPage ( ) ;
} ,
} ,
color: CustomColors . green ,
child: Padding (
padding: const EdgeInsets . only ( top: 10.0 , bottom: 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . watchInstructions ,
style: TextStyle ( color: CustomColors . accentColor , fontWeight: FontWeight . w600 , letterSpacing: - 0.64 , decoration: TextDecoration . underline ) ) ,
) ,
) ,
) ,
) ,
] ,
] ,
)
) ,
: Column (
) ,
) ;
}
showInstructionsDialog ( ) {
showGeneralDialog (
barrierColor: Colors . black . withOpacity ( 0.5 ) ,
transitionBuilder: ( context , a1 , a2 , widget ) {
final curvedValue = Curves . easeInOutBack . transform ( a1 . value ) - 1.0 ;
return Transform (
transform: Matrix4 . translationValues ( 0.0 , curvedValue * 200 , 0.0 ) ,
child: Opacity (
opacity: a1 . value ,
child: Dialog (
child: Column (
mainAxisSize: MainAxisSize . min ,
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
Container (
Container (
margin: EdgeInsets . only ( top: 10.0 , left: 15.0 , right: 15.0 ) ,
width: 350.0 ,
child: Text ( TranslationBase . of ( context ) . watchInstructions , style: TextStyle ( fontSize: 22.0 , fontWeight: FontWeight . bold ) ) ,
color: Colors . white ,
) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Container (
Container (
margin: EdgeInsets . all ( 10.0 ) ,
width: MediaQuery . of ( context ) . size . width ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
padding: EdgeInsets . all ( 20.0 ) ,
child: Row (
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
Text ( TranslationBase . of ( context ) . smartWatches , style: TextStyle ( fontSize: 22.0 , color: Colors . black , fontWeight: FontWeight . w600 , letterSpacing: - 0.64 ) ) ,
IconButton (
icon: Icon (
Icons . close ,
color: Colors . black ,
) ,
onPressed: ( ) {
Navigator . pop ( context ) ;
} ,
) ,
] ,
) ,
) ,
Container (
margin: EdgeInsets . all ( 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
) ,
) ,
Container (
Container (
margin: EdgeInsets . all ( 10.0 ) ,
margin: EdgeInsets . fromLTRB ( 20.0 , 0.0 , 20.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
child: Text ( TranslationBase . of ( context ) . syncInstructionsIntro3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.3 6 ) ) ,
) ,
) ,
Platform . isIOS
? Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Container (
Container (
margin: EdgeInsets . all ( 10.0 ) ,
margin: EdgeInsets . fromLTRB( 20.0 , 20.0 , 20.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.34 ) ) ,
child: Text ( TranslationBase . of ( context ) . iosInstructions1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.3 6 ) ) ,
) ,
) ,
Container (
Container (
margin: EdgeInsets . all( 10.0 ) ,
margin: EdgeInsets . fromLTRB( 20.0 , 20.0 , 20.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.3 4 ) ) ,
child: Text ( TranslationBase . of ( context ) . iosInstructions2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.3 6 ) ) ,
) ,
) ,
Container (
Container (
margin: EdgeInsets . all( 10 .0) ,
margin: EdgeInsets . fromLTRB( 20.0 , 20.0 , 20.0 , 21 .0) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions4 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.3 4 ) ) ,
child: Text ( TranslationBase . of ( context ) . iosInstructions3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.3 6 ) ) ,
) ,
) ,
Padding (
] ,
padding: const EdgeInsets . fromLTRB ( 12.0 , 50.0 , 12.0 , 20.0 ) ,
)
child: Row (
: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
Expanded (
Container (
child: DefaultButton (
margin: EdgeInsets . fromLTRB ( 20.0 , 20.0 , 20.0 , 10.0 ) ,
TranslationBase . of ( context ) . syncHealthData ,
child: Text ( TranslationBase . of ( context ) . androidInstructions1 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
( ) { } ,
color: Color ( 0xFFD02127 ) ,
disabledColor: Color ( 0xff28323A ) . withOpacity ( 0.3 ) ,
) ,
) ,
Container (
margin: EdgeInsets . fromLTRB ( 20.0 , 20.0 , 20.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions2 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
) ,
mWidth ( 12 ) ,
Container (
if ( hasAlreadySynced )
margin: EdgeInsets . fromLTRB ( 20.0 , 20.0 , 20.0 , 10.0 ) ,
Expanded (
child: Text ( TranslationBase . of ( context ) . androidInstructions3 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
child: DefaultButton (
TranslationBase . of ( context ) . alreadySynced ,
( ) {
_openHealthDataList ( ) ;
} ,
color: Color ( 0xff359846 ) ,
) ,
) ,
Container (
margin: EdgeInsets . fromLTRB ( 20.0 , 20.0 , 20.0 , 10.0 ) ,
child: Text ( TranslationBase . of ( context ) . androidInstructions4 , style: TextStyle ( fontSize: 14.0 , letterSpacing: - 0.36 ) ) ,
) ,
) ,
] ,
] ,
) ,
) ,
] ,
) ,
) ,
/ / 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 ( ) ,
] ,
) ,
) ) ;
} ,
) ;
} ) . toList ( ) ,
) ,
) ,
)
] ,
] ,
) ,
) ,
) ,
) ,
) ;
) ;
} ,
transitionDuration: Duration ( milliseconds: 500 ) ,
barrierDismissible: true ,
barrierLabel: ' ' ,
context: context ,
pageBuilder: ( context , animation1 , animation2 ) { } ) ;
}
}
getLastPatientRecord ( BuildContext context ) {
getLastPatientRecord ( BuildContext context ) {