Skip to content

Commit 755fc06

Browse files
committed
Login form
1 parent 28e4a38 commit 755fc06

File tree

20 files changed

+459
-200
lines changed

20 files changed

+459
-200
lines changed

app/lib/presentation/navigation/routers.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:app/main/init.dart';
2-
import 'package:app/presentation/ui/pages/home/home_page.dart';
3-
import 'package:app/presentation/ui/pages/login/login_page.dart';
4-
import 'package:app/presentation/ui/pages/sign_up/sign_up_page.dart';
2+
import 'package:app/presentation/ui/pages/main/home/home_page.dart';
3+
import 'package:app/presentation/ui/pages/auth/login/login_page.dart';
4+
import 'package:app/presentation/ui/pages/auth/sign_up/sign_up_page.dart';
55
import 'package:app/presentation/ui/pages/splash/splash_page.dart';
66
import 'package:common/core/resource.dart';
77
import 'package:domain/bloc/auth/auth_cubit.dart';

app/lib/presentation/resources/dim.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,18 @@ part of 'resources.dart';
55
class Dimen {
66
static const primaryButtonHeight = 48.0;
77
static const loadingSpinnerSize = 32.0;
8+
static const loadingSpinnerSizeS = 16.0;
9+
10+
static const double loginFormMaxWidth = 400.0;
11+
static const double loginFormMaxHeight = 400.0;
12+
static const double loginFormMinHeight = 200.0;
13+
14+
static const spacingXxs = 2.0;
15+
static const spacingXs = 4.0;
16+
static const spacingS = 8.0;
17+
static const spacingM = 16.0;
18+
static const spacingL = 24.0;
19+
static const spacingXl = 32.0;
20+
static const spacingXxl = 40.0;
21+
static const spacingXxxl = 48.0;
822
}

app/lib/presentation/resources/locale/generated/intl/messages_all.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ MessageLookupByLibrary? _findExact(String localeName) {
3939
/// User programs should call this before using [localeName] for messages.
4040
Future<bool> initializeMessages(String localeName) {
4141
var availableLocale = Intl.verifiedLocale(
42-
localeName, (locale) => _deferredLibraries[locale] != null,
43-
onFailure: (_) => null);
42+
localeName,
43+
(locale) => _deferredLibraries[locale] != null,
44+
onFailure: (_) => null,
45+
);
4446
if (availableLocale == null) {
4547
return new SynchronousFuture(false);
4648
}
@@ -60,8 +62,11 @@ bool _messagesExistFor(String locale) {
6062
}
6163

6264
MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
63-
var actualLocale =
64-
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
65+
var actualLocale = Intl.verifiedLocale(
66+
locale,
67+
_messagesExistFor,
68+
onFailure: (_) => null,
69+
);
6570
if (actualLocale == null) return null;
6671
return _findExact(actualLocale);
6772
}

app/lib/presentation/resources/locale/generated/intl/messages_en.dart

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,47 @@ class MessageLookup extends MessageLookupByLibrary {
2222

2323
final messages = _notInlinedMessages(_notInlinedMessages);
2424
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
25-
"appName": MessageLookupByLibrary.simpleMessage("Flutter Target"),
26-
"cookiesAcceptCTA": MessageLookupByLibrary.simpleMessage("Accept"),
27-
"cookiesBody": MessageLookupByLibrary.simpleMessage(
28-
"We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services."),
29-
"cookiesTitle":
30-
MessageLookupByLibrary.simpleMessage("This website uses cookies"),
31-
"noConnection": MessageLookupByLibrary.simpleMessage("No connection"),
32-
"pleaseTryAgainLaterWeArenworkingToFixTheIssue":
33-
MessageLookupByLibrary.simpleMessage(
34-
"Please try again later, we are\nworking to fix the issue."),
35-
"retry": MessageLookupByLibrary.simpleMessage("Retry"),
36-
"sorryWeDidntFindAnyProduct": MessageLookupByLibrary.simpleMessage(
37-
"Sorry we didn\'t find any product")
38-
};
25+
"appName": MessageLookupByLibrary.simpleMessage("Flutter Target"),
26+
"cookiesAcceptCTA": MessageLookupByLibrary.simpleMessage("Accept"),
27+
"cookiesBody": MessageLookupByLibrary.simpleMessage(
28+
"We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.",
29+
),
30+
"cookiesTitle": MessageLookupByLibrary.simpleMessage(
31+
"This website uses cookies",
32+
),
33+
"ctaLogin": MessageLookupByLibrary.simpleMessage("Login"),
34+
"errorEmailInvalid": MessageLookupByLibrary.simpleMessage(
35+
"Please enter a valid email address.",
36+
),
37+
"errorEmailRequired": MessageLookupByLibrary.simpleMessage(
38+
"Email is required.",
39+
),
40+
"errorPasswordRequired": MessageLookupByLibrary.simpleMessage(
41+
"Password is required.",
42+
),
43+
"errorPasswordWeak": MessageLookupByLibrary.simpleMessage(
44+
"Password is too weak.",
45+
),
46+
"labelAgreeToTerms": MessageLookupByLibrary.simpleMessage(
47+
"I agree to the Terms and Conditions",
48+
),
49+
"labelEmail": MessageLookupByLibrary.simpleMessage("Email"),
50+
"labelPassword": MessageLookupByLibrary.simpleMessage("Password"),
51+
"noConnection": MessageLookupByLibrary.simpleMessage("No connection"),
52+
"passwordInstructions": MessageLookupByLibrary.simpleMessage(
53+
"Min 8 characters long: 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character.",
54+
),
55+
"pleaseTryAgainLaterWeArenworkingToFixTheIssue":
56+
MessageLookupByLibrary.simpleMessage(
57+
"Please try again later, we are\nworking to fix the issue.",
58+
),
59+
"retry": MessageLookupByLibrary.simpleMessage("Retry"),
60+
"sorryWeDidntFindAnyProduct": MessageLookupByLibrary.simpleMessage(
61+
"Sorry we didn\'t find any product",
62+
),
63+
"titleLogin": MessageLookupByLibrary.simpleMessage("Login"),
64+
"titleLoginSubtitle": MessageLookupByLibrary.simpleMessage(
65+
"Use your email and password to login to your account.",
66+
),
67+
};
3968
}

