import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class ProfileSettings extends StatefulWidget { @override _ProfileSettings createState() => _ProfileSettings(); } class _ProfileSettings extends State with TickerProviderStateMixin { Widget build(BuildContext context) { bool isVibration = true; var language = 1; return BaseView( onModelReady: (model) => model.getPatientRadOrders(), builder: (_, model, wi) => Container( child: ListView(scrollDirection: Axis.vertical, children: [ Container( padding: EdgeInsets.all(15), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ AppText( TranslationBase.of(context).fileNo, color: Colors.black, ), AppText( model.user.patientID.toString(), color: Colors.black, ), ], ), ), SizedBox( height: 1, width: MediaQuery.of(context).size.width, child: Container( color: Colors.grey[300], ), ), Padding( child: AppText(TranslationBase.of(context).languageSetting, fontWeight: FontWeight.bold), padding: EdgeInsets.all(10), ), Container( color: Colors.white, padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ AppText(TranslationBase.of(context).english), new Radio( value: 2, groupValue: language, onChanged: (value) { language = value; }, ) ], )), Container( color: Colors.white, padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ AppText(TranslationBase.of(context).arabic), new Radio( value: 1, groupValue: language, onChanged: (value) { language = value; }, ) ], )), Padding( child: AppText(TranslationBase.of(context).alert), padding: EdgeInsets.all(10), ), Container( color: Colors.white, padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ AppText(TranslationBase.of(context).emailAlert), Switch( value: isVibration, onChanged: (value) { setState(() { isVibration = value; }); }, activeTrackColor: Colors.lightGreenAccent, activeColor: Colors.green, ) ], )), Container( color: Colors.white, padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ AppText(TranslationBase.of(context).smsAlert), Switch( value: isVibration, onChanged: (value) { setState(() { isVibration = value; }); }, activeTrackColor: Colors.lightGreenAccent, activeColor: Colors.green, ) ], )), Padding( child: AppText(TranslationBase.of(context).contactInfo), padding: EdgeInsets.all(10), ), Container( color: Colors.white, padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText(TranslationBase.of(context).email), TextField( style: TextStyle(color: Colors.red), decoration: InputDecoration( suffixIcon: Icon(Icons.edit), )) ], )), Container( color: Colors.white, padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText(TranslationBase.of(context).emergencyName), TextField( style: TextStyle(color: Colors.red), decoration: InputDecoration( suffixIcon: Icon(Icons.edit), )) ], )), Container( color: Colors.white, padding: EdgeInsets.only(top: 0, left: 10, right: 10, bottom: 0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText(TranslationBase.of(context).emergencyContact), TextField( style: TextStyle(color: Colors.red), decoration: InputDecoration( suffixIcon: Icon(Icons.edit), ), ) ], )), Container( padding: EdgeInsets.all(10), child: Row( children: [ Expanded( child: DefaultButton( TranslationBase.of(context).submit, () { // print(mobileNo.text); }, )), ], )) ]))); } }