You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RSGDoctorApp/lib/screens/patients/patient_search/patient_search_header.dart

58 lines
1.7 KiB
Dart

5 years ago
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
class PatientSearchHeader extends StatelessWidget
implements PreferredSizeWidget {
final String? title;
final bool showSearchIcon;
final VoidCallback? onSearchPressed;
final double? fontSize;
5 years ago
const PatientSearchHeader(
{Key? key, this.title, this.showSearchIcon = false, this.onSearchPressed, this.fontSize})
: super(key: key);
5 years ago
@override
Widget build(BuildContext context) {
return Container(
5 years ago
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: 5),
margin: EdgeInsets.only(top: 35),
5 years ago
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Color(0xFF2B353E), //Colors.black,
5 years ago
onPressed: () => Navigator.pop(context),
),
Expanded(
child: AppText(
title!,
fontSize:fontSize ?? 24.0,
fontWeight: FontWeight.w700,
5 years ago
color: Color(0xFF2B353E),
fontFamily: 'Poppins',
letterSpacing: -1.44,
5 years ago
),
),
Visibility(
visible: showSearchIcon,
child: IconButton(
icon: Icon(Icons.search),
color: Color(0xFF2B353E), //Colors.black,
onPressed: () => onSearchPressed?.call(),
),
),
5 years ago
]),
),
);
}
@override
Size get preferredSize => Size(double.maxFinite, 65);
5 years ago
}