GlassLargeTitle constructor

const GlassLargeTitle({
  1. required String text,
  2. required GlassLargeTitleController controller,
  3. Widget? searchBar,
  4. double fontSize = 34.0,
  5. FontWeight fontWeight = FontWeight.w700,
  6. double letterSpacing = -0.5,
  7. EdgeInsetsGeometry padding = const EdgeInsetsDirectional.fromSTEB(24, 0, 24, 8),
  8. EdgeInsetsGeometry searchBarPadding = const EdgeInsetsDirectional.symmetric(horizontal: 16, vertical: 4),
  9. Color? color,
  10. Widget? trailing,
  11. Key? key,
})

Creates a large-title sliver.

text is the title displayed at 34pt (iOS 26 spec). controller coordinates the collapse animation with GlassAppBar. searchBar is an optional search widget (e.g. GlassSearchBar) that collapses in Phase 2, after the large title is fully scrolled away.

Implementation

const GlassLargeTitle({
  required this.text,
  required this.controller,
  this.searchBar,
  this.fontSize = 34.0,
  this.fontWeight = FontWeight.w700,
  this.letterSpacing = -0.5,
  this.padding = const EdgeInsetsDirectional.fromSTEB(24, 0, 24, 8),
  this.searchBarPadding =
      const EdgeInsetsDirectional.symmetric(horizontal: 16, vertical: 4),
  this.color,
  this.trailing,
  super.key,
});