Skip to content

Commit 8e2d496

Browse files
committed
[example app] FlatButton deprecated
* Replace with TextButton and migrate styles
1 parent 9222eca commit 8e2d496

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

example/lib/main.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -580,12 +580,14 @@ class OneSignalButtonState extends State<OneSignalButton> {
580580
return new Table(
581581
children: [
582582
new TableRow(children: [
583-
new FlatButton(
584-
disabledColor: Color.fromARGB(180, 212, 86, 83),
585-
disabledTextColor: Colors.white,
586-
color: Color.fromARGB(255, 212, 86, 83),
587-
textColor: Colors.white,
588-
padding: EdgeInsets.all(8.0),
583+
new TextButton(
584+
style: TextButton.styleFrom(
585+
foregroundColor:Colors.white,
586+
disabledForegroundColor: Colors.white,
587+
backgroundColor: Color.fromARGB(255, 212, 86, 83),
588+
disabledBackgroundColor:Color.fromARGB(180, 212, 86, 83),
589+
padding: EdgeInsets.all(8.0),
590+
),
589591
child: new Text(widget.title),
590592
onPressed: widget.enabled ? widget.onPressed : null,
591593
)

0 commit comments

Comments
 (0)