Skip to main content
1

šŸ–¼ļø Primary Access

theme
ThemeData
Retrieves the entire application’s ThemeData. The top-level shortcut for any theme property.
final background = context.theme.scaffoldBackgroundColor;
colorScheme
ColorScheme
Retrieves the application’s primary ColorScheme. Recommended for accessing semantic colors like primary, error, and surface.
Container(
  color: context.colorScheme.primary,
);
2

āœ’ļø Typography & Icons

textTheme
TextTheme
Retrieves the application’s primary TextTheme. Provides quick access to standard styles (e.g., headline, title, body).
Text(
  "Welcome",
  style: context.textTheme.headlineLarge,
);
iconTheme
IconThemeData
Retrieves the application’s primary IconThemeData. Use this to find the default color and size for your icons.
Icon(
  Icons.star,
  color: context.iconTheme.color,
);