diff --git a/lib/src/screens/login_screen.dart b/lib/src/screens/login_screen.dart index 97b1b64..c742991 100644 --- a/lib/src/screens/login_screen.dart +++ b/lib/src/screens/login_screen.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import '../widgets/logo.dart'; +import '../widgets/gradient_button.dart'; class LoginScreen extends StatelessWidget { Widget build(BuildContext context) { @@ -16,7 +17,9 @@ class LoginScreen extends StatelessWidget { flex: 4, ), Expanded( - child: Text('Login Buton'), + child: Center( + child: GradientButton(), + ), flex: 1, ), ], diff --git a/lib/src/widgets/gradient_button.dart b/lib/src/widgets/gradient_button.dart new file mode 100644 index 0000000..c1274da --- /dev/null +++ b/lib/src/widgets/gradient_button.dart @@ -0,0 +1,30 @@ +import 'package:flutter/material.dart'; + +class GradientButton extends StatelessWidget { + Widget build(BuildContext context) { + return ConstrainedBox( + constraints: const BoxConstraints(minWidth: 88.0, minHeight: 36.0), + child: Container( + padding: EdgeInsets.all(5), + child: Center( + widthFactor: 1.0, + heightFactor: 1.0, + child: Text('My custom Button'), + ), + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + stops: [ + 0, + 1.0 + ], + colors: [ + Color.fromRGBO(32, 156, 227, 1.0), + Color.fromRGBO(45, 83, 216, 1.0) + ]), + ), + ), + ); + } +}