upgrade to flutter 3

This commit is contained in:
Motia Benachour 2022-09-11 17:10:24 +01:00
parent 4fab441eed
commit a6a5660fc4
No known key found for this signature in database
GPG key ID: 070D55D6C32CF425
3 changed files with 30 additions and 27 deletions

View file

@ -21,9 +21,7 @@ class LoginScreen extends StatelessWidget {
Expanded( Expanded(
child: Container( child: Container(
child: Center( child: Center(
child: FlatButton( child: TextButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onPressed: () { onPressed: () {
Navigator.pushNamed(context, Routes.register); Navigator.pushNamed(context, Routes.register);
}, },
@ -110,9 +108,7 @@ class LoginScreen extends StatelessWidget {
// activeTrackColor: Colors.white, // activeTrackColor: Colors.white,
// activeColor: Colors.white, // activeColor: Colors.white,
), ),
FlatButton( TextButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onPressed: () { onPressed: () {
Navigator.pushNamed( Navigator.pushNamed(
context, Routes.splashScreen); context, Routes.splashScreen);
@ -126,17 +122,19 @@ class LoginScreen extends StatelessWidget {
), ),
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
child: RaisedButton( child: ElevatedButton(
color: Color(0xFF495057), style: ElevatedButton.styleFrom(
textColor: Colors.white, padding: EdgeInsets.all(18.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
),
backgroundColor:Color(0xFF495057),
foregroundColor: Colors.white,
),
onPressed: () { onPressed: () {
Navigator.pushNamed(context, Routes.dashboard); Navigator.pushNamed(context, Routes.dashboard);
}, },
child: Text('Log In'), child: Text('Log In'),
padding: EdgeInsets.all(18.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
),
), ),
) )
], ],

View file

@ -89,9 +89,16 @@ class RegisterFirstScreen extends StatelessWidget {
), ),
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
child: RaisedButton( child: ElevatedButton(
color: Color(0xFF495057), style: ElevatedButton.styleFrom(
textColor: Colors.white, backgroundColor: Color(0xFF495057),
foregroundColor: Colors.white,
padding: EdgeInsets.all(18.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
),
),
onPressed: () { onPressed: () {
Navigator.push( Navigator.push(
context, context,
@ -103,10 +110,6 @@ class RegisterFirstScreen extends StatelessWidget {
); );
}, },
child: Text('Continue'), child: Text('Continue'),
padding: EdgeInsets.all(18.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
),
), ),
) )
], ],

View file

@ -56,18 +56,20 @@ class RegisterSecondScreen extends StatelessWidget {
), ),
SizedBox( SizedBox(
width: double.infinity, width: double.infinity,
child: RaisedButton( child: ElevatedButton(
color: Color(0xFF495057), style: ElevatedButton.styleFrom(
textColor: Colors.white, backgroundColor: Color(0xFF495057),
foregroundColor: Colors.white,
padding: EdgeInsets.all(18.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
),
),
onPressed: () { onPressed: () {
Navigator.pushNamed(context, Routes.dashboard); Navigator.pushNamed(context, Routes.dashboard);
print('Next Step'); print('Next Step');
}, },
child: Text('Register'), child: Text('Register'),
padding: EdgeInsets.all(18.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
),
), ),
) )
], ],