TitleBar.back constructor

TitleBar.back(
  1. BuildContext context, {
  2. String? title,
  3. TextStyle textStyle = const TextStyle(fontSize: 18.0, color: Color(0xFF333333)),
  4. dynamic result,
  5. double height = 56.0,
  6. double elevation = 0.0,
  7. Widget? right,
  8. Widget? center,
  9. Color? shadowColor,
  10. Color backgroundColor = Colors.white,
})

Implementation

TitleBar.back(
  BuildContext context, {
  String? title,
  TextStyle textStyle = const TextStyle(
    fontSize: 18.0,
    color: Color(0xFF333333),
  ),
  dynamic result,
  double height = 56.0,
  double elevation = 0.0,
  Widget? right,
  Widget? center,
  Color? shadowColor,
  Color backgroundColor = Colors.white,
})  : result = result,
      height = height,
      elevation = elevation,
      backgroundColor = backgroundColor,
      shadowColor = shadowColor,
      onBack = null,
      left = GestureDetector(
        onTap: () => Navigator.pop(context, result),
        behavior: HitTestBehavior.translucent,
        child: Container(
          padding: EdgeInsets.symmetric(horizontal: 22),
          child: ImageUtil.back(),
        ),
      ),
      right = right,
      center = center ??
          Text(
            title ?? '',
            style: textStyle,
          );