@ -1,9 +1,6 @@
import ' package:diplomaticquarterapp/config/shared_pref_kay.dart ' ;
import ' package:diplomaticquarterapp/config/shared_pref_kay.dart ' ;
import ' package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart ' ;
import ' package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/user_detail_model.dart ' ;
import ' package:diplomaticquarterapp/core/service/AlHabibMedicalService/H2O_service.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart ' ;
import ' package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart ' ;
import ' package:diplomaticquarterapp/pages/base/base_view.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_toast.dart ' ;
import ' package:diplomaticquarterapp/uitl/app_toast.dart ' ;
import ' package:diplomaticquarterapp/uitl/date_uitl.dart ' ;
import ' package:diplomaticquarterapp/uitl/date_uitl.dart ' ;
import ' package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart ' ;
import ' package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart ' ;
@ -23,6 +20,7 @@ import 'Dialog/setting_page_radio_button_list_dialog.dart';
class H2oSetting extends StatefulWidget {
class H2oSetting extends StatefulWidget {
final UserDetailModel userDetailModel ;
final UserDetailModel userDetailModel ;
final H2OViewModel viewModel ;
final H2OViewModel viewModel ;
H2oSetting ( { Key key , this . userDetailModel , this . viewModel } ) : super ( key: key ) ;
H2oSetting ( { Key key , this . userDetailModel , this . viewModel } ) : super ( key: key ) ;
@ override
@ override
@ -35,6 +33,9 @@ class _H2oSettingState extends State<H2oSetting> {
TextEditingController _nameController = TextEditingController ( ) ;
TextEditingController _nameController = TextEditingController ( ) ;
TextEditingController _heightController = TextEditingController ( ) ;
TextEditingController _heightController = TextEditingController ( ) ;
TextEditingController _weightController = TextEditingController ( ) ;
TextEditingController _weightController = TextEditingController ( ) ;
List < PopupMenuItem > _weightPopupList = List ( ) ;
List < PopupMenuItem > _heightPopupList = List ( ) ;
bool _isUnitML = true ;
bool _isUnitML = true ;
bool _isGenderMale = false ;
bool _isGenderMale = false ;
bool _isHeightCM = false ;
bool _isHeightCM = false ;
@ -69,6 +70,7 @@ class _H2oSettingState extends State<H2oSetting> {
}
}
SharedPreferences prefs ;
SharedPreferences prefs ;
void readPrefs ( ) async {
void readPrefs ( ) async {
prefs = await SharedPreferences . getInstance ( ) ;
prefs = await SharedPreferences . getInstance ( ) ;
_isUnitML = ( prefs . getString ( H2O_UNIT ) ? ? " ml " ) = = " ml " ? true : false ;
_isUnitML = ( prefs . getString ( H2O_UNIT ) ? ? " ml " ) = = " ml " ? true : false ;
@ -93,6 +95,9 @@ class _H2oSettingState extends State<H2oSetting> {
@ override
@ override
Widget build ( BuildContext context ) {
Widget build ( BuildContext context ) {
_weightPopupList = < PopupMenuItem > [ PopupMenuItem ( child: Text ( TranslationBase . of ( context ) . kg ) , value: true ) , PopupMenuItem ( child: Text ( TranslationBase . of ( context ) . lb ) , value: false ) ] ;
_heightPopupList = < PopupMenuItem > [ PopupMenuItem ( child: Text ( TranslationBase . of ( context ) . cm ) , value: true ) , PopupMenuItem ( child: Text ( TranslationBase . of ( context ) . ft ) , value: false ) ] ;
return AppScaffold (
return AppScaffold (
isShowAppBar: true ,
isShowAppBar: true ,
appBarTitle: TranslationBase . of ( context ) . h2o ,
appBarTitle: TranslationBase . of ( context ) . h2o ,
@ -109,30 +114,31 @@ class _H2oSettingState extends State<H2oSetting> {
child: Column (
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
inputWidget ( TranslationBase . of ( context ) . enterNameHere , TranslationBase . of ( context ) . enterNameHere , _nameController ) ,
Text (
/ / TextField (
TranslationBase . of ( context ) . enterDetailBelow ,
/ / controller: _nameController ,
style: TextStyle (
/ / decoration: InputDecoration (
fontSize: 19 ,
/ / labelText: TranslationBase . of ( context ) . enterNameHere ,
height: 23 / 19 ,
/ / labelStyle: TextStyle ( color: Colors . black87 ) ,
fontWeight: FontWeight . w700 ,
/ / fillColor: Colors . white ,
color: Color ( 0xff2E303A ) ,
/ / filled: true ,
letterSpacing: - 1.14 ,
/ / border: UnderlineInputBorder (
) ,
/ / borderSide: BorderSide (
) ,
/ / width: 0 ,
SizedBox ( height: 12 ) ,
/ / style: BorderStyle . none ,
_containerWidget ( inputWidget ( TranslationBase . of ( context ) . enterNameHere , TranslationBase . of ( context ) . name , _nameController ) ) ,
/ / ) ,
/ / borderRadius: BorderRadius . circular ( 6.0 ) ,
/ / ) ,
/ / ) ,
/ / ) ,
SizedBox ( height: 16 ) ,
SizedBox ( height: 16 ) ,
Text (
Text (
TranslationBase . of ( context ) . preferredunit ,
TranslationBase . of ( context ) . preferredunit ,
style: TextStyle ( fontSize: 12 , fontWeight: FontWeight . w600 , color: Color ( 0xff2B353E ) , letterSpacing: - 0.48 , height: 18 / 12 ) ,
style: TextStyle (
fontSize: 14 ,
height: 21 / 14 ,
fontWeight: FontWeight . w600 ,
color: Color ( 0xff2B353E ) ,
letterSpacing: - 0.44 ,
) ,
) ,
) ,
SizedBox ( height: 12 ) ,
SizedBox ( height: 12 ) ,
_commonButtonsRow ( TranslationBase . of ( context ) . ml , TranslationBase . of ( context ) . l , _isUnitML , ( value ) {
_common Radio ButtonsRow( TranslationBase . of ( context ) . m ili litre , TranslationBase . of ( context ) . l itre , _isUnitML , ( value ) {
if ( _isUnitML ! = value ) {
if ( _isUnitML ! = value ) {
setState ( ( ) {
setState ( ( ) {
_isUnitML = value ;
_isUnitML = value ;
@ -142,68 +148,69 @@ class _H2oSettingState extends State<H2oSetting> {
SizedBox ( height: 12 ) ,
SizedBox ( height: 12 ) ,
Text (
Text (
TranslationBase . of ( context ) . pleaseSelectGender ,
TranslationBase . of ( context ) . pleaseSelectGender ,
style: TextStyle ( fontSize: 12 , fontWeight: FontWeight . w600 , color: Color ( 0xff2B353E ) , letterSpacing: - 0.48 , height: 18 / 12 ) ,
style: TextStyle (
fontSize: 14 ,
height: 21 / 14 ,
fontWeight: FontWeight . w600 ,
color: Color ( 0xff2B353E ) ,
letterSpacing: - 0.44 ,
) ,
) ,
) ,
SizedBox ( height: 12 ) ,
SizedBox ( height: 12 ) ,
_commonButtonsRow ( TranslationBase . of ( context ) . male , TranslationBase . of ( context ) . female , _isGenderMale , ( value ) {
_common Radio ButtonsRow( TranslationBase . of ( context ) . male , TranslationBase . of ( context ) . female , _isGenderMale , ( value ) {
if ( _isGenderMale ! = value ) {
if ( _isGenderMale ! = value ) {
setState ( ( ) {
setState ( ( ) {
_isGenderMale = value ;
_isGenderMale = value ;
} ) ;
} ) ;
}
}
} ) ,
} ) ,
SizedBox ( height: 12 ) ,
SizedBox ( height: 18 ) ,
Text ( TranslationBase . of ( context ) . height ) ,
_commonInputAndUnitRow (
_commonSlidersRow ( _heightController , 1 , 270 , _heightValue , ( text ) {
TranslationBase . of ( context ) . height ,
_heightController ,
1 ,
270 ,
_heightValue ,
( text ) {
_heightController . text = text ;
_heightController . text = text ;
} , ( value ) {
} ,
setState ( ( ) {
( value ) {
_heightValue = value ;
_heightValue = value ;
} ) ;
} ,
} ) ,
_isHeightCM ? TranslationBase . of ( context ) . cm : TranslationBase . of ( context ) . ft ,
SizedBox ( height: 8 ) ,
( value ) {
Text ( TranslationBase . of ( context ) . heightUnit ) ,
SizedBox ( height: 8 ) ,
_commonButtonsRow ( TranslationBase . of ( context ) . cm , TranslationBase . of ( context ) . ft , _isHeightCM , ( value ) {
if ( _isHeightCM ! = value ) {
if ( _isHeightCM ! = value ) {
setState ( ( ) {
setState ( ( ) {
_isHeightCM = value ;
_isHeightCM = value ;
} ) ;
} ) ;
}
}
} ) ,
} ,
SizedBox ( height: 8 ) ,
_heightPopupList ) ,
_commonSlidersRow ( _weightController , 1 , 250 , _weightValue , ( text ) {
SizedBox ( height: 12 ) ,
_weightController . text = text ;
_commonInputAndUnitRow (
} , ( value ) {
TranslationBase . of ( context ) . weight ,
setState ( ( ) {
_weightController ,
1 ,
250 ,
_weightValue ,
( text ) {
_heightController . text = text ;
} ,
( value ) {
_weightValue = value ;
_weightValue = value ;
} ) ;
} ,
} ) ,
_isWeightKG ? TranslationBase . of ( context ) . kg : TranslationBase . of ( context ) . lb ,
SizedBox ( height: 8 ) ,
( value ) {
Text ( TranslationBase . of ( context ) . weightUnit ) ,
SizedBox ( height: 8 ) ,
_commonButtonsRow ( TranslationBase . of ( context ) . kg , TranslationBase . of ( context ) . lb , _isWeightKG , ( value ) {
if ( _isWeightKG ! = value ) {
if ( _isWeightKG ! = value ) {
setState ( ( ) {
setState ( ( ) {
_isWeightKG = value ;
_isWeightKG = value ;
} ) ;
} ) ;
}
}
} ) ,
} ,
Padding (
_weightPopupList ) ,
padding: EdgeInsets . only ( top: 8.0 , bottom: 8.0 ) ,
SizedBox ( height: 12 ) ,
child: Divider ( height: 1.5 , color: Colors . black54 ) ,
_containerWidget (
) ,
_commonDropDownView ( TranslationBase . of ( context ) . dateOfBirth , DateUtil . getFormattedDate ( _dobDate , " dd MMMM, yyyy " ) , ( ) {
Container (
padding: EdgeInsets . all ( 8 ) ,
width: MediaQuery . of ( context ) . size . width ,
decoration: BoxDecoration ( borderRadius: BorderRadius . circular ( 8 ) , color: Colors . white ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Text ( " ${ TranslationBase . of ( context ) . birth_date } : " ) ,
SizedBox ( height: 8 ) ,
InkWell (
onTap: ( ) {
showModalBottomSheet (
showModalBottomSheet (
context: context ,
context: context ,
builder: ( context ) {
builder: ( context ) {
@ -254,17 +261,11 @@ class _H2oSettingState extends State<H2oSetting> {
] ) ,
] ) ,
) ;
) ;
} ) ;
} ) ;
} , / / implement cupertino dialog to select date
} , iconData: Icons . calendar_today ) ,
child: Row (
crossAxisAlignment: CrossAxisAlignment . center ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [ Text ( DateUtil . getFormattedDate ( _dobDate , " yyyy-MM-dd " ) ) , Icon ( Icons . arrow_drop_down_outlined ) ] ) ,
)
] ,
) ,
) ,
) ,
SizedBox ( height: 8 ) ,
SizedBox ( height: 12 ) ,
_commonDialogSelectorRow ( TranslationBase . of ( context ) . activityLevel , _activityLevelListEng [ _selectedActiveLevel - 1 ] , ( ) {
_containerWidget (
_commonDropDownView ( TranslationBase . of ( context ) . activityLevel , _activityLevelListEng [ _selectedActiveLevel - 1 ] , ( ) {
showDialog (
showDialog (
context: context ,
context: context ,
child: CommonRadioButtonDialog (
child: CommonRadioButtonDialog (
@ -280,8 +281,21 @@ class _H2oSettingState extends State<H2oSetting> {
) ,
) ,
) ;
) ;
} ) ,
} ) ,
SizedBox ( height: 8 ) ,
) ,
_commonDialogSelectorRow ( TranslationBase . of ( context ) . reminderLabel , _remindedTimeListEng [ _selectedRemindedTime ] , ( ) {
SizedBox ( height: 18 ) ,
Text (
TranslationBase . of ( context ) . reminderLabel ,
style: TextStyle (
fontSize: 14 ,
height: 21 / 14 ,
fontWeight: FontWeight . w600 ,
color: Color ( 0xff2B353E ) ,
letterSpacing: - 0.44 ,
) ,
) ,
SizedBox ( height: 12 ) ,
_containerWidget (
_commonDropDownView ( TranslationBase . of ( context ) . reminderTimesLabel , _remindedTimeListEng [ _selectedRemindedTime ] , ( ) {
showDialog (
showDialog (
context: context ,
context: context ,
child: CommonRadioButtonDialog (
child: CommonRadioButtonDialog (
@ -296,21 +310,6 @@ class _H2oSettingState extends State<H2oSetting> {
) ,
) ,
) ;
) ;
} ) ,
} ) ,
SizedBox ( height: 16 ) ,
SizedBox (
height: 50 ,
width: MediaQuery . of ( context ) . size . width ,
child: FlatButton (
color: Theme . of ( context ) . appBarTheme . color ,
shape: RoundedRectangleBorder (
borderRadius: BorderRadius . circular ( 8.0 ) ,
) ,
onPressed: _updateUserDetails ,
child: Text (
TranslationBase . of ( context ) . save ,
style: TextStyle ( color: Colors . white , fontSize: 18 , fontWeight: FontWeight . w600 ) ,
) ,
) ,
) ,
) ,
] ,
] ,
) ,
) ,
@ -330,7 +329,7 @@ class _H2oSettingState extends State<H2oSetting> {
) ;
) ;
}
}
Widget inputWidget( String _labelText , String _hintText , TextEditingController _controller , { String prefix , bool isEnable = true , bool hasSelection = false } ) {
Widget _containerWidget( Widget child ) {
return Container (
return Container (
padding: EdgeInsets . only ( left: 16 , right: 16 , bottom: 15 , top: 15 ) ,
padding: EdgeInsets . only ( left: 16 , right: 16 , bottom: 15 , top: 15 ) ,
alignment: Alignment . center ,
alignment: Alignment . center ,
@ -342,7 +341,48 @@ class _H2oSettingState extends State<H2oSetting> {
width: 1 ,
width: 1 ,
) ,
) ,
) ,
) ,
child: InkWell (
child: child ,
) ;
}
Widget _commonDropDownView ( String title , String value , VoidCallback callback , { IconData iconData } ) {
return InkWell (
onTap: callback ,
child: Row (
children: [
Expanded (
child: Column ( crossAxisAlignment: CrossAxisAlignment . start , children: [
Text (
title ,
style: TextStyle (
fontSize: 12 ,
fontWeight: FontWeight . w600 ,
color: Color ( 0xff2E303A ) ,
letterSpacing: - 0.44 ,
) ,
) ,
Text (
value ,
style: TextStyle (
fontSize: 14 ,
fontWeight: FontWeight . w400 ,
color: Color ( 0xff575757 ) ,
letterSpacing: - 0.56 ,
) ,
) ,
] ) ,
) ,
Icon (
iconData ? ? Icons . keyboard_arrow_down_sharp ,
color: Color ( 0xff2E303A ) ,
)
] ,
) ,
) ;
}
Widget inputWidget ( String _labelText , String _hintText , TextEditingController _controller , { String prefix , bool isEnable = true , bool hasSelection = false } ) {
return InkWell (
onTap: hasSelection ? ( ) { } : null ,
onTap: hasSelection ? ( ) { } : null ,
child: Row (
child: Row (
children: [
children: [
@ -354,9 +394,9 @@ class _H2oSettingState extends State<H2oSetting> {
Text (
Text (
_labelText ,
_labelText ,
style: TextStyle (
style: TextStyle (
fontSize: 11 ,
fontSize: 12 ,
fontWeight: FontWeight . w600 ,
fontWeight: FontWeight . w600 ,
color: Color ( 0xff2B353E ) ,
color: Color ( 0xff2E303A ) ,
letterSpacing: - 0.44 ,
letterSpacing: - 0.44 ,
) ,
) ,
) ,
) ,
@ -372,8 +412,8 @@ class _H2oSettingState extends State<H2oSetting> {
fontSize: 14 ,
fontSize: 14 ,
height: 21 / 14 ,
height: 21 / 14 ,
fontWeight: FontWeight . w400 ,
fontWeight: FontWeight . w400 ,
color: Color ( 0xff2B353E ) ,
color: Color ( 0xff575757 ) ,
letterSpacing: - 0.44 ,
letterSpacing: - 0.56 ,
) ,
) ,
decoration: InputDecoration (
decoration: InputDecoration (
isDense: true ,
isDense: true ,
@ -410,18 +450,47 @@ class _H2oSettingState extends State<H2oSetting> {
if ( hasSelection ) Icon ( Icons . keyboard_arrow_down_outlined ) ,
if ( hasSelection ) Icon ( Icons . keyboard_arrow_down_outlined ) ,
] ,
] ,
) ,
) ,
) ,
) ;
) ;
}
}
Widget _commonButtonsRow ( String rightText , String leftText , bool checkParam , Function ( bool ) callBack ) {
Widget _commonRadioButtonsRow ( String rightText , String leftText , bool checkParam , Function ( bool ) callBack ) {
return Row (
return Row (
children: [
children: [
Row ( children: [
Row (
Checkbox ( value: null , onChanged: null )
mainAxisSize: MainAxisSize . min ,
] , )
children: [
SizedBox ( width: 22 , height: 22 , child: Radio ( value: true , groupValue: checkParam , onChanged: callBack ) ) ,
SizedBox ( width: 8 ) ,
Text (
rightText ,
style: TextStyle (
fontSize: 14 ,
height: 21 / 14 ,
fontWeight: FontWeight . w600 ,
color: Color ( 0xff575757 ) ,
letterSpacing: - 0.44 ,
) ,
) ,
] ,
) ,
SizedBox ( width: 12 ) ,
Row (
mainAxisSize: MainAxisSize . min ,
children: [
SizedBox ( width: 22 , height: 22 , child: Radio ( value: false , groupValue: checkParam , onChanged: callBack ) ) ,
SizedBox ( width: 8 ) ,
Text (
leftText ,
style: TextStyle (
fontSize: 14 ,
height: 21 / 14 ,
fontWeight: FontWeight . w600 ,
color: Color ( 0xff575757 ) ,
letterSpacing: - 0.44 ,
) ,
) ,
] ,
) ,
] ,
] ,
) ;
) ;
@ -456,19 +525,28 @@ class _H2oSettingState extends State<H2oSetting> {
] ) ;
] ) ;
}
}
Widget _commonSlidersRow ( _controller , double _minValue , double _maxValue , double _valueOrg , Function ( String ) onTextValueChange , Function ( double ) onValueChange ) {
Widget _commonInputAndUnitRow ( _title , _controller , double _minValue , double _maxValue , double _valueOrg , Function ( String ) onTextValueChange , Function ( double ) onValueChange , String unitTitle ,
return Container (
Function ( bool ) onUnitTap , _list ) {
margin: EdgeInsets . only ( top: 6 ) ,
return _containerWidget (
padding: EdgeInsets . all ( 6 ) ,
Row (
color: Colors . white ,
children: [
height: 50 ,
Expanded (
child: Row (
flex: 3 ,
child: Column (
mainAxisSize: MainAxisSize . min ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
children: [
SizedBox (
Text (
width: 75 ,
_title ,
child: TextField (
style: TextStyle (
fontSize: 12 ,
fontWeight: FontWeight . w600 ,
color: Color ( 0xff2E303A ) ,
letterSpacing: - 0.44 ,
) ,
) ,
TextField (
controller: _controller ,
controller: _controller ,
textAlign: TextAlign . center ,
keyboardType: TextInputType . number ,
keyboardType: TextInputType . number ,
onChanged: ( value ) {
onChanged: ( value ) {
double _value = double . parse ( value ) ;
double _value = double . parse ( value ) ;
@ -488,69 +566,44 @@ class _H2oSettingState extends State<H2oSetting> {
inputFormatters: [
inputFormatters: [
FilteringTextInputFormatter . allow ( RegExp ( r'[0-9]' ) ) ,
FilteringTextInputFormatter . allow ( RegExp ( r'[0-9]' ) ) ,
] ,
] ,
decoration: InputDecoration (
style: TextStyle (
contentPadding: EdgeInsets . only ( left: 4 , right: 4 ) ,
color: Color ( 0xff575757 ) ,
fillColor: Colors . white ,
letterSpacing: - 0.56 ,
filled: true ,
focusedBorder: OutlineInputBorder (
borderSide: BorderSide (
width: 1 ,
color: Colors . grey ,
style: BorderStyle . solid ,
) ,
borderRadius: BorderRadius . circular ( 6.0 ) ,
) ,
) ,
enabledBorder: OutlineInputBorder (
decoration: InputDecoration (
borderSide: BorderSide (
isDense: true ,
width: 1 ,
hintText: " 0 " ,
color: Colors . grey ,
hintStyle: TextStyle (
style: BorderStyle . solid ,
fontSize: 14 ,
height: 21 / 14 ,
fontWeight: FontWeight . w400 ,
color: Color ( 0xff575757 ) ,
letterSpacing: - 0.56 ,
) ,
) ,
borderRadius: BorderRadius . circular ( 6.0 ) ,
contentPadding: EdgeInsets . zero ,
border: InputBorder . none ,
focusedBorder: InputBorder . none ,
enabledBorder: InputBorder . none ,
) ,
) ,
) ,
) ,
] ,
) ,
) ,
) ,
) ,
Container ( height: 34 , width: 1 , color: Color ( 0xffE0E0E0 ) , margin: EdgeInsets . only ( left: 12 , right: 12 ) ) ,
Expanded (
Expanded (
flex: 6 ,
flex: 1 ,
child: Slider (
child: PopupMenuButton (
min: _minValue ,
child: _commonDropDownView ( TranslationBase . of ( context ) . unit , unitTitle , null ) ,
max: _maxValue ,
onSelected: ( value ) {
activeColor: Colors . redAccent ,
onUnitTap ( value ) ;
inactiveColor: Colors . redAccent . withOpacity ( . 3 ) ,
value: _valueOrg ,
onChanged: ( value ) {
onTextValueChange ( value . toStringAsFixed ( 0 ) ) ;
onValueChange ( value ) ;
} ,
} ,
) ,
itemBuilder: ( context ) = > _list ) ,
)
)
] ,
] ,
) ,
) ,
) ;
) ;
}
}
Widget _commonDialogSelectorRow ( String title , String selectedText , VoidCallback onPressed ) {
return Column ( crossAxisAlignment: CrossAxisAlignment . start , mainAxisSize: MainAxisSize . min , children: [
Text ( title ) ,
SizedBox ( height: 8 ) ,
InkWell (
onTap: onPressed ,
child: Container (
height: 50 ,
padding: EdgeInsets . all ( 8 ) ,
width: MediaQuery . of ( context ) . size . width ,
decoration: BoxDecoration ( borderRadius: BorderRadius . circular ( 8 ) , color: Colors . white ) ,
child: Row (
crossAxisAlignment: CrossAxisAlignment . center ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [ Text ( selectedText ) , Icon ( Icons . arrow_drop_down_outlined ) ] ,
) ,
) ,
)
] ) ;
}
void _updateUserDetails ( ) async {
void _updateUserDetails ( ) async {
_userDetailModel . height = _heightValue ;
_userDetailModel . height = _heightValue ;
_userDetailModel . weight = _weightValue ;
_userDetailModel . weight = _weightValue ;
@ -584,6 +637,7 @@ class _H2oSettingState extends State<H2oSetting> {
}
}
final CalendarPlugin _myPlugin = CalendarPlugin ( ) ;
final CalendarPlugin _myPlugin = CalendarPlugin ( ) ;
void _addReminderToCalender ( int _selectedRemindedTime ) async {
void _addReminderToCalender ( int _selectedRemindedTime ) async {
bool _calendarPermission = await _myPlugin . hasPermissions ( ) ;
bool _calendarPermission = await _myPlugin . hasPermissions ( ) ;
if ( _calendarPermission ) {
if ( _calendarPermission ) {