appBarWithWidget method

PreferredSizeWidget appBarWithWidget(
  1. AppModel app,
  2. BuildContext context, {
  3. required Widget title,
  4. List<Widget>? actions,
  5. IconThemeData? iconTheme,
  6. BackgroundModel? backgroundOverride,
})

Implementation

PreferredSizeWidget appBarWithWidget(AppModel app, BuildContext context,
    {required Widget title,
    List<Widget>? actions,
    IconThemeData? iconTheme,
    BackgroundModel? backgroundOverride}) {
  var accessState = AccessBloc.getState(context);
  BackgroundModel? background;
  if (backgroundOverride != null) {
    background = backgroundOverride;
  } else {
    background = _monaStyle.monaStyleAttributesModel.appBarBG;
  }
  return AppBar(
    title: title,
    actions: actions,
    iconTheme: iconTheme,
    flexibleSpace: Container(
        clipBehavior: (background == null) ? Clip.none : Clip.hardEdge,
        decoration: BoxDecorationHelper.boxDecoration(
            app, accessState.getMember(), background)),
  );
}