app/lib/presentation/resources/locale/generated/intl/messages_es.dart

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,23 @@ class MessageLookup extends MessageLookupByLibrary {
2222

2323
final messages = _notInlinedMessages(_notInlinedMessages);
2424
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{
25-
"appName": MessageLookupByLibrary.simpleMessage("Flutter Target"),
26-
"cookiesAcceptCTA": MessageLookupByLibrary.simpleMessage("Accept"),
27-
"cookiesBody": MessageLookupByLibrary.simpleMessage(
28-
"We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services."),
29-
"cookiesTitle":
30-
MessageLookupByLibrary.simpleMessage("This website uses cookies"),
31-
"noConnection": MessageLookupByLibrary.simpleMessage("No connection"),
32-
"pleaseTryAgainLaterWeArenworkingToFixTheIssue":
33-
MessageLookupByLibrary.simpleMessage(
34-
"Please try again later, we are\nworking to fix the issue."),
35-
"retry": MessageLookupByLibrary.simpleMessage("Retry"),
36-
"sorryWeDidntFindAnyProduct": MessageLookupByLibrary.simpleMessage(
37-
"Sorry we didn\'t find any product")
38-
};
25+
"appName": MessageLookupByLibrary.simpleMessage("Flutter Target"),
26+
"cookiesAcceptCTA": MessageLookupByLibrary.simpleMessage("Accept"),
27+
"cookiesBody": MessageLookupByLibrary.simpleMessage(
28+
"We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.",
29+
),
30+
"cookiesTitle": MessageLookupByLibrary.simpleMessage(
31+
"This website uses cookies",
32+
),
33+
"ctaLogin": MessageLookupByLibrary.simpleMessage("Iniciar sesión"),
34+
"noConnection": MessageLookupByLibrary.simpleMessage("No connection"),
35+
"pleaseTryAgainLaterWeArenworkingToFixTheIssue":
36+
MessageLookupByLibrary.simpleMessage(
37+
"Please try again later, we are\nworking to fix the issue.",
38+
),
39+
"retry": MessageLookupByLibrary.simpleMessage("Retry"),
40+
"sorryWeDidntFindAnyProduct": MessageLookupByLibrary.simpleMessage(
41+
"Sorry we didn\'t find any product",
42+
),
43+
};
3944
}

app/lib/presentation/resources/locale/generated/l10n.dart

Lines changed: 105 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
{
2-
"appName": "Flutter Target",
3-
"cookiesTitle": "This website uses cookies",
4-
"cookiesAcceptCTA": "Accept",
5-
"cookiesBody": "We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.",
2+
"appName": "Flutter Target",
3+
"cookiesTitle": "This website uses cookies",
4+
"cookiesAcceptCTA": "Accept",
5+
"cookiesBody": "We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.",
66
"noConnection": "No connection",
77
"retry": "Retry",
88
"pleaseTryAgainLaterWeArenworkingToFixTheIssue": "Please try again later, we are\nworking to fix the issue.",
9-
"sorryWeDidntFindAnyProduct": "Sorry we didn't find any product"
10-
}
9+
"sorryWeDidntFindAnyProduct": "Sorry we didn't find any product",
10+
"ctaLogin": "Login",
11+
"labelEmail": "Email",
12+
"labelPassword": "Password",
13+
"passwordInstructions": "Min 8 characters long: 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character.",
14+
"labelAgreeToTerms": "I agree to the Terms and Conditions",
15+
"errorEmailRequired": "Email is required.",
16+
"errorPasswordRequired": "Password is required.",
17+
"titleLogin": "Login",
18+
"titleLoginSubtitle": "Use your email and password to login to your account.",
19+
"errorEmailInvalid": "Please enter a valid email address.",
20+
"errorPasswordWeak": "Password is too weak."
21+
}
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"appName": "Flutter Target",
3-
"cookiesTitle": "This website uses cookies",
4-
"cookiesAcceptCTA": "Accept",
5-
"cookiesBody": "We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.",
2+
"appName": "Flutter Target",
3+
"cookiesTitle": "This website uses cookies",
4+
"cookiesAcceptCTA": "Accept",
5+
"cookiesBody": "We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.",
66
"noConnection": "No connection",
77
"retry": "Retry",
88
"pleaseTryAgainLaterWeArenworkingToFixTheIssue": "Please try again later, we are\nworking to fix the issue.",
9-
"sorryWeDidntFindAnyProduct": "Sorry we didn't find any product"
10-
}
9+
"sorryWeDidntFindAnyProduct": "Sorry we didn't find any product",
10+
"ctaLogin": "Iniciar sesión"
11+
}
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
import 'package:flutter/material.dart';
2-
import 'package:app/presentation/themes/spacing.dart';
32
import 'package:flutter_svg/flutter_svg.dart';
43

54
part 'dim.dart';
65

76
part 'images.dart';
8-
9-
extension SpacingOnWidget on Widget {
10-
Spacing get spacing => Spacing();
11-
}
12-
13-
extension SpacingOnStateWidget on State {
14-
Spacing get spacing => Spacing();
15-
}

0 commit comments

Comments
 (0)