@@ -32,16 +32,13 @@ void showToast(
3232}) {
3333 final colorScheme = Theme .of (context).colorScheme;
3434 final isMiniPlayerVisible = audioHandler.mediaItem.value != null ;
35- final bottomMargin = 12.0 + (isMiniPlayerVisible ? MiniPlayer .playerHeight : 0.0 );
35+ final bottomMargin =
36+ 12.0 + (isMiniPlayerVisible ? MiniPlayer .playerHeight : 0.0 );
3637
3738 ScaffoldMessenger .of (context).showSnackBar (
3839 SnackBar (
39- backgroundColor: colorScheme.secondaryContainer,
40- behavior: SnackBarBehavior .floating,
41- shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (12 )),
4240 margin: EdgeInsets .fromLTRB (16 , 12 , 16 , bottomMargin),
4341 padding: const EdgeInsets .symmetric (horizontal: 16 , vertical: 14 ),
44- elevation: 6 ,
4542 content: Row (
4643 children: [
4744 Icon (
@@ -50,15 +47,7 @@ void showToast(
5047 size: 20 ,
5148 ),
5249 const SizedBox (width: 12 ),
53- Expanded (
54- child: Text (
55- text,
56- style: TextStyle (
57- color: colorScheme.onSecondaryContainer,
58- fontWeight: FontWeight .w500,
59- ),
60- ),
61- ),
50+ Expanded (child: Text (text)),
6251 ],
6352 ),
6453 duration: duration,
@@ -76,16 +65,13 @@ void showToastWithButton(
7665}) {
7766 final colorScheme = Theme .of (context).colorScheme;
7867 final isMiniPlayerVisible = audioHandler.mediaItem.value != null ;
79- final bottomMargin = 12.0 + (isMiniPlayerVisible ? MiniPlayer .playerHeight : 0.0 );
68+ final bottomMargin =
69+ 12.0 + (isMiniPlayerVisible ? MiniPlayer .playerHeight : 0.0 );
8070
8171 ScaffoldMessenger .of (context).showSnackBar (
8272 SnackBar (
83- backgroundColor: colorScheme.secondaryContainer,
84- behavior: SnackBarBehavior .floating,
85- shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (12 )),
8673 margin: EdgeInsets .fromLTRB (16 , 12 , 16 , bottomMargin),
8774 padding: const EdgeInsets .symmetric (horizontal: 16 , vertical: 8 ),
88- elevation: 6 ,
8975 content: Row (
9076 children: [
9177 Icon (
@@ -94,20 +80,11 @@ void showToastWithButton(
9480 size: 20 ,
9581 ),
9682 const SizedBox (width: 12 ),
97- Expanded (
98- child: Text (
99- text,
100- style: TextStyle (
101- color: colorScheme.onSecondaryContainer,
102- fontWeight: FontWeight .w500,
103- ),
104- ),
105- ),
83+ Expanded (child: Text (text)),
10684 ],
10785 ),
10886 action: SnackBarAction (
10987 label: buttonName,
110- textColor: colorScheme.secondary,
11188 onPressed: () => onPressedToast (),
11289 ),
11390 persist: false ,
0 commit comments