
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

class AddMedication extends StatefulWidget {
  @override
  _AddMedicationState createState() => _AddMedicationState();
}

class _AddMedicationState extends State<AddMedication> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Container(
          margin:
          EdgeInsets.only(left: 10, right: 10, top: 15),
          child: TextFields(
              hintText: "Current Medications",
              fontSize: 13.5,
              onTapTextFields: () {
                openMedicationsList(context);
              },
              readOnly: true,
              // hintColor: Colors.black,
              suffixIcon: EvaIcons.plusCircleOutline,
              suffixIconColor: AppGlobal.appPrimaryColor,
              fontWeight: FontWeight.w600,
              // controller: messageController,
              validator: (value) {
                if (value == null)
                  return TranslationBase.of(context)
                      .emptyMessage;
                else
                  return null;
              }),
        ),
        SizedBox(
          height: 20,
        ),
        Container(
          margin:
          EdgeInsets.only(left: 15, right: 15, top: 15),
          child: Column(
            children: [
              Row(
                mainAxisAlignment:
                MainAxisAlignment.spaceBetween,
                children: [
                  Texts('Abdomen Pain',
                      variant: "bodyText",
                      bold: true,
                      color: Colors.black),
                  Icon(
                    FontAwesomeIcons.trash,
                    color: Colors.grey,
                    size: 20,
                  )
                ],
              ),
              SizedBox(
                height: 20,
              ),
              Row(
                mainAxisAlignment:
                MainAxisAlignment.spaceBetween,
                children: [
                  Texts('Back Pain',
                      variant: "bodyText",
                      bold: true,
                      color: Colors.black),
                  Icon(
                    FontAwesomeIcons.trash,
                    color: Colors.grey,
                    size: 20,
                  )
                ],
              ),
            ],
          ),
        )
      ],
    );
  }
  openMedicationsList(BuildContext context) {
    showModalBottomSheet(
        backgroundColor: Colors.white,
        isScrollControlled: true,
        context: context,
        builder: (context) {
          return FractionallySizedBox(
            heightFactor: 0.7,
            child: Container(
                child: Center(
                  child: Texts("dfdfd"),
                )),
          );
        });
  }

}

