diff --git a/lib/src/screens/login_screen.dart b/lib/src/screens/login_screen.dart index 0b2ca41..d51f9b1 100644 --- a/lib/src/screens/login_screen.dart +++ b/lib/src/screens/login_screen.dart @@ -23,7 +23,7 @@ class LoginScreen extends StatelessWidget { Expanded( child: Center( child: GradientButton( - onTap: _authService.googleLoginAndSignup(), + onTap: () => _authService.googleLoginAndSignup(), height: 50, width: 310, radius: 25, diff --git a/lib/src/widgets/gradient_button.dart b/lib/src/widgets/gradient_button.dart index c5799a3..4f9f528 100644 --- a/lib/src/widgets/gradient_button.dart +++ b/lib/src/widgets/gradient_button.dart @@ -1,13 +1,21 @@ -import 'dart:math'; - import 'package:flutter/material.dart'; class GradientButton extends StatelessWidget { + /// The border radius of the button. final double radius; + + /// The Widget to be contained inside the button. final Widget child; + + /// Height of the button. final double height; + + /// Width of the button. final double width; - final onTap; + + /// Function to be called when the button is pressed. + final VoidCallback onTap; + GradientButton({ this.radius = 4, @required this.child,