mirror of
https://github.com/Iconica-Development/flutter_login_widget.git
synced 2025-05-19 05:33:45 +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_login/flutter_login.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class ForgotPasswordForm extends StatefulWidget {
|
||||
/// Constructs a [ForgotPasswordForm] widget.
|
||||
///
|
||||
|
@ -12,44 +11,18 @@ class ForgotPasswordForm extends StatefulWidget {
|
|||
/// password reset.
|
||||
/// [title]: Widget to display title.
|
||||
/// [description]: Widget to display description.
|
||||
ForgotPasswordForm({
|
||||
const ForgotPasswordForm({
|
||||
required this.options,
|
||||
required this.onRequestForgotPassword,
|
||||
this.title,
|
||||
this.description,
|
||||
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;
|
||||
|
||||
Widget? title;
|
||||
Widget? description;
|
||||
final Widget? title;
|
||||
final Widget? description;
|
||||
|
||||
final FutureOr<void> Function(String email) onRequestForgotPassword;
|
||||
|
||||
|
|
Loading…
Reference in a new issue