mirror of
https://github.com/Iconica-Development/flutter_login_widget.git
synced 2025-05-19 13:43:44 +02:00
feat(ForgotPasswordForm): don't provide a default title and description
Otherwise it wouldn't be possible to leave them empty
This commit is contained in:
parent
907af2639d
commit
102cb65444
1 changed files with 4 additions and 31 deletions
|
@ -3,7 +3,6 @@ import 'dart:async';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_login/flutter_login.dart';
|
import 'package:flutter_login/flutter_login.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
|
||||||
class ForgotPasswordForm extends StatefulWidget {
|
class ForgotPasswordForm extends StatefulWidget {
|
||||||
/// Constructs a [ForgotPasswordForm] widget.
|
/// Constructs a [ForgotPasswordForm] widget.
|
||||||
///
|
///
|
||||||
|
@ -12,44 +11,18 @@ class ForgotPasswordForm extends StatefulWidget {
|
||||||
/// password reset.
|
/// password reset.
|
||||||
/// [title]: Widget to display title.
|
/// [title]: Widget to display title.
|
||||||
/// [description]: Widget to display description.
|
/// [description]: Widget to display description.
|
||||||
ForgotPasswordForm({
|
const ForgotPasswordForm({
|
||||||
required this.options,
|
required this.options,
|
||||||
required this.onRequestForgotPassword,
|
required this.onRequestForgotPassword,
|
||||||
this.title,
|
this.title,
|
||||||
this.description,
|
this.description,
|
||||||
super.key,
|
super.key,
|
||||||
}) {
|
});
|
||||||
title == null
|
|
||||||
? title = const Padding(
|
|
||||||
padding: EdgeInsets.only(bottom: 8.0),
|
|
||||||
child: Text(
|
|
||||||
'Forgot Password',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff71C6D1),
|
|
||||||
fontWeight: FontWeight.w800,
|
|
||||||
fontSize: 24,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: title = title;
|
|
||||||
|
|
||||||
description == null
|
|
||||||
? description = const Padding(
|
|
||||||
padding: EdgeInsets.only(bottom: 16),
|
|
||||||
child: Text(
|
|
||||||
'No worries. Enter your email address below so we can'
|
|
||||||
' send you a link to reset your password.',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(fontWeight: FontWeight.w400, fontSize: 16),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
final LoginOptions options;
|
final LoginOptions options;
|
||||||
|
|
||||||
Widget? title;
|
final Widget? title;
|
||||||
Widget? description;
|
final Widget? description;
|
||||||
|
|
||||||
final FutureOr<void> Function(String email) onRequestForgotPassword;
|
final FutureOr<void> Function(String email) onRequestForgotPassword;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue