I want to create a Snackbar in flutter. I want it to have borders on all 4 corners and have a border width with a different color only at bottom side.
Snackbar required :
I couldn't find a way to add both the properties together.
Can someone suggest a way to do it without using external flutter libraries or a Container inside content parameter of the snackbar widget?
I am able to create only one of the required properties separately.
I am able to apply border width at bottom with color.
var snackBar = SnackBar( behavior: SnackBarBehavior.floating, shape: const Border( bottom: BorderSide( color: Colors.green width: 4, content: Flex( direction: Axis.horizontal, children: [ Padding( padding: const EdgeInsets.only(right: 12), child: Icon(Icons.add), ), Text( "Toast message", ), ], ), );
SnackBar with bottom border width :
I am able to apply corner radius at all 4 corners.
var snackBar = SnackBar( behavior: SnackBarBehavior.floating, shape: const RoundedRectangleBorder( borderRadius: 8, ), content: Flex( direction: Axis.horizontal, children: [ Padding( padding: const EdgeInsets.only(right: 12), child: Icon(Icons.add) ), Text( "Toast message", ), ], ), );
Snackbar with border radius:
I want to apply both properties together but I am unable to it.



To use this snackbar just add customSnackbar widget to snackbar
And to display the snackbar use scaffold key
I hope this will solve your problem