TitleBar.imTitle constructor
TitleBar.imTitle({})
Implementation
TitleBar.imTitle({
String? title,
TextStyle textStyle = const TextStyle(
fontSize: 22.0,
color: Color(0xFF1B72EC),
),
dynamic result,
double height = 56.0,
double elevation = 0.0,
Color? shadowColor,
Color backgroundColor = Colors.white,
Function()? onSearch,
List<PopMenuInfo> menus = const [],
}) : result = result,
height = height,
elevation = elevation,
backgroundColor = backgroundColor,
shadowColor = shadowColor,
onBack = null,
center = null,
right = Container(
padding: EdgeInsets.only(right: 12),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Visibility(
visible: null != onSearch,
child: GestureDetector(
onTap: onSearch,
behavior: HitTestBehavior.translucent,
child: Container(
padding: EdgeInsets.only(left: 10, right: 10),
child: ImageUtil.search(),
),
),
),
Visibility(
visible: menus.length > 0,
child: PopButton(
menus: menus,
child: Container(
padding: EdgeInsets.only(left: 10, right: 10),
child: ImageUtil.add(),
),
),
),
],
),
),
left = Container(
padding: EdgeInsets.symmetric(horizontal: 22),
child: Text(
title ?? '',
style: textStyle,
),
);