📜  小吃店颤动 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:08.748000             🧑  作者: Mango

代码示例6
final snackBar = SnackBar(
  content: Text('Yay! A SnackBar!'),
  action: SnackBarAction(
    label: 'Undo',
    onPressed: () {
      // Some code to undo the change.
    },
  ),
);

 // Find the Scaffold in the widget tree and use
 // it to show a SnackBar.
 Scaffold.of(context).showSnackBar(snackBar);