1
1
import 'package:flutter/material.dart' ;
2
2
import 'package:serverpod_auth_client/serverpod_auth_client.dart' ;
3
3
import 'package:serverpod_auth_email_flutter/src/signin_dialog.dart' ;
4
+ import 'package:serverpod_auth_email_flutter/src/signin_labels.dart' ;
4
5
5
6
/// Sign in with Email button. When pressed, a pop-up window appears with fields for entering login, email and password.
6
7
class SignInWithEmailButton extends StatefulWidget {
@@ -29,6 +30,10 @@ class SignInWithEmailButton extends StatefulWidget {
29
30
/// If this value is modified, the server must be updated to match.
30
31
final int ? minPasswordLength;
31
32
33
+ /// Labels for the sign in dialog.
34
+ /// If [null] , the default/english labels will be used.
35
+ final SignInWithEmailDialogLabels ? localization;
36
+
32
37
/// Creates a new Sign in with Email button.
33
38
const SignInWithEmailButton ({
34
39
required this .caller,
@@ -38,6 +43,7 @@ class SignInWithEmailButton extends StatefulWidget {
38
43
this .icon,
39
44
this .maxPasswordLength,
40
45
this .minPasswordLength,
46
+ this .localization,
41
47
super .key,
42
48
});
43
49
@@ -63,6 +69,7 @@ class SignInWithEmailButtonState extends State<SignInWithEmailButton> {
63
69
caller: widget.caller,
64
70
maxPasswordLength: widget.maxPasswordLength,
65
71
minPasswordLength: widget.minPasswordLength,
72
+ localization: widget.localization,
66
73
onSignedIn: () {
67
74
if (widget.onSignedIn != null ) {
68
75
widget.onSignedIn !();
0 commit comments