1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-11 23:39:14 +00:00

Migrate to the New Material Buttons (#668)

This commit is contained in:
Brett Morgan
2021-01-27 13:20:50 +11:00
committed by GitHub
parent 6502209a78
commit 622e8d55d3
44 changed files with 122 additions and 107 deletions

View File

@@ -30,8 +30,8 @@ class _HomePageState extends State<HomePage> {
actions: [
Padding(
padding: const EdgeInsets.all(8.0),
child: FlatButton(
textColor: Colors.white,
child: TextButton(
style: TextButton.styleFrom(primary: Colors.white),
onPressed: () => _handleSignOut(),
child: Text('Sign Out'),
),
@@ -90,13 +90,13 @@ class _HomePageState extends State<HomePage> {
builder: (context) => AlertDialog(
title: Text('Are you sure you want to sign out?'),
actions: [
FlatButton(
TextButton(
child: Text('No'),
onPressed: () {
Navigator.of(context).pop(false);
},
),
FlatButton(
TextButton(
child: Text('Yes'),
onPressed: () {
Navigator.of(context).pop(true);