import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';

class BottomSheetDialogButton extends StatelessWidget {
  final Function onTap;
  final String label;

  double headerHeight = SizeConfig.heightMultiplier * 12;

  BottomSheetDialogButton({Key key, this.onTap, this.label}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.all(
          Radius.circular(0.0),
        ),
        border: Border.all(color: HexColor('#EFEFEF'), width: 1),
      ),
      height: headerHeight,
      width: double.infinity,
      child: Column(
        children: [
          Container(
            margin: EdgeInsets.only(
                top: headerHeight * (SizeConfig.isWidthLarge ? 0.3 : 0.2)),
            child: FractionallySizedBox(
              widthFactor: .80,
              child: Center(
                child: AppButton(
                  height: SizeConfig.heightMultiplier *
                      (SizeConfig.isHeightVeryShort ? 8 : 6),
                  title: label,
                  padding: 10,
                  color: Color(0xFF359846),
                  onPressed: onTap,
                ),
              ),
            ),
          ),
          SizedBox(
            height: 5,
          ),
        ],
      ),
    );
  }
}
