From 740289cda945f003a86d63ca20ad3904d295ec69 Mon Sep 17 00:00:00 2001 From: Moe Date: Tue, 10 May 2022 07:35:48 +0700 Subject: [PATCH] Remove and replace deprecated class to the new one --- lib/components/login_form.dart | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/components/login_form.dart b/lib/components/login_form.dart index d6afbee..05ed064 100644 --- a/lib/components/login_form.dart +++ b/lib/components/login_form.dart @@ -87,10 +87,12 @@ class LoginFormState extends State { Widget _buildForgotPasswordBtn() { return Container( alignment: Alignment.centerRight, - child: FlatButton( + child: ElevatedButton( onPressed: () => print('Forgot Password Button Pressed'), - padding: const EdgeInsets.only(right: 0.0), - child: Text( + style: ButtonStyle( + padding: MaterialStateProperty.all(const EdgeInsets.only(right: 0.0)) + ), + child: const Text( 'Forgot Password?', style: kLabelStyle, ), @@ -128,14 +130,16 @@ class LoginFormState extends State { return Container( padding: const EdgeInsets.symmetric(vertical: 25.0), width: double.infinity, - child: RaisedButton( - elevation: 5.0, - onPressed: () => print('Login Button Pressed'), - padding: const EdgeInsets.all(15.0), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(30.0), + child: ElevatedButton( + style: ButtonStyle( + elevation: MaterialStateProperty.all(5.0), + padding: MaterialStateProperty.all(const EdgeInsets.all(15.0)), + shape: MaterialStateProperty.all(RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30.0), + )), + backgroundColor: MaterialStateProperty.all(const Color(0xff8B0000)), ), - color: const Color(0xff8B0000), + onPressed: (){}, child: const Text( 'Login', style: TextStyle(