Changed the callback in loginscreen to be an arrow function, added docs for the attributes in gradient button
This commit is contained in:
parent
79b3f98812
commit
75982102d8
2 changed files with 12 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue