import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.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'; import 'package:diplomaticquarterapp/routes.dart'; class SymptomInfo extends StatefulWidget { @override _SymptomInfo createState() => new _SymptomInfo(); } class _SymptomInfo extends State { bool checkValue = false; @override Widget build(BuildContext context) { return AppScaffold( appBarTitle: TranslationBase.of(context).termsService, isShowAppBar: true, body: Padding( padding: EdgeInsets.all(20), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( TranslationBase.of(context).beforeUsing, fontWeight: FontWeight.bold, fontSize: 14, // textAlign: TextAlign.center, ), Container( width: MediaQuery.of(context).size.width, decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), color: Colors.white, ), padding: EdgeInsets.all(30), margin: EdgeInsets.all(10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ AppText(TranslationBase.of(context).remeberthat, fontSize: 16), SizedBox( height: 10, ), AppText( '1. ' + TranslationBase.of(context).checkDiagnosis, fontWeight: FontWeight.bold, fontSize: 16, ), AppText(TranslationBase.of(context).informational, fontSize: 16), SizedBox( height: 10, ), AppText( '2. ' + TranslationBase.of(context).notUseInEmbergency, fontWeight: FontWeight.bold, fontSize: 16, ), AppText( TranslationBase.of(context).notUseInEmbergencyDetails, fontSize: 16), AppText( TranslationBase.of(context).notUseInEmbergencyCall, underline: true, color: Colors.blue, fontSize: 16), SizedBox( height: 10, ), AppText( '3.' + TranslationBase.of(context).dataSafe, fontWeight: FontWeight.bold, fontSize: 16, ), AppText(TranslationBase.of(context).dataSafeInfo, fontSize: 16), ], ), ), Expanded( flex: 1, child: Column( mainAxisAlignment: MainAxisAlignment.end, children: [ Padding( padding: EdgeInsets.all(10), child: CheckboxListTile( title: AppText(TranslationBase.of(context).accept), value: checkValue, onChanged: (newValue) { setState(() { this.checkValue = newValue; }); }, controlAffinity: ListTileControlAffinity .leading, // <-- leading Checkbox ), ), Row( children: [ Expanded( child: DefaultButton( TranslationBase.of(context).next, () => { if (checkValue == true) { Navigator.of(context).pushNamed( SELECT_GENDER, ) } }, color: checkValue == true ? Colors.black : Colors.grey, textColor: Colors.white, )) ], ), ], )) ], ))); } }