extract button styles
This commit is contained in:
parent
3baa33a838
commit
0637bd0d4d
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:pin_code_fields/pin_code_fields.dart';
|
||||
import 'package:robo_advisory/utils/constants.dart';
|
||||
import 'package:robo_advisory/config/Routes.dart';
|
||||
import 'package:robo_advisory/widgets/buttons.dart';
|
||||
|
||||
class LoginScreen extends StatelessWidget {
|
||||
bool rememberSwitch = false;
|
||||
|
@ -21,7 +22,7 @@ class LoginScreen extends StatelessWidget {
|
|||
Expanded(
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: TextButton(
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, Routes.register);
|
||||
},
|
||||
|
@ -123,14 +124,7 @@ class LoginScreen extends StatelessWidget {
|
|||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
padding: EdgeInsets.all(18.0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(18.0),
|
||||
),
|
||||
backgroundColor:Color(0xFF495057),
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
style: mainButtonStyle(),
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, Routes.dashboard);
|
||||
},
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:pin_code_fields/pin_code_fields.dart';
|
||||
import 'package:robo_advisory/utils/constants.dart';
|
||||
import 'package:robo_advisory/screens/register/register_step_2.dart';
|
||||
import 'package:robo_advisory/widgets/buttons.dart';
|
||||
|
||||
class RegisterFirstScreen extends StatelessWidget {
|
||||
@override
|
||||
|
@ -90,15 +91,7 @@ class RegisterFirstScreen extends StatelessWidget {
|
|||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF495057),
|
||||
foregroundColor: Colors.white,
|
||||
padding: EdgeInsets.all(18.0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(18.0),
|
||||
),
|
||||
),
|
||||
|
||||
style: mainButtonStyle(),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:robo_advisory/utils/constants.dart';
|
||||
import 'package:robo_advisory/config/Routes.dart';
|
||||
import 'package:robo_advisory/widgets/buttons.dart';
|
||||
|
||||
class RegisterSecondScreen extends StatelessWidget {
|
||||
@override
|
||||
|
@ -57,14 +58,7 @@ class RegisterSecondScreen extends StatelessWidget {
|
|||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF495057),
|
||||
foregroundColor: Colors.white,
|
||||
padding: EdgeInsets.all(18.0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(18.0),
|
||||
),
|
||||
),
|
||||
style: mainButtonStyle(),
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, Routes.dashboard);
|
||||
print('Next Step');
|
||||
|
|
11
lib/widgets/buttons.dart
Normal file
11
lib/widgets/buttons.dart
Normal file
|
@ -0,0 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
mainButtonStyle() {
|
||||
return ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF495057),
|
||||
foregroundColor: Colors.white,
|
||||
padding: EdgeInsets.all(18.0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(18.0),
|
||||
));
|
||||
}
|
Loading…
Reference in a new issue