mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Migrate to the New Material Buttons (#668)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -86,7 +86,7 @@ class _SignInButtonState extends State<SignInButton> {
|
||||
_showError();
|
||||
}
|
||||
|
||||
return RaisedButton(
|
||||
return ElevatedButton(
|
||||
child: Text('Sign In with Google'),
|
||||
onPressed: () => _signIn(),
|
||||
);
|
||||
|
||||
@@ -76,7 +76,7 @@ class _EditCategoryFormState extends State<EditCategoryForm> {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||
child: RaisedButton(
|
||||
child: ElevatedButton(
|
||||
child: Text('Cancel'),
|
||||
onPressed: () {
|
||||
widget.onDone(false);
|
||||
@@ -85,7 +85,7 @@ class _EditCategoryFormState extends State<EditCategoryForm> {
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||
child: RaisedButton(
|
||||
child: ElevatedButton(
|
||||
child: Text('OK'),
|
||||
onPressed: () {
|
||||
if (_formKey.currentState.validate()) {
|
||||
|
||||
@@ -103,7 +103,7 @@ class _EditEntryFormState extends State<EditEntryForm> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(intl.DateFormat('MM/dd/yyyy').format(widget.entry.time)),
|
||||
RaisedButton(
|
||||
ElevatedButton(
|
||||
child: Text('Edit'),
|
||||
onPressed: () async {
|
||||
var result = await showDatePicker(
|
||||
@@ -127,7 +127,7 @@ class _EditEntryFormState extends State<EditEntryForm> {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||
child: RaisedButton(
|
||||
child: ElevatedButton(
|
||||
child: Text('Cancel'),
|
||||
onPressed: () {
|
||||
widget.onDone(false);
|
||||
@@ -136,7 +136,7 @@ class _EditEntryFormState extends State<EditEntryForm> {
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||
child: RaisedButton(
|
||||
child: ElevatedButton(
|
||||
child: Text('OK'),
|
||||
onPressed: () {
|
||||
if (_formKey.currentState.validate()) {
|
||||
|
||||
Reference in New Issue
Block a user