From b69ea3494a795b41ded30955d22e24d30e134714 Mon Sep 17 00:00:00 2001 From: Victor Shukuru Date: Mon, 16 May 2022 11:45:58 +0200 Subject: [PATCH] Update banner_dart_pad.md Changing FlatButton to TextButton to support new flutter version --- docs/components/banners_dartpad.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/components/banners_dartpad.md b/docs/components/banners_dartpad.md index e49ede9..64ba822 100644 --- a/docs/components/banners_dartpad.md +++ b/docs/components/banners_dartpad.md @@ -108,11 +108,11 @@ class MyHomePage extends StatelessWidget { content: const Text('Error message text'), leading: CircleAvatar(child: Icon(Icons.delete)), actions: [ - FlatButton( + TextButton( child: const Text('ACTION 1'), onPressed: () {}, ), - FlatButton( + TextButton( child: const Text('ACTION 2'), onPressed: () {}, ), @@ -155,11 +155,11 @@ class MyHomePage extends StatelessWidget { content: const Text('Error message text'), leading: CircleAvatar(child: Icon(Icons.delete)), actions: [ - FlatButton( + TextButton( child: const Text('ACTION 1'), onPressed: () {}, ), - FlatButton( + TextButton( child: const Text('ACTION 2'), onPressed: () {}, ), @@ -262,11 +262,11 @@ MaterialBanner( content: const Text('Error message text'), leading: CircleAvatar(child: Icon(Icons.delete)), actions: [ - FlatButton( + TextButton( child: const Text('ACTION 1'), onPressed: () { }, ), - FlatButton( + TextButton( child: const Text('ACTION 2'), onPressed: () { }, ), @@ -309,16 +309,16 @@ class MyApp extends StatelessWidget { class MyHomePage extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: Text('Banners'),), + appBar: AppBar(title: const Text('Banners'),), body: MaterialBanner( content: const Text('Error message text'), leading: CircleAvatar(child: Icon(Icons.delete)), actions: [ - FlatButton( + TextButton( child: const Text('ACTION 1'), onPressed: () { }, ), - FlatButton( + TextButton( child: const Text('ACTION 2'), onPressed: () { }, ), @@ -333,7 +333,7 @@ ThemeData _buildShrineTheme() { return base.copyWith( colorScheme: _shrineColorScheme, toggleableActiveColor: shrinePink400, - accentColor: shrineBrown900, + accentColor: shrineBrown900,// this is now deprecated you may use colorSchema primaryColor: shrinePink100, primaryColorLight: shrinePink100, buttonColor: shrinePink100,