header static method

void header({
  1. List<Widget>? actions,
  2. bool automaticallyImplyLeading = true,
  3. bool forceMaterialTransparency = false,
  4. Widget? leading,
  5. AppBarTheme? style,
  6. Widget? title,
})

Sets / removes the header area of the CodeMeltedUI.app.

Implementation

static void header({
  List<Widget>? actions,
  bool automaticallyImplyLeading = true,
  bool forceMaterialTransparency = false,
  Widget? leading,
  AppBarTheme? style,
  Widget? title,
}) {
  if (actions == null && leading == null && title == null) {
    uiState.set<AppBar?>("appBar", null);
  } else {
    uiState.set<AppBar?>(
      "appBar",
      AppBar(
        actions: actions,
        actionsIconTheme: style?.actionsIconTheme,
        automaticallyImplyLeading: automaticallyImplyLeading,
        backgroundColor: style?.backgroundColor,
        centerTitle: style?.centerTitle,
        elevation: style?.elevation,
        foregroundColor: style?.foregroundColor,
        forceMaterialTransparency: forceMaterialTransparency,
        iconTheme: style?.iconTheme,
        leading: leading,
        scrolledUnderElevation: style?.scrolledUnderElevation,
        shadowColor: style?.shadowColor,
        shape: style?.shape,
        surfaceTintColor: style?.surfaceTintColor,
        title: title,
        titleSpacing: style?.titleSpacing,
        titleTextStyle: style?.titleTextStyle,
        toolbarHeight: style?.toolbarHeight,
        toolbarTextStyle: style?.toolbarTextStyle,
        systemOverlayStyle: style?.systemOverlayStyle,
      ),
      notify: true,
    );
  }
}