import 'package:hmg_patient_app/routes.dart';
import 'package:hmg_patient_app/uitl/translations_delegate_base.dart';
import 'package:hmg_patient_app/widgets/buttons/defaultButton.dart';
import 'package:hmg_patient_app/widgets/others/app_scaffold_widget.dart';
import 'package:hmg_patient_app/widgets/text/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// import 'package:flutter_xlider/flutter_xlider.dart';

class SelectGender extends StatefulWidget {
  @override
  _SelectGender createState() => new _SelectGender();
}

class _SelectGender extends State<SelectGender> {
  double slider = 22;

  @override
  Widget build(BuildContext context) {
    return AppScaffold(
        appBarTitle: TranslationBase.of(context).gender,
        isShowAppBar: true,
        body: Padding(
            padding: EdgeInsets.all(20),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                AppText(
                  //TranslationBase.of(context).beforeUsing,
                  TranslationBase.of(context).selectGender,
                  fontWeight: FontWeight.bold,
                  fontSize: 20,
                  // textAlign: TextAlign.center,
                ),
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                  children: [
                    AppText(TranslationBase.of(context).iAma, fontSize: 16),
                    SizedBox(
                      height: 10,
                    ),
                    Row(
                      children: [
                        Expanded(
                            child: Container(
                                height: 200,
                                width: 150,
                                child: Card(
                                    shape: RoundedRectangleBorder(
                                      borderRadius: BorderRadius.circular(15.0),
                                    ),
                                    shadowColor: Colors.red,
                                    child: Image.asset(
                                        'assets/images/female_face.png')))),
                        Expanded(
                            child: Container(
                                height: 200,
                                width: 150,
                                child: Card(
                                    shadowColor: Colors.red,
                                    shape: RoundedRectangleBorder(
                                      borderRadius: BorderRadius.circular(15.0),
                                    ),
                                    child: Image.asset(
                                        'assets/images/male_face.png'))))
                      ],
                    ),
                    AppText(TranslationBase.of(context).selectAge,
                        fontSize: 25),
                    SizedBox(
                      height: 10,
                    ),
                    AppText(
                        TranslationBase.of(context).iAm +
                            ' ' +
                            slider.toString() +
                            ' ' +
                            TranslationBase.of(context)
                                .yearOld, //TranslationBase.of(context).remeberthat,
                        fontSize: 16),
                    SizedBox(
                      height: 30,
                    ),
                    // FlutterSlider(
                    //   values: [slider],
                    //   max: 90,
                    //   min: 14,
                    //   onDragCompleted: (handlerIndex, lowerValue, upperValue) {
                    //     print(lowerValue);
                    //     print(upperValue);
                    //     setState(() {
                    //       slider = upperValue;
                    //     });
                    //   },
                    // ),
                  ],
                ),
                Expanded(
                    flex: 1,
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.end,
                      children: <Widget>[
                        Row(
                          children: <Widget>[
                            Expanded(
                                child: DefaultButton(
                              TranslationBase.of(context).next,
                              () => {
                                Navigator.of(context).pushNamed(
                                  SYMPTOM_CHECKER,
                                )
                              },
                            ))
                          ],
                        ),
                      ],
                    ))
              ],
            )));
  }
}
