AppBar.expanded constructor

AppBar.expanded({
  1. String? title,
  2. Color? textColor,
  3. List<Widget>? actions,
  4. bool automaticallyImplyLeading = true,
  5. Widget? leading,
  6. Color? backgroundColor,
  7. SystemUiOverlayStyle? systemOverlayStyle,
})

Implementation

factory AppBar.expanded({
  String? title,
  Color? textColor,
  List<Widget>? actions,
  bool automaticallyImplyLeading = true,
  Widget? leading,
  Color? backgroundColor,
  SystemUiOverlayStyle? systemOverlayStyle,
}) {
  return AppBar(
    height: 96,
    title: null,
    textColor: textColor,
    actions: actions,
    automaticallyImplyLeading: automaticallyImplyLeading,
    leading: leading,
    backgroundColor: backgroundColor,
    systemOverlayStyle: systemOverlayStyle,
    flexibleSpace: material.SafeArea(
      child: material.Builder(builder: (context) {
        final GBThemeData gbThemeData = GBTheme.of(context);
        final Color titleColor = gbThemeData.textBlack;
        return Container(
          alignment: material.Alignment.bottomLeft,
          padding: material.EdgeInsets.only(
            left: 16,
          ),
          child: GBText.h4(
            "Title",
            color: titleColor,
          ),
        );
      }),
    ),
  );
}