5 static ScaffoldFeatureController<SnackBar, SnackBarClosedReason>
display(
6 final BuildContext context,
10 return ScaffoldMessenger.of(context).showSnackBar(
23 required BuildContext context,
31 decoration: BoxDecoration(
33 borderRadius: BorderRadius.circular(10.r),
46 mainAxisSize: MainAxisSize.min,
47 crossAxisAlignment: CrossAxisAlignment.start,
51 style: Theme.of(context).textTheme.bodyMedium?.copyWith(
52 fontWeight: FontWeight.w500,
56 overflow: TextOverflow.ellipsis,
62 decoration: BoxDecoration(
63 color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.1),
64 borderRadius: BorderRadius.circular(8.r),
69 color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7),
72 onPressed: () => ScaffoldMessenger.of(context).hideCurrentSnackBar(),
74 constraints: BoxConstraints(
83 backgroundColor: Theme.of(context).colorScheme.surface,
85 duration:
const Duration(milliseconds: 2100),
86 padding: EdgeInsets.symmetric(horizontal: 16.sp, vertical: 14.sp),
87 margin: EdgeInsets.symmetric(horizontal: 16.sp, vertical: 16.sp),
88 behavior: SnackBarBehavior.floating,
89 shape: RoundedRectangleBorder(
90 borderRadius: BorderRadius.circular(14.r),
96 dismissDirection: DismissDirection.horizontal,
97 animation: CurvedAnimation(
98 parent:
const AlwaysStoppedAnimation(1),
99 curve: Curves.fastOutSlowIn,
style Column(crossAxisAlignment:CrossAxisAlignment.end, children:[Container(padding:EdgeInsets.symmetric(horizontal:8.w, vertical:4.h), decoration:BoxDecoration(color:ColorPalette.tiffanyBlue.withValues(alpha:0.1), borderRadius:BorderRadius.circular(12),), child:Text(collection.type ?? '', style:Theme.of(context).textTheme.bodySmall?.copyWith(color:ColorPalette.tiffanyBlue, fontWeight:FontWeight.bold,),),),],)