Update SnackBar to allow for support of the new style from Material spec (#31275)
This PR introduces a number of changes and improvements to snack bars. This includes the ability to specify: floating style of snack bars that adhere to the updated Material spec elevation and shape on the SnackBar itself instead of relying on fixed values a snackBarTheme as part of ThemeData which allows you to customize all of the above on an app-wide level. This PR is includes the changes from #21484 as well as additional fixes and modifications. Thanks to @NikoYuwono for providing these changes and getting this off the ground!
This commit is contained in:
@@ -83,6 +83,13 @@ class _SnackBarDemoState extends State<SnackBarDemo> {
|
||||
// can refer to the Scaffold with Scaffold.of().
|
||||
builder: buildBody
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
child: const Icon(Icons.add),
|
||||
tooltip: 'Create',
|
||||
onPressed: () {
|
||||
print('Floating Action Button was pressed');
|
||||
}
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user