AppBackgroundStyles class abstract final

Hook-calling facade for background styles.

Returns BoxDecoration or Widget instances produced by the active palette plugin's styles:background hook. Falls back to plain theme-derived colours if no hook is registered.

Named backgrounds

Name Typical use
screen Full-screen scaffold background (may be a gradient or solid)
card Product cards, list items, bottom sheets
section Section header band, promo strip
header Hero / top-of-screen band inside a SliverAppBar or banner
input Text field fill
chip Filter chip / tag background
overlay Scrim/modal overlay behind bottom sheets and dialogs

Usage

import 'package:moose_core/ui.dart';

// Scaffold body with a decorative screen background
Scaffold(
  body: AppBackgroundStyles.screenWidget(context,
    child: CustomScrollView(...),
  ),
)

// Card with themed decoration
DecoratedBox(
  decoration: AppBackgroundStyles.card(context),
  child: ProductCard(),
)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

card(BuildContext context) BoxDecoration
Card / list-item background decoration.
chip(BuildContext context) BoxDecoration
Filter chip / tag background decoration.
Hero / top-of-screen header band decoration.
input(BuildContext context) BoxDecoration
Text field fill decoration.
overlay(BuildContext context) BoxDecoration
Modal scrim / overlay decoration.
screen(BuildContext context) BoxDecoration
Full-screen scaffold background decoration.
screenWidget(BuildContext context, {required Widget child}) Widget
Wraps child with the screen background as a full-size Stack.
section(BuildContext context) BoxDecoration
Section header band decoration.