Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Começo do Front-end da Página de cadastro #19

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cmake.sourceDirectory": "/home/marina/Área de trabalho/MDS/2024.2-ARANDU-APP/linux/flutter"
}
Binary file added arandu/android/.gradle/8.3/checksums/checksums.lock
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
2 changes: 2 additions & 0 deletions arandu/android/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Tue Dec 03 12:53:34 BRT 2024
gradle.version=8.3
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package io.flutter.plugins;

import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import io.flutter.Log;

import io.flutter.embedding.engine.FlutterEngine;

/**
* Generated file. Do not edit.
* This file is generated by the Flutter tool based on the
* plugins that support the Android platform.
*/
@Keep
public final class GeneratedPluginRegistrant {
private static final String TAG = "GeneratedPluginRegistrant";
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
}
}
2 changes: 2 additions & 0 deletions arandu/android/local.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sdk.dir=/home/marina/Android/Sdk
flutter.sdk=/home/marina/snap/flutter/common/flutter
14 changes: 14 additions & 0 deletions arandu/ios/Flutter/Generated.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/home/marina/snap/flutter/common/flutter
FLUTTER_APPLICATION_PATH=/home/marina/Área de trabalho/MDS/2024.2-ARANDU-APP/arandu
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json
13 changes: 13 additions & 0 deletions arandu/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/home/marina/snap/flutter/common/flutter"
export "FLUTTER_APPLICATION_PATH=/home/marina/Área de trabalho/MDS/2024.2-ARANDU-APP/arandu"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
19 changes: 19 additions & 0 deletions arandu/ios/Runner/GeneratedPluginRegistrant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Generated file. Do not edit.
//

// clang-format off

#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h

#import <Flutter/Flutter.h>

NS_ASSUME_NONNULL_BEGIN

@interface GeneratedPluginRegistrant : NSObject
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
@end

NS_ASSUME_NONNULL_END
#endif /* GeneratedPluginRegistrant_h */
14 changes: 14 additions & 0 deletions arandu/ios/Runner/GeneratedPluginRegistrant.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Generated file. Do not edit.
//

// clang-format off

#import "GeneratedPluginRegistrant.h"

@implementation GeneratedPluginRegistrant

+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
}

@end
11 changes: 11 additions & 0 deletions arandu/macos/Flutter/ephemeral/Flutter-Generated.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/home/marina/snap/flutter/common/flutter
FLUTTER_APPLICATION_PATH=/home/marina/Área de trabalho/MDS/2024.2-ARANDU-APP/arandu
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json
12 changes: 12 additions & 0 deletions arandu/macos/Flutter/ephemeral/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/home/marina/snap/flutter/common/flutter"
export "FLUTTER_APPLICATION_PATH=/home/marina/Área de trabalho/MDS/2024.2-ARANDU-APP/arandu"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"
Binary file added assets/fonts/Amarante-Regular.ttf
Binary file not shown.
Binary file added assets/images/losang.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/topo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions lib/core/theme/app_colors.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import 'package:aranduapp/core/utils/color_utils.dart';
import 'package:flutter/material.dart';

class AppColors {
static late _Colors colors;
static late _GradientColors gradients;
static late _Alerts alerts;
static void initialize(BuildContext context) {
colors = (Theme.of(context).brightness == Brightness.dark)
? _darkColors()
: _lightColors();
gradients = _GradientColors();
alerts = _Alerts();
}

static _Colors get current => colors;
static _GradientColors get currentGradients => gradients;
static _Alerts get currentAlerts => alerts;

static _Colors _lightColors() {
return _Colors(
background: fromHex('#FFFFFF'),
secBackground: fromHex('#ada4a5'),
tituloApp: fromHex('#1E1E1E'),
text: fromHex('#000000'),
subText: fromHex('#7B6F72'),
textSecBackground: fromHex('#ADA4A5'),
losang: fromHex('#9a3412'),
colorDesenho: fromHex('#fed7aa'),
);
}

static _Colors _darkColors() {
return _Colors(
background: fromHex('#181818'),
secBackground: fromHex('#2C2C2C'),
tituloApp: fromHex('#EBEBEB'),
text: fromHex('#FFFFFF'),
subText: fromHex('#F0F0F0'),
textSecBackground: fromHex('#ADA4A5'),
losang: fromHex('#fb923c'),
colorDesenho: fromHex('#c2410b'),
);
}
}

class _GradientColors {
final LinearGradient orange = LinearGradient(
colors: [fromHex('#FB923C'), fromHex('#C2410C')],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
);
final LinearGradient cyan = LinearGradient(
colors: [fromHex('#38CFE3'), fromHex('#0E7490')],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
);
}

class _Alerts {
final Color error = fromHex('#C00F0C');
final Color alert = fromHex('#D4B139');
final Color success = fromHex('#5A9D4B');
}

class _Colors {
final Color background;
final Color secBackground;
final Color tituloApp;
final Color text;
final Color subText;
final Color textSecBackground;
final Color losang;
final Color colorDesenho;

_Colors({
required this.background,
required this.secBackground,
required this.tituloApp,
required this.text,
required this.subText,
required this.textSecBackground,
required this.losang,
required this.colorDesenho,
});
}
89 changes: 89 additions & 0 deletions lib/core/theme/app_typography.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import 'package:aranduapp/core/theme/app_colors.dart';
import 'package:flutter/material.dart';

