Skip to content

Commit dbc71e2

Browse files
committed
Replace RaisedButton to ElevateButton
1 parent 2170e71 commit dbc71e2

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

example/lib/src/screen/home_page.dart

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,11 @@ class _HomePageState extends State<HomePage>
6060
_configCard(),
6161
Expanded(
6262
child: Center(
63-
child: RaisedButton(
64-
textColor: textColor,
65-
color: accentColor,
66-
onPressed: _signIn,
67-
child: Text('Sign In'),
68-
),
69-
),
63+
child: ElevatedButton(
64+
child: Text('Sign In'),
65+
onPressed: _signIn,
66+
style: ElevatedButton.styleFrom(
67+
primary: accentColor, onPrimary: textColor))),
7068
),
7169
],
7270
),

example/lib/src/widget/user_info_widget.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ class UserInfoWidget extends StatelessWidget {
3636
if (userEmail != null) Text(userEmail!),
3737
Text(userProfile.statusMessage!),
3838
Container(
39-
child: RaisedButton(
40-
textColor: textColor,
41-
color: accentColor,
42-
child: Text('Sign Out'),
43-
onPressed: onSignOutPressed as void Function()?,
44-
),
45-
),
39+
child: ElevatedButton(
40+
child: Text('Sign Out'),
41+
onPressed: () {
42+
onSignOutPressed.call();
43+
},
44+
style: ElevatedButton.styleFrom(
45+
primary: accentColor, onPrimary: textColor))),
4646
],
4747
),
4848
);

0 commit comments

Comments
 (0)