imageOverlay static method
Glass image overlay
Implementation
static Widget imageOverlay({
required Widget child,
String? title,
String? subtitle,
List<Widget>? actions,
GlassType type = GlassType.smoky,
AlignmentGeometry alignment = Alignment.bottomCenter,
}) {
return Stack(
children: [
child,
Positioned.fill(
child: Align(
alignment: alignment,
child: GlassContainer(
type: type,
margin: EdgeInsets.all(16.w),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (title != null) ...[
Text(
title,
style: AppTextThemes.bodyLarge(
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
if (subtitle != null) SizedBox(height: 4.h),
],
if (subtitle != null) ...[
Text(
subtitle,
style: AppTextThemes.bodyMedium(color: Colors.white70),
),
],
if (actions != null && actions.isNotEmpty) ...[
SizedBox(height: 12.h),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: actions,
),
],
],
),
),
),
),
],
);
}