class AppTypography {
static late _Typography typography;

static void initialize(BuildContext context) {
typography = (Theme.of(context).brightness == Brightness.dark)
? _darkTypography(context)
: _lightTypography(context);
}

static _Typography get current => typography;

static _Typography _lightTypography(BuildContext context) {
final colors = AppColors.current;
return _Typography(
titleH1: _baseTextStyle('Amarante', 26, colors.tituloApp),
titleH2: _baseTextStyle('Amarante', 24, colors.tituloApp),
titleH3: _baseTextStyle('Amarante', 22, colors.tituloApp),
titleH4: _baseTextStyle('Amarante', 20, colors.tituloApp),
subtitleH1: _baseTextStyle('Dosis', 22, colors.subText),
subtitleH2: _baseTextStyle('Dosis', 20, colors.subText),
subtitleH3: _baseTextStyle('Dosis', 18, colors.subText),
subtitleH4: _baseTextStyle('Dosis', 16, colors.subText),
textH1: _baseTextStyle('Comfortaa', 16, colors.subText),
textH2: _baseTextStyle('Comfortaa', 14, colors.subText),
textH3: _baseTextStyle('Comfortaa', 12, colors.subText),
textH4: _baseTextStyle('Comfortaa', 10, colors.subText),
);
}

static _Typography _darkTypography(BuildContext context) {
final colors = AppColors.current;
return _Typography(
titleH1: _baseTextStyle('Amarante', 26, colors.tituloApp),
titleH2: _baseTextStyle('Amarante', 24, colors.tituloApp),
titleH3: _baseTextStyle('Amarante', 22, colors.tituloApp),
titleH4: _baseTextStyle('Amarante', 20, colors.tituloApp),
subtitleH1: _baseTextStyle('Dosis', 22, colors.subText),
subtitleH2: _baseTextStyle('Dosis', 20, colors.subText),
subtitleH3: _baseTextStyle('Dosis', 18, colors.subText),
subtitleH4: _baseTextStyle('Dosis', 16, colors.subText),
textH1: _baseTextStyle('Comfortaa', 16, colors.subText),
textH2: _baseTextStyle('Comfortaa', 14, colors.subText),
textH3: _baseTextStyle('Comfortaa', 12, colors.subText),
textH4: _baseTextStyle('Comfortaa', 10, colors.subText),
);
}

static TextStyle _baseTextStyle(
String fontFamily, double? fontSize, Color color) {
return TextStyle(
fontFamily: fontFamily,
fontSize: fontSize,
color: color,
);
}
}

class _Typography {
// Titles
final TextStyle titleH1;
final TextStyle titleH2;
final TextStyle titleH3;
final TextStyle titleH4;
final TextStyle subtitleH1;
final TextStyle subtitleH2;
final TextStyle subtitleH3;
final TextStyle subtitleH4;
final TextStyle textH1;
final TextStyle textH2;
final TextStyle textH3;
final TextStyle textH4;
_Typography({
required this.titleH1,
required this.titleH2,
required this.titleH3,
required this.titleH4,
required this.subtitleH1,
required this.subtitleH2,
required this.subtitleH3,
required this.subtitleH4,
required this.textH1,
required this.textH2,
required this.textH3,
required this.textH4,
});
}
10 changes: 10 additions & 0 deletions lib/core/theme/theme_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class AppProvider with ChangeNotifier {
bool isDarkMode = false;

void toggleTheme() {
isDarkMode = !isDarkMode;
notifyListeners();
}
}
8 changes: 8 additions & 0 deletions lib/core/utils/color_utils.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'dart:ui';

Color fromHex(String hexString) {
final buffer = StringBuffer();
if (hexString.length == 6 || hexString.length == 7) buffer.write('FF');
buffer.write(hexString.replaceFirst('#', ''));
return Color(int.parse(buffer.toString(), radix: 16));
}
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:aranduapp/config/ThemeApp.dart';
import 'package:flutter/material.dart';
import 'package:aranduapp/ui/login/view/LoginView.dart';
//import 'package:aranduapp/ui/login/view/LoginView.dart';
import 'package:aranduapp/ui/register_account/view/RegisterAccount.dart';

void main() {
runApp(const MyApp());
Expand All @@ -13,9 +14,8 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeApp.themeData(),
darkTheme: ThemeApp.darkThemeData(),
debugShowCheckedModeBanner: false,
home: Login(),
home: RegisterAccount(),
);
}
}
11 changes: 5 additions & 6 deletions lib/ui/login/view/LoginView.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:aranduapp/core/theme/app_typography.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

Expand Down Expand Up @@ -213,12 +214,10 @@ class _LoginState extends State<_Login> {
);
},
child: SizedBox(
child: Text(
' Crie a sua conta',
style: Theme.of(context).textTheme.bodySmall!.apply(
color: Theme.of(context).colorScheme.primary,
),
),
child: Text(' Crie a sua conta',
style: AppTypography.current.titleH1.copyWith(
fontWeight: FontWeight.bold,
)),
),
),
],
Expand Down
38 changes: 38 additions & 0 deletions lib/ui/register_account/model/RegisterRequest.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import 'dart:convert';

class RegisterRequest {
final String email;
final String firstName;
final String lastName;
final String password;
final String confPassword;

RegisterRequest({
required this.email,
required this.firstName,
required this.lastName,
required this.password,
required this.confPassword,
});

Map<String, dynamic> toJson() {
return {
'email': email,
'firstName': firstName,
'lastName': lastName,
'password': password,
'confPassword': confPassword,
};
}

factory RegisterRequest.fromJsonString(String jsonString) {
final json = jsonDecode(jsonString);
return RegisterRequest(
email: json['email'],
firstName: json['firstName'],
lastName: json['lastName'],
password: json['password'],
confPassword: json['confPassword'],
);
}
}
Loading
Loading