Changed FlatButton to TextButton.

Changed FlatButton to TextButton since it got deprecated + you'll need to change the gif.
This commit is contained in:
Shasank Periwal
2021-05-31 16:02:12 +05:30
committed by GitHub
parent b48ba8b826
commit 6e776c0ec5

View File

@@ -594,18 +594,16 @@ No need of running the project, simply run the code in the new official Flutter
<tr>
<td>
<pre>
FlatButton(
onPressed: (){},
colorBrightness: Brightness.dark,
color: Colors.deepPurpleAccent,
splashColor: Colors.green,
highlightColor: Colors.red,
child: Text("Raised Button"),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.horizontal(
left: Radius.circular(20.0), right: Radius.circular(1.0))
TextButton(
onPressed: () {},
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all(Colors.deepPurpleAccent),
overlayColor: MaterialStateProperty.all(Colors.red),
foregroundColor: MaterialStateProperty.all(Colors.green),
),
child: Text('Text Button'),
),
),
</pre>
</td><td><img src="https://github.com/PoojaB26/FlutterBasicWidgets/blob/master/screenshots/but3.gif" width=200></td>
</tr>