import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';

class HeaderInSearch extends StatelessWidget with PreferredSizeWidget {
  final String title;

  const HeaderInSearch({Key key, this.title}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return  Container(
      padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
      decoration: BoxDecoration(
        color: Colors.white,
      ),
      child: Container(
        padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
        margin: EdgeInsets.only(top: 35),
        child: Row(children: [
          IconButton(
            icon: Icon(Icons.arrow_back_ios),
            color: Colors.black, //Colors.black,
            onPressed: () => Navigator.pop(context),
          ),
          Expanded(
            child: AppText(
              title,
              fontSize: SizeConfig.textMultiplier * 2.8,
              fontWeight: FontWeight.bold,
              color: Color(0xFF2B353E),
              fontFamily: 'Poppins',
            ),
          ),
        ]),
      ),
    );
  }

  @override

  Size get preferredSize => Size(double.maxFinite,65);
}
