Merge branch 'develop' into feature/fd-466

This commit is contained in:
J. A. Messias 2024-11-11 16:22:50 -03:00
commit 4de6f215d0
52 changed files with 1537 additions and 2516 deletions

View File

@ -14,8 +14,8 @@ void main() {
group('Initialization', () { group('Initialization', () {
group('Navigation', () { group('Navigation', () {
setUpAll(() async => await initializeApp().then( setUpAll(() async => await initializeApp()
(_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage))); .then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
testWidgets('Test Welcome', (WidgetTester tester) async { testWidgets('Test Welcome', (WidgetTester tester) async {
widget = tester; widget = tester;
await _testWelcome(); await _testWelcome();
@ -26,16 +26,16 @@ void main() {
}); });
group('Authentication', () { group('Authentication', () {
group('Sign in', () { group('Sign in', () {
setUpAll(() async => await initializeApp().then( setUpAll(() async => await initializeApp()
(_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage))); .then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
testWidgets('Test Sign In', (WidgetTester tester) async { testWidgets('Test Sign In', (WidgetTester tester) async {
widget = tester; widget = tester;
await _testSignIn(); await _testSignIn();
}); });
}); });
group('Sign up', () { group('Sign up', () {
setUpAll(() async => await initializeApp().then( setUpAll(() async => await initializeApp()
(_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage))); .then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
testWidgets('Test Sign Up', (WidgetTester tester) async { testWidgets('Test Sign Up', (WidgetTester tester) async {
widget = tester; widget = tester;
await _testSignUp(); await _testSignUp();

View File

@ -167,10 +167,8 @@ class GetVehiclesByProperty {
class UnregisterDevice { class UnregisterDevice {
Future<ApiCallResponse> call() async { Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
callName: 'unregisterDevice', callName: 'unregisterDevice',
@ -197,12 +195,9 @@ class UnregisterDevice {
class DeletePet { class DeletePet {
Future<ApiCallResponse> call({final int? petID = 0}) async { Future<ApiCallResponse> call({final int? petID = 0}) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'excluirPet'; const String atividade = 'excluirPet';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -291,12 +286,9 @@ class GetPets {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'consultaPets'; const String atividade = 'consultaPets';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -328,12 +320,9 @@ class GetPetPhoto {
Future<ApiCallResponse> call({final int? petId}) async { Future<ApiCallResponse> call({final int? petId}) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'consultaFotoPet'; const String atividade = 'consultaFotoPet';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -374,12 +363,9 @@ class RegisterPet {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'cadastrarPet'; const String atividade = 'cadastrarPet';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -422,12 +408,9 @@ class BuscaEnconcomendas {
final String? adresseeType, final String? adresseeType,
final String? status, final String? status,
}) async { }) async {
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getEncomendas'; const String atividade = 'getEncomendas';
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
@ -469,12 +452,9 @@ class CancelaVisita {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'cancelaVisita'; const String atividade = 'cancelaVisita';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -506,10 +486,8 @@ class CancelaVisita {
class DeleteAccount { class DeleteAccount {
Future<ApiCallResponse> call() async { Future<ApiCallResponse> call() async {
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -540,12 +518,9 @@ class ChangePanic {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado'; const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -579,12 +554,9 @@ class ChangePass {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado'; const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -618,12 +590,9 @@ class RespondeVinculo {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
callName: 'respondeVinculo', callName: 'respondeVinculo',
@ -655,12 +624,9 @@ class ChangeNotifica {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado'; const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -692,14 +658,10 @@ class UpdateIDE {
Future<ApiCallResponse> call() async { Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? ''; final String newIde = (await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String newIde =
(await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado'; const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -731,10 +693,8 @@ class UpdToken {
Future<ApiCallResponse> call() async { Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String token = (await StorageHelper().get(SecureStorageKey.token.value, Storage.SecureStorage)) ?? ''; final String token = (await StorageHelper().get(SecureStorageKey.token.value, Storage.SecureStorage)) ?? '';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -762,20 +722,17 @@ class UpdToken {
class LoginCall { class LoginCall {
Future<ApiCallResponse> call() async { Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String email = (await StorageHelper().get(SecureStorageKey.email.value, Storage.SecureStorage)) ?? ''; final String email = (await StorageHelper().get(SecureStorageKey.email.value, Storage.SecureStorage)) ?? '';
final String password = final String password = (await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
(await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? ''; final String type = (await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
final String type =
(await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
final String description = final String description =
(await StorageHelper().get(SecureStorageKey.deviceDescription.value, Storage.SecureStorage)) ?? ''; (await StorageHelper().get(SecureStorageKey.deviceDescription.value, Storage.SecureStorage)) ?? '';
late final String token; late final String token;
try { try {
token = await FirebaseMessagingService.getToken(); token = await FirebaseMessagingService.getToken();
if(token == null || token.isEmpty) throw Exception('Token is empty'); } if (token == null || token.isEmpty) throw Exception('Token is empty');
catch (e, s) { } catch (e, s) {
token = ''; token = '';
log('Error getting token', error: e, stackTrace: s); log('Error getting token', error: e, stackTrace: s);
LogUtil.requestAPIFailed('login.php', email, "Login", e, s); LogUtil.requestAPIFailed('login.php', email, "Login", e, s);
@ -853,12 +810,9 @@ class ChangePasswordCall {
required final String psswd, required final String psswd,
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
callName: 'changePassword', callName: 'changePassword',
@ -957,12 +911,9 @@ class PostScheduleVisitorCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'putVisitante'; const String atividade = 'putVisitante';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -1015,12 +966,9 @@ class PostScheduleVisitCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'putVisita'; const String atividade = 'putVisita';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -1072,12 +1020,9 @@ class GetScheduleVisitCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getVisitas'; const String atividade = 'getVisitas';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -1349,12 +1294,9 @@ class GetDadosCall {
Future<ApiCallResponse> call() async { Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getDados'; const String atividade = 'getDados';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -1585,12 +1527,9 @@ class GetVisitorByDocCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getVisitante'; const String atividade = 'getVisitante';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -1642,12 +1581,9 @@ class GetFotoVisitanteCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getFotoVisitante'; const String atividade = 'getFotoVisitante';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -1684,12 +1620,9 @@ class PostProvVisitSchedulingCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'putAgendamentoProv'; const String atividade = 'putAgendamentoProv';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -1736,12 +1669,9 @@ class GetVisitsCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getVisitas'; const String atividade = 'getVisitas';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -2002,12 +1932,9 @@ class DeleteVisitCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'cancelaVisita'; const String atividade = 'cancelaVisita';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -2048,14 +1975,10 @@ class GetPessoasLocalCall {
Future<ApiCallResponse> call() async { Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String ownerUUID = (await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
final String ownerUUID = final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? ''; final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
callName: 'getPessoasLocal', callName: 'getPessoasLocal',
@ -2118,12 +2041,9 @@ class RespondeSolicitacaoCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'respondeSolicitacao'; const String atividade = 'respondeSolicitacao';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -2171,12 +2091,9 @@ class GetAccessCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getAcessos'; const String atividade = 'getAcessos';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -2423,10 +2340,8 @@ class GetLiberationsCall {
final StreamController<ApiCallResponse> controller = StreamController(); final StreamController<ApiCallResponse> controller = StreamController();
Future.microtask(() async { Future.microtask(() async {
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID = final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? ''; (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getSolicitacoes'; const String atividade = 'getSolicitacoes';
@ -2618,12 +2533,9 @@ class GetMessagesCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getMensagens'; const String atividade = 'getMensagens';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(

View File

@ -271,8 +271,7 @@ class NotificationService {
await AwesomeNotifications().isNotificationAllowed().then((isAllowed) async { await AwesomeNotifications().isNotificationAllowed().then((isAllowed) async {
final bool requestOSnotification = final bool requestOSnotification =
(await StorageHelper().get(SQLiteStorageKey.requestOSNotification.value, Storage.SQLiteStorage)) == (await StorageHelper().get(SQLiteStorageKey.requestOSNotification.value, Storage.SQLiteStorage)) == 'true';
'true';
if (requestOSnotification == false) { if (requestOSnotification == false) {
if (isAllowed == false) { if (isAllowed == false) {

View File

@ -45,9 +45,13 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
onTap: _isProcessing onTap: _isProcessing
? null ? null
: () async { : () async {
setState(() { _isProcessing = true; }); setState(() {
_isProcessing = true;
});
await widget.action.call(); await widget.action.call();
setState(() { _isProcessing = false; }); setState(() {
_isProcessing = false;
});
}, },
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0), padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),

View File

@ -40,9 +40,13 @@ class _MenuCardItemState extends State<MenuCardItem> {
onTap: _isProcessing onTap: _isProcessing
? null ? null
: () async { : () async {
setState(() { _isProcessing = true; }); setState(() {
_isProcessing = true;
});
await widget.action.call(); await widget.action.call();
setState(() { _isProcessing = false; }); setState(() {
_isProcessing = false;
});
}, },
child: Card( child: Card(
elevation: 0, elevation: 0,

View File

@ -41,7 +41,6 @@ class _CustomSelectState extends State<CustomSelect> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
return Padding( return Padding(
@ -115,8 +114,7 @@ class _CustomSelectState extends State<CustomSelect> {
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: useGoogleFonts:
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily), GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
fontSize: limitedInputFontSize fontSize: limitedInputFontSize)),
)),
), ),
], ],
), ),

View File

@ -38,8 +38,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
return Builder( return Builder(
builder: (context) { builder: (context) {
if (widget.uploadedFiles != null && if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) {
widget.uploadedFiles!.bytes!.isNotEmpty) {
{ {
return InkWell( return InkWell(
splashColor: Colors.transparent, splashColor: Colors.transparent,
@ -49,8 +48,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
onTap: () async { onTap: () async {
setState(() { setState(() {
widget.isUploading = false; widget.isUploading = false;
widget.uploadedFiles = widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([]));
FFUploadedFile(bytes: Uint8List.fromList([]));
widget.onUploadComplete(widget.uploadedFiles!); widget.onUploadComplete(widget.uploadedFiles!);
}); });
}, },
@ -87,9 +85,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
try { try {
final message = FFLocalizations.of(context) final message = FFLocalizations.of(context)
.getVariableText( .getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...');
enText: 'Uploading file...',
ptText: 'Enviando arquivo...');
showUploadMessage( showUploadMessage(
context, context,
message, message,
@ -108,27 +104,24 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
ScaffoldMessenger.of(context).hideCurrentSnackBar(); ScaffoldMessenger.of(context).hideCurrentSnackBar();
widget.isUploading = false; widget.isUploading = false;
} }
if (selectedUploadedFiles.length == if (selectedUploadedFiles.length == selectedMedia.length) {
selectedMedia.length) {
setState(() { setState(() {
widget.uploadedFiles = selectedUploadedFiles.first; widget.uploadedFiles = selectedUploadedFiles.first;
}); });
widget.onUploadComplete(widget.uploadedFiles!); widget.onUploadComplete(widget.uploadedFiles!);
final message = FFLocalizations.of(context) final message =
.getVariableText( FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!');
enText: 'Success!', ptText: 'Sucesso!');
showUploadMessage(context, message); showUploadMessage(context, message);
} else { } else {
setState(() { setState(() {
_isLoading = false; _isLoading = false;
}); });
final message = FFLocalizations.of(context) final message = FFLocalizations.of(context)
.getVariableText( .getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados');
enText: 'Failed to upload data',
ptText: 'Falha ao enviar dados');
showUploadMessage(context, message); showUploadMessage(context, message);
return; return;
} }else{ }
} else {
setState(() { setState(() {
_isLoading = false; _isLoading = false;
}); });
@ -154,41 +147,30 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
width: 30.0, width: 30.0,
height: 30.0, height: 30.0,
child: CircularProgressIndicator( child: CircularProgressIndicator(
valueColor: valueColor: AlwaysStoppedAnimation<Color>(
AlwaysStoppedAnimation<Color>( FlutterFlowTheme.of(context).primary,
FlutterFlowTheme.of(context)
.primary,
), ),
), ),
) )
: Icon( : Icon(
Icons.photo_camera, Icons.photo_camera,
color: FlutterFlowTheme.of(context) color: FlutterFlowTheme.of(context).primary,
.primary,
size: 30.0, size: 30.0,
), ),
Padding( Padding(
padding: padding: const EdgeInsets.fromLTRB(0, 15, 0, 0),
const EdgeInsets.fromLTRB(0, 15, 0, 0),
child: Text( child: Text(
FFLocalizations.of(context).getText( FFLocalizations.of(context).getText(
'p4ftwxcy', 'p4ftwxcy',
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).titleSmall.override(
.titleSmall fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
.override( color: FlutterFlowTheme.of(context).primaryText,
fontFamily:
FlutterFlowTheme.of(context)
.titleSmallFamily,
color: FlutterFlowTheme.of(context)
.primaryText,
fontSize: limitedInputTextSize, fontSize: limitedInputTextSize,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts:
.containsKey( GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
FlutterFlowTheme.of(context)
.titleSmallFamily),
), ),
), ),
) )

View File

@ -78,8 +78,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
context.pop(filterResult); context.pop(filterResult);
} }
Widget _buildCheckboxListTile( Widget _buildCheckboxListTile(String key, List<Map<String, String>> options, double fontsize) {
String key, List<Map<String, String>> options, double fontsize) {
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
return Column( return Column(
children: [ children: [
@ -169,7 +168,6 @@ class _OptModalWidgetState extends State<OptModalWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
double screenWidth = MediaQuery.of(context).size.width; double screenWidth = MediaQuery.of(context).size.width;
return Center( return Center(
child: Container( child: Container(
width: screenWidth - (screenWidth * 0.35), width: screenWidth - (screenWidth * 0.35),
@ -193,8 +191,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
style: FlutterFlowTheme.of(context).headlineMedium.override( style: FlutterFlowTheme.of(context).headlineMedium.override(
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: LimitedFontSizeUtil.getHeaderFontSize( fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
context),
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
useGoogleFonts: useGoogleFonts:
@ -223,14 +220,15 @@ class _OptModalWidgetState extends State<OptModalWidget> {
foregroundColor: FlutterFlowTheme.of(context).info, foregroundColor: FlutterFlowTheme.of(context).info,
backgroundColor: FlutterFlowTheme.of(context).primary, backgroundColor: FlutterFlowTheme.of(context).primary,
), ),
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: FlutterFlowTheme.of(context).bodyMedium.override( child: Text(FFLocalizations.of(context).getText('88kshkph'),
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).info, color: FlutterFlowTheme.of(context).info,
fontSize: LimitedFontSizeUtil.getInputFontSize(context), fontSize: LimitedFontSizeUtil.getInputFontSize(context),
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts:
FlutterFlowTheme.of(context).bodyMediumFamily), GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
)), )),
), ),
], ],

View File

@ -29,13 +29,11 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
late Map<String, dynamic> selected; late Map<String, dynamic> selected;
final List<Map<String, String>> adresseeTypeOptions = [ final List<Map<String, String>> adresseeTypeOptions = [
{ {
'title': 'title': FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Resident', ptText: 'Morador'),
FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Resident', ptText: 'Morador'),
'value': 'MOR' 'value': 'MOR'
}, },
{ {
'title': FFLocalizations.of(StorageHelper().context!) 'title': FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Property', ptText: 'Propriedade'),
.getVariableText(enText: 'Property', ptText: 'Propriedade'),
'value': 'PRO' 'value': 'PRO'
}, },
]; ];
@ -46,8 +44,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
'value': 'notPickedUp' 'value': 'notPickedUp'
}, },
{ {
'title': 'title': FFLocalizations.of(StorageHelper().context!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
FFLocalizations.of(StorageHelper().context!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
'value': 'pickedUp' 'value': 'pickedUp'
}, },
]; ];
@ -213,8 +210,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
_buildCheckboxListTile( _buildCheckboxListTile('adresseeType', adresseeTypeOptions, limitedBodyFontSize),
'adresseeType', adresseeTypeOptions, limitedBodyFontSize),
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize), _buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
], ],
), ),
@ -227,7 +223,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
foregroundColor: FlutterFlowTheme.of(context).info, foregroundColor: FlutterFlowTheme.of(context).info,
backgroundColor: FlutterFlowTheme.of(context).primary, backgroundColor: FlutterFlowTheme.of(context).primary,
), ),
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: TextStyle(fontSize: limitedBodyFontSize)), child: Text(FFLocalizations.of(context).getText('88kshkph'),
style: TextStyle(fontSize: limitedBodyFontSize)),
), ),
], ],
), ),

View File

@ -92,7 +92,9 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
super.dispose(); super.dispose();
} }
@override Widget build(BuildContext context) {
@override
Widget build(BuildContext context) {
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
return InkWell( return InkWell(
@ -139,7 +141,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), useGoogleFonts:
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
), ),
), ),
Padding( Padding(
@ -151,7 +154,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
style: FlutterFlowTheme.of(context).bodyMedium.override( style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), useGoogleFonts:
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedBodyFontSize, fontSize: limitedBodyFontSize,
), ),
), ),

View File

@ -53,8 +53,14 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
SnackBar( SnackBar(
content: Text( content: Text(
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data.",), FFLocalizations.of(context).getVariableText(
style: TextStyle(color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context),), ptText: "Não há mais dados.",
enText: "No more data.",
),
style: TextStyle(
color: Colors.white,
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
),
), ),
duration: const Duration(seconds: 3), duration: const Duration(seconds: 3),
backgroundColor: FlutterFlowTheme.of(context).primary, backgroundColor: FlutterFlowTheme.of(context).primary,
@ -100,8 +106,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage); await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage);
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage); await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage);
await StorageHelper() await StorageHelper().set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
.set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
context.pop(); context.pop();
return response; return response;
@ -192,8 +197,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
if (local['CLU_STATUS'] == 'A') { if (local['CLU_STATUS'] == 'A') {
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage); await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage);
await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage); await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage);
await StorageHelper() await StorageHelper().set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
.set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
context.pop(); context.pop();
} else if (local['CLU_STATUS'] == 'B') { } else if (local['CLU_STATUS'] == 'B') {

View File

@ -90,8 +90,8 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
highlightColor: Colors.transparent, highlightColor: Colors.transparent,
onTap: () async { onTap: () async {
await LocalizationService.selectLocal(context).then( await LocalizationService.selectLocal(context)
(value) => value == true ? onUpdate() : null); .then((value) => value == true ? onUpdate() : null);
}, },
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(200.0), borderRadius: BorderRadius.circular(200.0),
@ -143,8 +143,7 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
fontSize: limitedFontSize, fontSize: limitedFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
GoogleFonts.asMap().containsKey('Nunito'),
), ),
), ),
), ),

View File

@ -52,7 +52,11 @@ class _MenuStaggeredViewComponentWidgetState extends State<MenuStaggeredViewComp
Widget build(BuildContext context) { Widget build(BuildContext context) {
final textScaler = MediaQuery.textScalerOf(context); final textScaler = MediaQuery.textScalerOf(context);
final double scaledFontSize = 14 * textScaler.scale(1); final double scaledFontSize = 14 * textScaler.scale(1);
final int crossAxisCount = scaledFontSize >= 26 ? 1 : scaledFontSize >= 18 ? 2 : 3; final int crossAxisCount = scaledFontSize >= 26
? 1
: scaledFontSize >= 18
? 2
: 3;
return Column( return Column(
children: [ children: [

View File

@ -8,7 +8,6 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart';
import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/limited_text_size.dart';
class DetailsComponentWidget extends StatefulWidget { class DetailsComponentWidget extends StatefulWidget {
const DetailsComponentWidget({ const DetailsComponentWidget({
Key? key, Key? key,
@ -175,7 +174,6 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
return TextFormField( return TextFormField(
readOnly: true, readOnly: true,
initialValue: '$value', initialValue: '$value',
style: FlutterFlowTheme.of(context).bodyMedium.override( style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
@ -185,9 +183,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
), ),
fontSize: limitedBodyFontSize, fontSize: limitedBodyFontSize,
), ),
decoration: InputDecoration( decoration: InputDecoration(
labelText: key, labelText: key,
filled: true, filled: true,
fillColor: FlutterFlowTheme.of(context).primaryBackground, fillColor: FlutterFlowTheme.of(context).primaryBackground,
@ -204,14 +200,9 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context).labelMediumFamily, FlutterFlowTheme.of(context).labelMediumFamily,
), ),
), ),
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
hintStyle: FlutterFlowTheme.of(context) fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
.labelMedium
.override(
fontFamily:
FlutterFlowTheme.of(context).labelMediumFamily,
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts: GoogleFonts.asMap().containsKey(

View File

@ -83,8 +83,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
tablet: false, tablet: false,
)) ))
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
16.0, 0.0, 16.0, 8.0),
child: InkWell( child: InkWell(
key: const ValueKey<String>('BackButton'), key: const ValueKey<String>('BackButton'),
splashColor: Colors.transparent, splashColor: Colors.transparent,
@ -98,8 +97,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
const Padding( const Padding(
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
0.0, 12.0, 0.0, 12.0),
child: Icon( child: Icon(
Icons.arrow_back_rounded, Icons.arrow_back_rounded,
color: Color(0xFF15161E), color: Color(0xFF15161E),
@ -107,20 +105,16 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
12.0, 0.0, 0.0, 0.0),
child: Text( child: Text(
'', '',
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).bodyMedium.override(
.bodyMedium
.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: const Color(0xFF15161E), color: const Color(0xFF15161E),
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -129,36 +123,30 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
), ),
), ),
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
child: Text( child: Text(
FFLocalizations.of(context) FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
.getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
style: FlutterFlowTheme.of(context).headlineMedium.override( style: FlutterFlowTheme.of(context).headlineMedium.override(
fontFamily: 'Outfit', fontFamily: 'Outfit',
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
GoogleFonts.asMap().containsKey('Outfit'),
), ),
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
16.0, 4.0, 16.0, 4.0),
child: Text( child: Text(
FFLocalizations.of(context).getText( FFLocalizations.of(context).getText('wu2f7yzo' /* Não se preucupe nós vamos te a... */),
'wu2f7yzo' /* Não se preucupe nós vamos te a... */),
style: FlutterFlowTheme.of(context).labelMedium.override( style: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedSubHeaderFontSize, fontSize: limitedSubHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -166,8 +154,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
key: _model.formKey, key: _model.formKey,
autovalidateMode: AutovalidateMode.onUserInteraction, autovalidateMode: AutovalidateMode.onUserInteraction,
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
16.0, 12.0, 16.0, 0.0),
child: SizedBox( child: SizedBox(
width: double.infinity, width: double.infinity,
child: TextFormField( child: TextFormField(
@ -184,17 +171,14 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
obscureText: false, obscureText: false,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
labelText: FFLocalizations.of(context) labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */),
.getText('mtz8l7ft' /* E-mail */), labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
labelStyle:
FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).primary, color: FlutterFlowTheme.of(context).primary,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: const BorderSide( borderSide: const BorderSide(
@ -224,8 +208,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
), ),
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
contentPadding: const EdgeInsetsDirectional.fromSTEB( contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
24.0, 24.0, 20.0, 24.0),
suffixIcon: Icon( suffixIcon: Icon(
Icons.email, Icons.email,
color: FlutterFlowTheme.of(context).primary, color: FlutterFlowTheme.of(context).primary,
@ -238,14 +221,12 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
maxLines: null, maxLines: null,
keyboardType: TextInputType.emailAddress, keyboardType: TextInputType.emailAddress,
cursorColor: FlutterFlowTheme.of(context).primary, cursorColor: FlutterFlowTheme.of(context).primary,
validator: _model.emailAddressTextControllerValidator validator: _model.emailAddressTextControllerValidator.asValidator(context),
.asValidator(context),
), ),
), ),
), ),
@ -253,45 +234,37 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
Align( Align(
alignment: const AlignmentDirectional(0.0, 0.0), alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
0.0, 24.0, 0.0, 0.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey<String>('SendButtonWidget'), key: const ValueKey<String>('SendButtonWidget'),
onPressed: (_model.emailAddressTextController.text == onPressed: (_model.emailAddressTextController.text == '' ||
'' || !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
!ValidatorUtil.isValidEmail(
_model.emailAddressTextController.text))
? null ? null
: () async => AuthenticationService.forgotPassword( : () async =>
context, _model.emailAddressTextController.text), AuthenticationService.forgotPassword(context, _model.emailAddressTextController.text),
text: FFLocalizations.of(context).getText( text: FFLocalizations.of(context).getText(
'74rnd5bu' /* Enviar */, '74rnd5bu' /* Enviar */,
), ),
options: FFButtonOptions( options: FFButtonOptions(
width: 270.0, width: 270.0,
height: 50.0, height: 50.0,
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
0.0, 0.0, 0.0, 0.0), iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context).primary, color: FlutterFlowTheme.of(context).primary,
textStyle: textStyle: FlutterFlowTheme.of(context).titleSmall.override(
FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: Colors.white, color: Colors.white,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
elevation: 3.0, elevation: 3.0,
borderSide: const BorderSide( borderSide: const BorderSide(
color: Colors.transparent, color: Colors.transparent,
width: 1.0, width: 1.0,
), ),
disabledColor: disabledColor: FlutterFlowTheme.of(context).customColor5,
FlutterFlowTheme.of(context).customColor5,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
), ),
showLoadingIndicator: true, showLoadingIndicator: true,

View File

@ -70,11 +70,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
FFLocalizations.of(context).getText('uj8acuab'), FFLocalizations.of(context).getText('uj8acuab'),
textAlign: TextAlign.start, textAlign: TextAlign.start,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).bodyMedium.override(
.bodyMedium fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
.override(
fontFamily: FlutterFlowTheme.of(context)
.bodyMediumFamily,
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -105,9 +102,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey( .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
FlutterFlowTheme.of(context)
.bodyMediumFamily),
fontSize: limitedSubHeaderFontSize, fontSize: limitedSubHeaderFontSize,
), ),
), ),
@ -156,27 +151,16 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 0.0, 0.0),
.fromSTEB(15.0, 0.0, 0.0, 0.0),
child: Text( child: Text(
model.cliName, model.cliName,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 1, maxLines: 1,
style: style: FlutterFlowTheme.of(context).bodyMedium.override(
FlutterFlowTheme.of(context) fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts useGoogleFonts: GoogleFonts.asMap()
.asMap() .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
fontSize: limitedBodyFontSize, fontSize: limitedBodyFontSize,
), ),
), ),
@ -209,9 +193,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey( .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
FlutterFlowTheme.of(context)
.bodyMediumFamily),
fontSize: limitedSubHeaderFontSize, fontSize: limitedSubHeaderFontSize,
), ),
), ),
@ -260,7 +242,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily), .containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
@ -299,14 +280,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts useGoogleFonts: GoogleFonts.asMap()
.asMap() .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
textAlign: TextAlign.start, textAlign: TextAlign.start,
maxLines: null, maxLines: null,
@ -352,7 +328,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
@ -393,7 +368,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
textAlign: TextAlign.start, textAlign: TextAlign.start,
validator: model.dateTimeTextControllerValidator.asValidator(context), validator: model.dateTimeTextControllerValidator.asValidator(context),
@ -537,7 +511,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
child: TextFormField( child: TextFormField(
controller: model.notesTextController, controller: model.notesTextController,
focusNode: model.notesFocusNode, focusNode: model.notesFocusNode,
autofocus: false, autofocus: false,
showCursor: true, showCursor: true,
cursorColor: FlutterFlowTheme.of(context).primary, cursorColor: FlutterFlowTheme.of(context).primary,
@ -545,43 +518,20 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
obscureText: false, obscureText: false,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
counterStyle: FlutterFlowTheme counterStyle: FlutterFlowTheme.of(context).bodyText1.override(
.of(context) fontFamily: FlutterFlowTheme.of(context).bodyText1Family,
.bodyText1 color: FlutterFlowTheme.of(context).primaryText,
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyText1Family,
color: FlutterFlowTheme.of(
context)
.primaryText,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
labelText: labelText: FFLocalizations.of(context).getText(
FFLocalizations.of(
context)
.getText(
'cw8b3tbb' /* Observação da Visita */, 'cw8b3tbb' /* Observação da Visita */,
), ),
labelStyle: FlutterFlowTheme labelStyle: FlutterFlowTheme.of(context).bodyMedium.override(
.of(context) fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
.bodyMedium color: FlutterFlowTheme.of(context).primaryText,
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
color: FlutterFlowTheme
.of(context)
.primaryText,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts useGoogleFonts: GoogleFonts.asMap().containsKey(
.asMap() FlutterFlowTheme.of(context).bodyMediumFamily),
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
hintStyle: FlutterFlowTheme.of(context).labelMedium.override( hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
@ -632,7 +582,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
textAlign: TextAlign.start, textAlign: TextAlign.start,
maxLines: 3, maxLines: 3,
@ -697,12 +646,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
showLoadingIndicator: true, showLoadingIndicator: true,
text: FFLocalizations.of(context).getText('bv5fg9sv' /* Enviar */), text: FFLocalizations.of(context).getText('bv5fg9sv' /* Enviar */),
options: FFButtonOptions( options: FFButtonOptions(
height: 30.0 * MediaQuery.textScalerOf(context).scale(1), height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
24.0, 0.0, 24.0, 0.0), iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context).primary, color: FlutterFlowTheme.of(context).primary,
textStyle: FlutterFlowTheme.of(context).titleSmall.override( textStyle: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily, fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
@ -712,7 +658,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily), GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
elevation: 3.0, elevation: 3.0,
borderSide: const BorderSide(color: Colors.transparent, width: 1.0), borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),

View File

@ -51,7 +51,6 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Align( return Align(
alignment: const AlignmentDirectional(0.0, 1.0), alignment: const AlignmentDirectional(0.0, 1.0),
child: Container( child: Container(
@ -84,8 +83,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
tablet: false, tablet: false,
)) ))
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
child: InkWell( child: InkWell(
splashColor: Colors.transparent, splashColor: Colors.transparent,
focusColor: Colors.transparent, focusColor: Colors.transparent,
@ -98,8 +96,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
const Padding( const Padding(
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
0.0, 12.0, 0.0, 12.0),
child: Icon( child: Icon(
Icons.arrow_back_rounded, Icons.arrow_back_rounded,
color: Color(0xFF15161E), color: Color(0xFF15161E),
@ -107,19 +104,16 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
12.0, 0.0, 0.0, 0.0),
child: Text( child: Text(
'', '',
style: style: FlutterFlowTheme.of(context).bodyMedium.override(
FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: const Color(0xFF15161E), color: const Color(0xFF15161E),
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14), fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -128,8 +122,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
), ),
), ),
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
child: Text( child: Text(
FFLocalizations.of(context).getText( FFLocalizations.of(context).getText(
'h1xilful' /* DIGITE A SUA SENHA */, 'h1xilful' /* DIGITE A SUA SENHA */,
@ -145,8 +138,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
), ),
), ),
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
child: Text( child: Text(
FFLocalizations.of(context).getText( FFLocalizations.of(context).getText(
'ujodm2ci' /* Para gerar o QR Code digite a ... */, 'ujodm2ci' /* Para gerar o QR Code digite a ... */,
@ -157,8 +149,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 14, 14, 12), fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 14, 14, 12),
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -166,8 +157,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
key: _model.formKey, key: _model.formKey,
autovalidateMode: AutovalidateMode.onUserInteraction, autovalidateMode: AutovalidateMode.onUserInteraction,
child: Padding( child: Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
child: TextFormField( child: TextFormField(
controller: _model.keyTextFieldTextController, controller: _model.keyTextFieldTextController,
focusNode: _model.keyTextFieldFocusNode, focusNode: _model.keyTextFieldFocusNode,
@ -186,29 +176,24 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
labelText: FFLocalizations.of(context).getText( labelText: FFLocalizations.of(context).getText(
'rfqrdet7' /* Senha */, 'rfqrdet7' /* Senha */,
), ),
labelStyle: labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: LimitedFontSizeUtil.getInputFontSize(context), fontSize: LimitedFontSizeUtil.getInputFontSize(context),
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
hintText: FFLocalizations.of(context).getText( hintText: FFLocalizations.of(context).getText(
'zz1haydj' /* digite a sua senha..... */, 'zz1haydj' /* digite a sua senha..... */,
), ),
hintStyle: hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: LimitedFontSizeUtil.getInputFontSize(context), fontSize: LimitedFontSizeUtil.getInputFontSize(context),
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
@ -276,12 +261,10 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
Align( Align(
alignment: const AlignmentDirectional(0.0, 0.0), alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding( child: Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
child: FFButtonWidget( child: FFButtonWidget(
onPressed: () async { onPressed: () async {
if (_model.formKey.currentState == null || if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
!_model.formKey.currentState!.validate()) {
return; return;
} }
await widget.toggleActionStatus?.call( await widget.toggleActionStatus?.call(
@ -295,10 +278,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
options: FFButtonOptions( options: FFButtonOptions(
width: 270.0, width: 270.0,
height: 50.0, height: 50.0,
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
0.0, 0.0, 0.0, 0.0), iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: const Color(0xFF1AAB5F), color: const Color(0xFF1AAB5F),
textStyle: FlutterFlowTheme.of(context).titleSmall.override( textStyle: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
@ -306,8 +287,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
fontSize: LimitedFontSizeUtil.getInputFontSize(context), fontSize: LimitedFontSizeUtil.getInputFontSize(context),
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
elevation: 3.0, elevation: 3.0,
borderSide: const BorderSide( borderSide: const BorderSide(

View File

@ -114,7 +114,6 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context); double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
@ -144,8 +143,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
Align( Align(
alignment: const AlignmentDirectional(-1.0, 0.0), alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 15.0),
24.0, 0.0, 24.0, 15.0),
child: Text( child: Text(
FFLocalizations.of(context).getText( FFLocalizations.of(context).getText(
'zazj5d8b' /* Preencha o formulário com os d... */, 'zazj5d8b' /* Preencha o formulário com os d... */,
@ -190,14 +188,11 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily), GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
hintStyle: hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
FlutterFlowTheme.of(context).labelMedium.override( fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
fontFamily: FlutterFlowTheme.of(context)
.labelMediumFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts:
.containsKey(FlutterFlowTheme.of(context) GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
.labelMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
@ -241,8 +236,8 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts:
FlutterFlowTheme.of(context).bodyMediumFamily), GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
onChanged: (value) { onChanged: (value) {
@ -472,8 +467,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
), ),
); );
} else { } else {
return Stack( return Stack(children: [
children: [
MediaUploadButtonUtil( MediaUploadButtonUtil(
onUploadComplete: (uploadedFile) { onUploadComplete: (uploadedFile) {
setState(() { setState(() {
@ -486,8 +480,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
), ),
uploadedFiles: _model.uploadedLocalFile, uploadedFiles: _model.uploadedLocalFile,
), ),
] ]);
);
} }
}, },
), ),
@ -718,11 +711,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(
ptText: 'Visitante cadastrado com sucesso.', ptText: 'Visitante cadastrado com sucesso.',
enText: 'Visitor successfully registered.'), enText: 'Visitor successfully registered.'),
style: TextStyle(color: FlutterFlowTheme.of(context).info, style: TextStyle(
color: FlutterFlowTheme.of(context).info,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
) )),
),
backgroundColor: FlutterFlowTheme.of(context).primary, backgroundColor: FlutterFlowTheme.of(context).primary,
duration: const Duration(seconds: 3), duration: const Duration(seconds: 3),
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,

View File

@ -99,10 +99,8 @@ class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentW
} }
bool _isFormInvalid() { bool _isFormInvalid() {
if (_model.emailAddressTextController.text == '' || if (_model.emailAddressTextController.text == '' || _model.passwordTextController.text == '') return true;
_model.passwordTextController.text == '') return true; if (!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) return true;
if (!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
return true;
return false; return false;
} }
@ -135,17 +133,13 @@ class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentW
enText: 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT', enText: 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
), ),
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).displaySmall.override(
.displaySmall
.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: color: FlutterFlowTheme.of(context).primaryText,
FlutterFlowTheme.of(context).primaryText,
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -157,8 +151,7 @@ class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentW
decoration: const BoxDecoration(), decoration: const BoxDecoration(),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),
child: const AtomImageSvgTheme( child: const AtomImageSvgTheme(filename: 'login', width: 600, height: 155),
filename: 'login', width: 600, height: 155),
), ),
), ),
Column( Column(
@ -167,16 +160,14 @@ class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentW
Align( Align(
alignment: const AlignmentDirectional(0.0, 0.0), alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(34.0, 0.0, 34.0, 0.0),
34.0, 0.0, 34.0, 0.0),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
constraints: const BoxConstraints( constraints: const BoxConstraints(
maxWidth: 570.0, maxWidth: 570.0,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: FlutterFlowTheme.of(context) color: FlutterFlowTheme.of(context).primaryBackground,
.primaryBackground,
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
), ),
@ -190,315 +181,170 @@ class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentW
children: [ children: [
Form( Form(
key: _model.formKey, key: _model.formKey,
autovalidateMode: autovalidateMode: AutovalidateMode.onUserInteraction,
AutovalidateMode.onUserInteraction,
child: Column( child: Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Padding( Padding(
padding: const EdgeInsetsDirectional padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
.fromSTEB(0.0, 0.0, 0.0, 16.0),
child: SizedBox( child: SizedBox(
width: double.infinity, width: double.infinity,
child: TextFormField( child: TextFormField(
key: const ValueKey<String>( key: const ValueKey<String>('emailTextFormField'),
'emailTextFormField'), controller: _model.emailAddressTextController,
controller: _model focusNode: _model.emailAddressFocusNode,
.emailAddressTextController, cursorColor: FlutterFlowTheme.of(context).primary,
focusNode: _model onChanged: (_) => EasyDebounce.debounce(
.emailAddressFocusNode,
cursorColor:
FlutterFlowTheme.of(context)
.primary,
onChanged: (_) =>
EasyDebounce.debounce(
'_model.emailAddressTextController', '_model.emailAddressTextController',
const Duration( const Duration(milliseconds: 500),
milliseconds: 500),
() => setState(() {}), () => setState(() {}),
), ),
autofocus: true, autofocus: true,
autofillHints: const [ autofillHints: const [AutofillHints.email],
AutofillHints.email textCapitalization: TextCapitalization.none,
], textInputAction: TextInputAction.next,
textCapitalization:
TextCapitalization.none,
textInputAction:
TextInputAction.next,
obscureText: false, obscureText: false,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
labelText: FFLocalizations.of( labelText: FFLocalizations.of(context).getText(
context)
.getText(
'1ltg0ylb' /* Email */, '1ltg0ylb' /* Email */,
), ),
labelStyle: FlutterFlowTheme labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
.of(context) fontFamily: 'Plus Jakarta Sans',
.labelLarge color: FlutterFlowTheme.of(context).primaryText,
.override(
fontFamily:
'Plus Jakarta Sans',
color:
FlutterFlowTheme.of(
context)
.primaryText,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: fontWeight: FontWeight.w500,
FontWeight.w500, useGoogleFonts:
useGoogleFonts: GoogleFonts GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.asMap()
.containsKey(
'Plus Jakarta Sans'),
), ),
enabledBorder: enabledBorder: OutlineInputBorder(
OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: color: FlutterFlowTheme.of(context).customColor1,
FlutterFlowTheme.of(
context)
.customColor1,
width: 0.25, width: 0.25,
), ),
borderRadius: borderRadius: BorderRadius.circular(12.0),
BorderRadius.circular(
12.0),
), ),
focusedBorder: focusedBorder: OutlineInputBorder(
OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: color: FlutterFlowTheme.of(context).success,
FlutterFlowTheme.of(
context)
.success,
width: 0.25, width: 0.25,
), ),
borderRadius: borderRadius: BorderRadius.circular(12.0),
BorderRadius.circular(
12.0),
), ),
errorBorder: errorBorder: OutlineInputBorder(
OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: color: FlutterFlowTheme.of(context).error,
FlutterFlowTheme.of(
context)
.error,
width: 0.25, width: 0.25,
), ),
borderRadius: BorderRadius.circular(12.0),
borderRadius:
BorderRadius.circular(
12.0),
), ),
errorStyle: TextStyle( errorStyle: TextStyle(
color: color: FlutterFlowTheme.of(context).error,
FlutterFlowTheme.of(
context)
.error,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
focusedErrorBorder: focusedErrorBorder: OutlineInputBorder(
OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: color: FlutterFlowTheme.of(context).error,
FlutterFlowTheme.of(
context)
.error,
width: 0.25, width: 0.25,
), ),
borderRadius: borderRadius: BorderRadius.circular(12.0),
BorderRadius.circular(
12.0),
), ),
suffixIcon: Icon( suffixIcon: Icon(
Icons.email, Icons.email,
color: FlutterFlowTheme.of( color: FlutterFlowTheme.of(context).accent1,
context)
.accent1,
size: 22.0, size: 22.0,
), ),
), ),
style: style: FlutterFlowTheme.of(context).bodyLarge.override(
FlutterFlowTheme.of(context) fontFamily: 'Plus Jakarta Sans',
.bodyLarge color: FlutterFlowTheme.of(context).primaryText,
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme
.of(context)
.primaryText,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: fontWeight: FontWeight.w500,
FontWeight.w500,
useGoogleFonts: useGoogleFonts:
GoogleFonts GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.asMap()
.containsKey(
'Plus Jakarta Sans'),
), ),
keyboardType: keyboardType: TextInputType.emailAddress,
TextInputType.emailAddress, validator:
validator: _model _model.emailAddressTextControllerValidator.asValidator(context),
.emailAddressTextControllerValidator
.asValidator(context),
), ),
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
.fromSTEB(0.0, 0.0, 0.0, 16.0),
child: SizedBox( child: SizedBox(
width: double.infinity, width: double.infinity,
child: TextFormField( child: TextFormField(
key: const ValueKey<String>( key: const ValueKey<String>('passwordTextFormField'),
'passwordTextFormField'), controller: _model.passwordTextController,
controller: _model cursorColor: FlutterFlowTheme.of(context).primary,
.passwordTextController, focusNode: _model.passwordFocusNode,
cursorColor: onChanged: (_) => EasyDebounce.debounce('_model.passwordTextController',
FlutterFlowTheme.of(context) const Duration(milliseconds: 500), () => setState(() {})),
.primary,
focusNode:
_model.passwordFocusNode,
onChanged: (_) =>
EasyDebounce.debounce(
'_model.passwordTextController',
const Duration(
milliseconds: 500),
() => setState(() {})),
autofocus: true, autofocus: true,
autofillHints: const [ autofillHints: const [AutofillHints.password],
AutofillHints.password textInputAction: TextInputAction.send,
], obscureText: !_model.passwordVisibility,
textInputAction:
TextInputAction.send,
obscureText:
!_model.passwordVisibility,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
labelText: FFLocalizations.of( labelText:
context) FFLocalizations.of(context).getText('2x19ce8k' /* Senha */),
.getText( labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
'2x19ce8k' /* Senha */), fontFamily: 'Plus Jakarta Sans',
labelStyle: FlutterFlowTheme color: FlutterFlowTheme.of(context).primaryText,
.of(context)
.labelLarge
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme
.of(context)
.primaryText,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: fontWeight: FontWeight.w500,
FontWeight.w500,
useGoogleFonts: useGoogleFonts:
GoogleFonts GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
.asMap() enabledBorder: OutlineInputBorder(
.containsKey(
'Plus Jakarta Sans')),
enabledBorder:
OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: color: FlutterFlowTheme.of(context).customColor1, width: 0.25),
FlutterFlowTheme.of( borderRadius: BorderRadius.circular(12.0),
context)
.customColor1,
width: 0.25),
borderRadius:
BorderRadius.circular(
12.0),
), ),
errorStyle: TextStyle( errorStyle: TextStyle(
color: color: FlutterFlowTheme.of(context).error,
FlutterFlowTheme.of(
context)
.error,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: borderSide:
const BorderSide( const BorderSide(color: Color(0xFF1AAB5F), width: 0.25),
color: Color( borderRadius: BorderRadius.circular(12.0)),
0xFF1AAB5F), errorBorder: OutlineInputBorder(
width: 0.25), borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25),
borderRadius: borderRadius: BorderRadius.circular(12.0),
BorderRadius.circular(
12.0)),
errorBorder:
OutlineInputBorder(
borderSide:
const BorderSide(
color: Color(
0xFFFF5963),
width: 0.25),
borderRadius:
BorderRadius.circular(
12.0),
), ),
focusedErrorBorder: focusedErrorBorder: OutlineInputBorder(
OutlineInputBorder( borderSide: const BorderSide(color: Color(0xFFFF5963), width: 0.25),
borderSide: borderRadius: BorderRadius.circular(12.0),
const BorderSide(
color: Color(
0xFFFF5963),
width: 0.25),
borderRadius:
BorderRadius.circular(
12.0),
), ),
filled: true, filled: true,
fillColor: fillColor: FlutterFlowTheme.of(context).primaryBackground,
FlutterFlowTheme.of(
context)
.primaryBackground,
suffixIcon: InkWell( suffixIcon: InkWell(
onTap: () => setState(() => onTap: () => setState(
_model.passwordVisibility = () => _model.passwordVisibility = !_model.passwordVisibility),
!_model focusNode: FocusNode(skipTraversal: true),
.passwordVisibility),
focusNode: FocusNode(
skipTraversal: true),
child: Icon( child: Icon(
_model.passwordVisibility _model.passwordVisibility
? Icons ? Icons.visibility_outlined
.visibility_outlined : Icons.visibility_off_outlined,
: Icons color: FlutterFlowTheme.of(context).accent1,
.visibility_off_outlined,
color:
FlutterFlowTheme.of(
context)
.accent1,
size: 24.0), size: 24.0),
), ),
), ),
style: style: FlutterFlowTheme.of(context).bodyLarge.override(
FlutterFlowTheme.of(context) fontFamily: 'Plus Jakarta Sans',
.bodyLarge color: FlutterFlowTheme.of(context).primaryText,
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme
.of(context)
.primaryText,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: fontWeight: FontWeight.w500,
FontWeight.w500,
useGoogleFonts: useGoogleFonts:
GoogleFonts GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.asMap()
.containsKey(
'Plus Jakarta Sans'),
), ),
validator: _model validator: _model.passwordTextControllerValidator.asValidator(context),
.passwordTextControllerValidator
.asValidator(context),
), ),
), ),
), ),
@ -507,151 +353,77 @@ class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentW
), ),
Builder( Builder(
builder: (context) { builder: (context) {
if (MediaQuery.sizeOf(context).width < if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
kBreakpointSmall
? true
: false) {
return Column( return Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
const EdgeInsetsDirectional
.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey<String>( key: const ValueKey<String>('SubmitButtonWidget'),
'SubmitButtonWidget'),
onPressed: _isFormInvalid() onPressed: _isFormInvalid()
? null ? null
: () async { : () async {
await AuthenticationService await AuthenticationService.signIn(
.signIn(
context, context,
_model, _model,
emailAdress: _model emailAdress: _model.emailAddressTextController.text,
.emailAddressTextController password: _model.passwordTextController.text,
.text,
password: _model
.passwordTextController
.text,
); );
setState(() {}); setState(() {});
}, },
text: FFLocalizations.of( text: FFLocalizations.of(context).getText('k44tm7wo' /* Entrar */),
context)
.getText(
'k44tm7wo' /* Entrar */),
options: FFButtonOptions( options: FFButtonOptions(
width: double.infinity, width: double.infinity,
height: 44.0, height: 44.0,
padding: padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
const EdgeInsetsDirectional
.fromSTEB(
0.0, 0.0, 0.0, 0.0),
iconPadding: iconPadding:
const EdgeInsetsDirectional const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
.fromSTEB( color: FlutterFlowTheme.of(context).primary,
0.0, 0.0, 0.0, 0.0), textStyle: FlutterFlowTheme.of(context).titleSmall.override(
color: FlutterFlowTheme.of( fontFamily: 'Plus Jakarta Sans',
context) color: FlutterFlowTheme.of(context).info,
.primary,
textStyle: FlutterFlowTheme
.of(context)
.titleSmall
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme
.of(context)
.info,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: fontWeight: FontWeight.w500,
FontWeight.w500,
useGoogleFonts: useGoogleFonts:
GoogleFonts GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
.asMap()
.containsKey(
'Plus Jakarta Sans')),
elevation: 3.0, elevation: 3.0,
borderSide: borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
const BorderSide( borderRadius: BorderRadius.circular(12.0),
color: Colors disabledColor: FlutterFlowTheme.of(context).customColor5,
.transparent, disabledTextColor: Colors.white,
width: 1.0),
borderRadius:
BorderRadius.circular(
12.0),
disabledColor:
FlutterFlowTheme.of(
context)
.customColor5,
disabledTextColor:
Colors.white,
), ),
showLoadingIndicator: false, showLoadingIndicator: false,
), ),
), ),
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
const EdgeInsetsDirectional
.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey<String>( key: const ValueKey<String>('toggleSignUpPage'),
'toggleSignUpPage'), onPressed: () async => await widget.toggleSignUpPage?.call(),
onPressed: () async => text: FFLocalizations.of(context).getText(
await widget
.toggleSignUpPage
?.call(),
text: FFLocalizations.of(
context)
.getText(
'14u7ipws' /* Cadastrar */, '14u7ipws' /* Cadastrar */,
), ),
options: FFButtonOptions( options: FFButtonOptions(
width: double.infinity, width: double.infinity,
height: 44.0, height: 44.0,
padding: padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
const EdgeInsetsDirectional
.fromSTEB(
0.0, 0.0, 0.0, 0.0),
iconPadding: iconPadding:
const EdgeInsetsDirectional const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
.fromSTEB( color: FlutterFlowTheme.of(context).customColor1,
0.0, 0.0, 0.0, 0.0), textStyle: FlutterFlowTheme.of(context).titleSmall.override(
color: FlutterFlowTheme.of( fontFamily: 'Plus Jakarta Sans',
context) color: FlutterFlowTheme.of(context).secondaryText,
.customColor1,
textStyle: FlutterFlowTheme
.of(context)
.titleSmall
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme
.of(context)
.secondaryText,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: fontWeight: FontWeight.w500,
FontWeight.w500,
useGoogleFonts: useGoogleFonts:
GoogleFonts GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.asMap()
.containsKey(
'Plus Jakarta Sans'),
), ),
elevation: 3.0, elevation: 3.0,
borderSide: borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
const BorderSide( borderRadius: BorderRadius.circular(12.0),
color: Colors
.transparent,
width: 1.0),
borderRadius:
BorderRadius.circular(
12.0),
), ),
showLoadingIndicator: false, showLoadingIndicator: false,
), ),
@ -661,192 +433,108 @@ class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentW
} else { } else {
return Row( return Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.spaceEvenly,
MainAxisAlignment.spaceEvenly,
children: [ children: [
Expanded( Expanded(
child: Padding( child: Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
const EdgeInsetsDirectional
.fromSTEB(0.0, 0.0,
0.0, 16.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey< key: const ValueKey<String>('SubmitButtonWidget'),
String>( onPressed: _isFormInvalid()
'SubmitButtonWidget'),
onPressed:
_isFormInvalid()
? null ? null
: () async { : () async {
try { try {
await AuthenticationService await AuthenticationService.signIn(
.signIn(
context, context,
_model, _model,
emailAdress: _model emailAdress: _model.emailAddressTextController.text,
.emailAddressTextController password: _model.passwordTextController.text,
.text,
password: _model
.passwordTextController
.text,
); );
setState( setState(() {});
() {});
} catch (e, s) { } catch (e, s) {
await DialogUtil await DialogUtil.errorDefault(context);
.errorDefault(
context);
LogUtil.requestAPIFailed( LogUtil.requestAPIFailed(
'login.php', 'login.php',
_model _model.emailAddressTextController.text,
.emailAddressTextController
.text,
"Login", "Login",
e, e,
s); s);
} }
}, },
text: FFLocalizations.of( text: FFLocalizations.of(context).getText('1x926nsn'),
context)
.getText('1x926nsn'),
options: FFButtonOptions( options: FFButtonOptions(
width: double.infinity, width: double.infinity,
height: 44.0, height: 44.0,
padding: padding:
const EdgeInsetsDirectional const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
.fromSTEB(0.0,
0.0, 0.0, 0.0),
iconPadding: iconPadding:
const EdgeInsetsDirectional const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
.fromSTEB(0.0, color: FlutterFlowTheme.of(context).accent1,
0.0, 0.0, 0.0), textStyle: FlutterFlowTheme.of(context).titleSmall.override(
color: fontFamily: 'Plus Jakarta Sans',
FlutterFlowTheme.of( color: FlutterFlowTheme.of(context).info,
context)
.accent1,
textStyle:
FlutterFlowTheme.of(
context)
.titleSmall
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.info,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: letterSpacing: 0.0,
0.0, fontWeight: FontWeight.w500,
fontWeight: useGoogleFonts:
FontWeight GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
), ),
elevation: 3.0, elevation: 3.0,
borderSide: borderSide: const BorderSide(
const BorderSide( color: Colors.transparent,
color: Colors
.transparent,
width: 1.0, width: 1.0,
), ),
borderRadius: borderRadius: BorderRadius.circular(12.0),
BorderRadius disabledColor: const Color(0xE81AAB5F),
.circular(12.0),
disabledColor:
const Color(
0xE81AAB5F),
), ),
showLoadingIndicator: showLoadingIndicator: true,
true,
), ),
), ),
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
const EdgeInsetsDirectional
.fromSTEB(0.0, 0.0,
0.0, 16.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey< key: const ValueKey<String>('toggleSignUpPage'),
String>( onPressed: () async => await widget.toggleSignUpPage?.call(),
'toggleSignUpPage'), text: FFLocalizations.of(context)
onPressed: () async => .getText('jwvd4ai1' /* Cadastrar */),
await widget
.toggleSignUpPage
?.call(),
text: FFLocalizations.of(
context)
.getText(
'jwvd4ai1' /* Cadastrar */),
options: FFButtonOptions( options: FFButtonOptions(
width: double.infinity, width: double.infinity,
height: 44.0, height: 44.0,
padding: padding:
const EdgeInsetsDirectional const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
.fromSTEB(0.0,
0.0, 0.0, 0.0),
iconPadding: iconPadding:
const EdgeInsetsDirectional const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
.fromSTEB(0.0, color: FlutterFlowTheme.of(context).customColor1,
0.0, 0.0, 0.0), textStyle: FlutterFlowTheme.of(context).titleSmall.override(
color: fontFamily: 'Plus Jakarta Sans',
FlutterFlowTheme.of( color: FlutterFlowTheme.of(context).secondaryText,
context) fontSize: 16.0,
.customColor1, letterSpacing: 0.0,
textStyle: fontWeight: FontWeight.w500,
FlutterFlowTheme.of( useGoogleFonts:
context) GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.titleSmall
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme.of(
context)
.secondaryText,
fontSize:
16.0,
letterSpacing:
0.0,
fontWeight:
FontWeight
.w500,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
'Plus Jakarta Sans'),
), ),
elevation: 3.0, elevation: 3.0,
borderSide: borderSide: const BorderSide(
const BorderSide( color: Colors.transparent,
color: Colors
.transparent,
width: 1.0, width: 1.0,
), ),
borderRadius: borderRadius: BorderRadius.circular(12.0),
BorderRadius
.circular(12.0),
), ),
showLoadingIndicator: showLoadingIndicator: false,
false,
), ),
), ),
), ),
].divide( ].divide(const SizedBox(width: 7.0)));
const SizedBox(width: 7.0)));
} }
}, },
), ),
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
const EdgeInsetsDirectional.fromSTEB(
0.0, 12.0, 0.0, 12.0),
child: InkWell( child: InkWell(
key: const ValueKey<String>( key: const ValueKey<String>('ForgotPassword'),
'ForgotPassword'),
splashColor: Colors.transparent, splashColor: Colors.transparent,
focusColor: Colors.transparent, focusColor: Colors.transparent,
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
@ -854,84 +542,49 @@ class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentW
onTap: () async { onTap: () async {
await showModalBottomSheet( await showModalBottomSheet(
isScrollControlled: true, isScrollControlled: true,
backgroundColor: backgroundColor: Colors.transparent,
Colors.transparent,
context: context, context: context,
builder: (context) { builder: (context) {
return Padding( return Padding(
padding: MediaQuery padding: MediaQuery.viewInsetsOf(context),
.viewInsetsOf( child: const ForgotPasswordTemplateComponentWidget(),
context),
child:
const ForgotPasswordTemplateComponentWidget(),
); );
}) }).then((value) => safeSetState(() {}));
.then((value) =>
safeSetState(() {}));
}, },
child: RichText( child: RichText(
textScaler: textScaler: MediaQuery.of(context).textScaler,
MediaQuery.of(context).textScaler,
text: TextSpan( text: TextSpan(
children: [ children: [
TextSpan( TextSpan(
text: text: FFLocalizations.of(context).getText(
FFLocalizations.of(context)
.getText(
'05dx91ku' /* Você esqueceu a sua senha? */, '05dx91ku' /* Você esqueceu a sua senha? */,
), ),
style: TextStyle( style: TextStyle(
color: FlutterFlowTheme.of( color: FlutterFlowTheme.of(context).primaryText,
context)
.primaryText,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
), ),
TextSpan( TextSpan(
text: FFLocalizations.of( text: FFLocalizations.of(context)
context) .getText('p5c6d54y' /* Recupere aqui */),
.getText( style: FlutterFlowTheme.of(context).bodyMedium.override(
'p5c6d54y' /* Recupere aqui */), fontFamily: 'Plus Jakarta Sans',
style: color: FlutterFlowTheme.of(context).primary,
FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily:
'Plus Jakarta Sans',
color: FlutterFlowTheme
.of(context)
.primary,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: fontWeight: FontWeight.normal,
FontWeight.normal,
useGoogleFonts: useGoogleFonts:
GoogleFonts GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.asMap()
.containsKey(
'Plus Jakarta Sans'),
), ),
mouseCursor: mouseCursor: SystemMouseCursors.click,
SystemMouseCursors.click,
) )
], ],
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).bodyMedium.override(
.bodyMedium fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts useGoogleFonts: GoogleFonts.asMap()
.asMap() .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
.containsKey( fontSize: limitedInputFontSize),
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
fontSize: limitedInputFontSize
),
), ),
), ),
), ),
@ -941,8 +594,7 @@ class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentW
), ),
), ),
), ),
).animateOnPageLoad( ).animateOnPageLoad(animationsMap['containerOnPageLoadAnimation']!),
animationsMap['containerOnPageLoadAnimation']!),
), ),
), ),
], ],

View File

@ -19,15 +19,13 @@ import 'sign_up_template_component_model.dart';
export 'sign_up_template_component_model.dart'; export 'sign_up_template_component_model.dart';
class SignUpTemplateComponentWidget extends StatefulWidget { class SignUpTemplateComponentWidget extends StatefulWidget {
const SignUpTemplateComponentWidget( const SignUpTemplateComponentWidget({super.key, required this.toggleSignInPage});
{super.key, required this.toggleSignInPage});
final Future Function()? toggleSignInPage; final Future Function()? toggleSignInPage;
@override @override
State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState(); State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
} }
class _SignUpTemplateComponentWidgetState class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
late SignUpTemplateComponentModel _model; late SignUpTemplateComponentModel _model;
final animationsMap = <String, AnimationInfo>{}; final animationsMap = <String, AnimationInfo>{};
late String _deviceType; late String _deviceType;
@ -160,17 +158,13 @@ class _SignUpTemplateComponentWidgetState
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */, '49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
), ),
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).displaySmall.override(
.displaySmall
.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context) color: FlutterFlowTheme.of(context).primaryText,
.primaryText,
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -271,18 +265,13 @@ class _SignUpTemplateComponentWidgetState
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
errorStyle: TextStyle( errorStyle: TextStyle(
fontFamily: fontFamily: 'Plus Jakarta Sans',
'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).error,
color:
FlutterFlowTheme.of(
context)
.error,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
), ),
focusedErrorBorder: focusedErrorBorder: OutlineInputBorder(
OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: FlutterFlowTheme.of(context).error, color: FlutterFlowTheme.of(context).error,
width: 0.25, width: 0.25,
@ -363,18 +352,13 @@ class _SignUpTemplateComponentWidgetState
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
errorStyle: TextStyle( errorStyle: TextStyle(
fontFamily: fontFamily: 'Plus Jakarta Sans',
'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).error,
color:
FlutterFlowTheme.of(
context)
.error,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
), ),
focusedErrorBorder: focusedErrorBorder: OutlineInputBorder(
OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: FlutterFlowTheme.of(context).error, color: FlutterFlowTheme.of(context).error,
width: 0.25, width: 0.25,
@ -456,22 +440,15 @@ class _SignUpTemplateComponentWidgetState
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
errorStyle: TextStyle( errorStyle: TextStyle(
fontFamily: fontFamily: 'Plus Jakarta Sans',
'Plus Jakarta Sans', color: FlutterFlowTheme.of(context).error,
color:
FlutterFlowTheme.of(
context)
.error,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
), ),
focusedErrorBorder: focusedErrorBorder: OutlineInputBorder(
OutlineInputBorder( borderSide: const BorderSide(
borderSide: color: Color(0xFFFF5963),
const BorderSide(
color:
Color(0xFFFF5963),
width: 0.25, width: 0.25,
), ),
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
@ -479,9 +456,7 @@ class _SignUpTemplateComponentWidgetState
filled: true, filled: true,
fillColor: FlutterFlowTheme.of(context).primaryBackground, fillColor: FlutterFlowTheme.of(context).primaryBackground,
suffixIcon: InkWell( suffixIcon: InkWell(
key: const ValueKey< key: const ValueKey<String>('passwordVisibilitySuffixIcon'),
String>(
'passwordVisibilitySuffixIcon'),
onTap: () => setState( onTap: () => setState(
() => _model.passwordRegisterFormVisibility = () => _model.passwordRegisterFormVisibility =
!_model.passwordRegisterFormVisibility, !_model.passwordRegisterFormVisibility,
@ -516,8 +491,7 @@ class _SignUpTemplateComponentWidgetState
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey<String>( key: const ValueKey<String>('SubmitButtonWidget'),
'SubmitButtonWidget'),
onPressed: isFormInvalid() onPressed: isFormInvalid()
? null ? null
: () async { : () async {
@ -531,17 +505,12 @@ class _SignUpTemplateComponentWidgetState
); );
shouldSetState = true; shouldSetState = true;
if (_model.register == true) if (_model.register == true)
await widget.toggleSignInPage?.call();
await widget
.toggleSignInPage
?.call();
else { else {
if (shouldSetState) if (shouldSetState) setState(() {});
setState(() {});
return; return;
} }
if (shouldSetState) if (shouldSetState) setState(() {});
setState(() {});
}, },
text: FFLocalizations.of(context).getText( text: FFLocalizations.of(context).getText(
'rnvdwzei' /* Cadastrar-se */, 'rnvdwzei' /* Cadastrar-se */,
@ -577,15 +546,12 @@ class _SignUpTemplateComponentWidgetState
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0), padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
child: InkWell( child: InkWell(
key: const ValueKey<String>( key: const ValueKey<String>('toggleSignInPage'),
'toggleSignInPage'),
splashColor: Colors.transparent, splashColor: Colors.transparent,
focusColor: Colors.transparent, focusColor: Colors.transparent,
hoverColor: Colors.transparent, hoverColor: Colors.transparent,
highlightColor: Colors.transparent, highlightColor: Colors.transparent,
onTap: () async => await widget onTap: () async => await widget.toggleSignInPage?.call(),
.toggleSignInPage
?.call(),
child: RichText( child: RichText(
textScaler: MediaQuery.of(context).textScaler, textScaler: MediaQuery.of(context).textScaler,
text: TextSpan( text: TextSpan(

View File

@ -75,9 +75,9 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
), ),
Column(children: [ Column(
children: [],
],), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0), padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
child: TextFormField( child: TextFormField(
@ -250,8 +250,8 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
style: FlutterFlowTheme.of(context).bodyLarge.override( style: FlutterFlowTheme.of(context).bodyLarge.override(
fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily, fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts: GoogleFonts.asMap()
FlutterFlowTheme.of(context).bodyLargeFamily), .containsKey(FlutterFlowTheme.of(context).bodyLargeFamily),
fontSize: limitedBodyFontSize, fontSize: limitedBodyFontSize,
), ),
), ),
@ -312,17 +312,14 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
options: FFButtonOptions( options: FFButtonOptions(
width: MediaQuery.of(context).size.width * 0.4, width: MediaQuery.of(context).size.width * 0.4,
height: 40, height: 40,
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
24.0, 0.0, 24.0, 0.0), iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context).primary, color: FlutterFlowTheme.of(context).primary,
textStyle: FlutterFlowTheme.of(context).titleSmall.override( textStyle: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily, fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
color: Colors.white, color: Colors.white,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
elevation: 3.0, elevation: 3.0,
@ -373,8 +370,7 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
.getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'), .getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'),
gravity: ToastGravity.TOP, gravity: ToastGravity.TOP,
backgroundColor: Colors.red, backgroundColor: Colors.red,
fontSize: LimitedFontSizeUtil.getBodyFontSize(context) fontSize: LimitedFontSizeUtil.getBodyFontSize(context));
);
} }
} else { } else {
await showAdaptiveDialog( await showAdaptiveDialog(

View File

@ -26,9 +26,7 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState(); State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState();
} }
class _WelcomeTemplateComponentWidgetState class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponentWidget> with TickerProviderStateMixin {
extends State<WelcomeTemplateComponentWidget>
with TickerProviderStateMixin {
late WelcomeTemplateComponentModel _model; late WelcomeTemplateComponentModel _model;
final animationsMap = <String, AnimationInfo>{}; final animationsMap = <String, AnimationInfo>{};
@ -106,8 +104,7 @@ class _WelcomeTemplateComponentWidgetState
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Text(
FFLocalizations.of(context) FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
.getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context).displaySmall.override( style: FlutterFlowTheme.of(context).displaySmall.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
@ -115,15 +112,13 @@ class _WelcomeTemplateComponentWidgetState
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
Align( Align(
alignment: const AlignmentDirectional(0.0, -1.0), alignment: const AlignmentDirectional(0.0, -1.0),
child: Text( child: Text(
FFLocalizations.of(context).getText( FFLocalizations.of(context).getText('5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context).displaySmall.override( style: FlutterFlowTheme.of(context).displaySmall.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
@ -131,8 +126,7 @@ class _WelcomeTemplateComponentWidgetState
fontSize: limitedSubHeaderFontSize, fontSize: limitedSubHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -147,8 +141,7 @@ class _WelcomeTemplateComponentWidgetState
decoration: const BoxDecoration(), decoration: const BoxDecoration(),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(0.0), borderRadius: BorderRadius.circular(0.0),
child: const AtomImageSvgTheme( child: const AtomImageSvgTheme(filename: 'welcome', width: 600, height: double.infinity),
filename: 'welcome', width: 600, height: double.infinity),
), ),
), ),
), ),
@ -182,20 +175,14 @@ class _WelcomeTemplateComponentWidgetState
children: [ children: [
Builder( Builder(
builder: (context) { builder: (context) {
if (MediaQuery.sizeOf(context).width < if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
kBreakpointSmall
? true
: false) {
return Column( return Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey<String>( key: const ValueKey<String>('toggleSignInPage'),
'toggleSignInPage'),
onPressed: () async { onPressed: () async {
await widget.toggleSignInPage?.call(); await widget.toggleSignInPage?.call();
}, },
@ -203,17 +190,10 @@ class _WelcomeTemplateComponentWidgetState
options: FFButtonOptions( options: FFButtonOptions(
width: double.infinity, width: double.infinity,
height: 44.0, height: 44.0,
padding: const EdgeInsetsDirectional padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
.fromSTEB(0.0, 0.0, 0.0, 0.0), iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding: color: FlutterFlowTheme.of(context).primary,
const EdgeInsetsDirectional textStyle: FlutterFlowTheme.of(context).titleSmall.override(
.fromSTEB(0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context)
.primary,
textStyle: FlutterFlowTheme.of(
context)
.titleSmall
.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).info, color: FlutterFlowTheme.of(context).info,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
@ -254,7 +234,6 @@ class _WelcomeTemplateComponentWidgetState
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'), useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
), ),
elevation: 3.0, elevation: 3.0,
borderSide: const BorderSide( borderSide: const BorderSide(
@ -277,11 +256,9 @@ class _WelcomeTemplateComponentWidgetState
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey<String>( key: const ValueKey<String>('toggleSignInPage'),
'toggleSignInPage'),
onPressed: () async { onPressed: () async {
await widget.toggleSignInPage await widget.toggleSignInPage?.call();
?.call();
}, },
text: FFLocalizations.of(context).getText( text: FFLocalizations.of(context).getText(
'zvtay8ee' /* Entrar */, 'zvtay8ee' /* Entrar */,
@ -315,8 +292,7 @@ class _WelcomeTemplateComponentWidgetState
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0), padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget( child: FFButtonWidget(
key: const ValueKey<String>( key: const ValueKey<String>('toggleSignUpPage'),
'toggleSignUpPage'),
onPressed: () async { onPressed: () async {
await widget.toggleSignUpPage?.call(); await widget.toggleSignUpPage?.call();
}, },

View File

@ -539,8 +539,7 @@ void showSnackbar(
); );
} }
void showAlertDialog(BuildContext context, String title, String content, void showAlertDialog(BuildContext context, String title, String content, Future<void> Function() action) {
Future<void> Function() action) {
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
@ -550,10 +549,13 @@ void showAlertDialog(BuildContext context, String title, String content,
builder: (context) { builder: (context) {
return AlertDialog( return AlertDialog(
backgroundColor: FlutterFlowTheme.of(context).primaryBackground, backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
title: Text(title, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize), textAlign: TextAlign.center), title: Text(title,
style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize),
textAlign: TextAlign.center),
content: Padding( content: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text(content, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize)), child: Text(content,
style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize)),
), ),
actions: [ actions: [
Row( Row(
@ -566,10 +568,8 @@ void showAlertDialog(BuildContext context, String title, String content,
width: MediaQuery.of(context).size.width * 0.3, width: MediaQuery.of(context).size.width * 0.3,
height: 50, height: 50,
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
textStyle: TextStyle( textStyle:
color: FlutterFlowTheme.of(context).primaryText, TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedInputFontSize),
fontSize: limitedInputFontSize
),
borderSide: BorderSide( borderSide: BorderSide(
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
width: 1, width: 1,
@ -592,10 +592,8 @@ void showAlertDialog(BuildContext context, String title, String content,
height: 50, height: 50,
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
elevation: 0, elevation: 0,
textStyle: TextStyle( textStyle:
color: FlutterFlowTheme.of(context).primaryText, TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedInputFontSize),
fontSize: limitedInputFontSize
),
splashColor: const Color.fromARGB(255, 129, 129, 129), splashColor: const Color.fromARGB(255, 129, 129, 129),
borderSide: BorderSide( borderSide: BorderSide(
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,

View File

@ -99,7 +99,6 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
textAlign: widget.options.textAlign, textAlign: widget.options.textAlign,
maxLines: maxLines, maxLines: maxLines,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
); );
final onPressed = widget.onPressed != null final onPressed = widget.onPressed != null

View File

@ -73,10 +73,16 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
builder: (context, _) { builder: (context, _) {
return FutureBuilder<Widget>( return FutureBuilder<Widget>(
future: () async { future: () async {
final bool isLogged = await StorageHelper().get(SecureStorageKey.isLogged.value, Storage.SecureStorage) == 'true'; final bool isLogged =
final bool haveLocal = await StorageHelper().get(SecureStorageKey.haveLocal.value, Storage.SecureStorage) == 'true'; await StorageHelper().get(SecureStorageKey.isLogged.value, Storage.SecureStorage) == 'true';
final bool haveUserUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage))?.isNotEmpty ?? false; final bool haveLocal =
final bool haveDevUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage))?.isNotEmpty ?? false; await StorageHelper().get(SecureStorageKey.haveLocal.value, Storage.SecureStorage) == 'true';
final bool haveUserUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage))?.isNotEmpty ??
false;
final bool haveDevUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage))?.isNotEmpty ??
false;
if (isLogged && haveDevUUID && haveUserUUID) { if (isLogged && haveDevUUID && haveUserUUID) {
return haveLocal ? const HomePageWidget() : const ReceptionPageWidget(); return haveLocal ? const HomePageWidget() : const ReceptionPageWidget();

View File

@ -558,11 +558,11 @@ void showUploadMessage(
: null, : null,
), ),
), ),
Text(message,
Text( style: TextStyle(
message, style: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: LimitedFontSizeUtil.getBodyFontSize(context), )), fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
)),
], ],
), ),
backgroundColor: FlutterFlowTheme.of(context).primary, backgroundColor: FlutterFlowTheme.of(context).primary,

View File

@ -49,9 +49,11 @@ Future<void> initializeApp() async {
Future<void> _initializeTracking() async { Future<void> _initializeTracking() async {
await AppTrackingTransparency.requestTrackingAuthorization(); await AppTrackingTransparency.requestTrackingAuthorization();
} }
Future<void> _initializeFirebase() async { Future<void> _initializeFirebase() async {
await Firebase.initializeApp(); await Firebase.initializeApp();
} }
Future<void> _initializeNotificationService() async { Future<void> _initializeNotificationService() async {
await NotificationService.initialize(); await NotificationService.initialize();
} }
@ -59,6 +61,7 @@ Future<void> _initializeNotificationService() async {
void _initializeUrlStrategy() { void _initializeUrlStrategy() {
setUrlStrategy(PathUrlStrategy()); setUrlStrategy(PathUrlStrategy());
} }
void _initializeSystemSettings() { void _initializeSystemSettings() {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
if (kDebugMode) { if (kDebugMode) {
@ -77,6 +80,7 @@ Future<void> _initializeFlutterFlow() async {
GoRouter.optionURLReflectsImperativeAPIs = true; GoRouter.optionURLReflectsImperativeAPIs = true;
usePathUrlStrategy(); usePathUrlStrategy();
} }
Future<void> _foregroundHandlerMessage(RemoteMessage message) async { Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
if (message.data['click_action'] == 'enroll_cond') { if (message.data['click_action'] == 'enroll_cond') {
await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage); await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage);
@ -90,6 +94,7 @@ Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
payload: Map<String, String>.from(message.data)); payload: Map<String, String>.from(message.data));
} }
} }
Future<void> _backgroundHandlerMessage(RemoteMessage message) async { Future<void> _backgroundHandlerMessage(RemoteMessage message) async {
if (message.data['click_action'] == 'enroll_cond') { if (message.data['click_action'] == 'enroll_cond') {
await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage); await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage);
@ -105,6 +110,7 @@ class App extends StatefulWidget {
static _AppState of(BuildContext context) => context.findAncestorStateOfType<_AppState>()!; static _AppState of(BuildContext context) => context.findAncestorStateOfType<_AppState>()!;
} }
class _AppState extends State<App> with WidgetsBindingObserver { class _AppState extends State<App> with WidgetsBindingObserver {
Locale? _locale = FFLocalizations.getStoredLocale(); Locale? _locale = FFLocalizations.getStoredLocale();
ThemeMode _themeMode = FlutterFlowTheme.themeMode; ThemeMode _themeMode = FlutterFlowTheme.themeMode;
@ -253,7 +259,6 @@ class _AppState extends State<App> with WidgetsBindingObserver {
super.initState(); super.initState();
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
_appStateNotifier = AppStateNotifier.instance; _appStateNotifier = AppStateNotifier.instance;
_router = createRouter(_appStateNotifier); _router = createRouter(_appStateNotifier);
@ -295,4 +300,3 @@ class _AppState extends State<App> with WidgetsBindingObserver {
); );
} }
} }

View File

@ -224,7 +224,10 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
SnackBar( SnackBar(
content: Text( content: Text(
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."), FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
style: TextStyle(color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context),), style: TextStyle(
color: Colors.white,
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
),
), ),
duration: const Duration(seconds: 3), duration: const Duration(seconds: 3),
backgroundColor: FlutterFlowTheme.of(context).primary, backgroundColor: FlutterFlowTheme.of(context).primary,

View File

@ -41,13 +41,10 @@ class _HomePageWidgetState extends State<HomePageWidget> {
_model = createModel(context, () => HomePageModel(safeSetState: () => safeSetState((){}))); _model = createModel(context, () => HomePageModel(safeSetState: () => safeSetState((){})));
_model.textController ??= TextEditingController(); _model.textController ??= TextEditingController();
_model.textFieldFocusNode ??= FocusNode(); _model.textFieldFocusNode ??= FocusNode();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
StorageHelper().context = context; StorageHelper().context = context;

View File

@ -226,13 +226,13 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Center( Center(
child: Text(FFLocalizations.of(context).getVariableText( child: Text(
ptText: "Nenhuma mensagem encontrada!", FFLocalizations.of(context)
enText: "No message found"), .getVariableText(ptText: "Nenhuma mensagem encontrada!", enText: "No message found"),
style: TextStyle( style: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedSubHeaderFontSize,) fontSize: limitedSubHeaderFontSize,
), )),
) )
], ],
), ),
@ -349,8 +349,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: limitedBodyFontSize, fontSize: limitedBodyFontSize,
color: color: FlutterFlowTheme.of(context).customColor6,
FlutterFlowTheme.of(context).customColor6,
), ),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
@ -374,8 +373,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
jsonBody['MSG_TEXTO'].toString(), jsonBody['MSG_TEXTO'].toString(),
style: TextStyle( style: TextStyle(
fontSize: limitedBodyFontSize, fontSize: limitedBodyFontSize,
color: color: FlutterFlowTheme.of(context).customColor6,
FlutterFlowTheme.of(context).customColor6,
), ),
), ),
), ),

View File

@ -163,8 +163,7 @@ class _PackageOrderPage extends State<PackageOrderPage> {
child: IconButton( child: IconButton(
icon: const Icon(Icons.filter_list), icon: const Icon(Icons.filter_list),
onPressed: () async { onPressed: () async {
final Map<String, String>? selectedFilter = final Map<String, String>? selectedFilter = await showModalBottomSheet<Map<String, String>>(
await showModalBottomSheet<Map<String, String>>(
isScrollControlled: true, isScrollControlled: true,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
context: context, context: context,
@ -176,13 +175,8 @@ class _PackageOrderPage extends State<PackageOrderPage> {
child: GestureDetector( child: GestureDetector(
onTap: () {}, onTap: () {},
child: OrderFilterModalWidget( child: OrderFilterModalWidget(
defaultAdresseeType: _selectedTypeSubject defaultAdresseeType: _selectedTypeSubject.value['adresseeType'] ?? '.*',
.value['adresseeType'] ?? defaultStatus: _selectedTypeSubject.value['status'] ?? '.*',
'.*',
defaultStatus:
_selectedTypeSubject.value['status'] ??
'.*',
), ),
), ),
), ),
@ -261,9 +255,8 @@ class _PackageOrderPage extends State<PackageOrderPage> {
children: [ children: [
Center( Center(
child: Text( child: Text(
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context)
ptText: "Nenhuma encomenda encontrada!", .getVariableText(ptText: "Nenhuma encomenda encontrada!", enText: "No orders found!"),
enText: "No orders found!"),
style: TextStyle( style: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context), fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),

View File

@ -232,6 +232,80 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
); );
} }
@override
Widget build(BuildContext context) {
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
double limitedHeaderTextSize = LimitedFontSizeUtil.getHeaderFontSize(context);
return Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: [
if (_hasData == false && _pageNumber <= 1 && _loading == false)
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Center(
child: Text(
FFLocalizations.of(context)
.getVariableText(ptText: "Nenhum Pet encontrado!", enText: "No pets found"),
style: TextStyle(
fontFamily: 'Nunito',
fontSize: limitedHeaderTextSize,
)),
)
],
),
)
else if (_hasData == true || _pageNumber >= 1)
Expanded(
child: FutureBuilder<void>(
future: _petsFuture,
builder: (context, snapshot) {
return ListView.builder(
shrinkWrap: true,
physics: const BouncingScrollPhysics(),
controller: _scrollController,
itemCount: _petsWrap.length + 1,
itemBuilder: (context, index) {
if (index == 0) {
// Add your item here
return Padding(
padding: const EdgeInsets.only(right: 30, top: 10),
child: Text(
widget.model.petAmountRegister == '0'
? FFLocalizations.of(context).getVariableText(ptText: "Ilimitado", enText: "Unlimited")
: "${FFLocalizations.of(context).getVariableText(ptText: "Quantidade de Pets: ", enText: "Amount of Pets: ")}$count/${widget.model.petAmountRegister}",
textAlign: TextAlign.right,
style: TextStyle(
fontFamily: 'Nunito',
fontSize: limitedBodyTextSize,
),
),
);
} else {
final item = _petsWrap[index - 1];
return _item(context, item);
}
});
},
)),
if (_hasData == true && _loading == true)
Container(
padding: const EdgeInsets.only(top: 15, bottom: 15),
child: Center(
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(
FlutterFlowTheme.of(context).primary,
),
),
),
)
].addToStart(const SizedBox(height: 0)),
);
}
Widget _item(BuildContext context, dynamic uItem) { Widget _item(BuildContext context, dynamic uItem) {
return CardItemTemplateComponentWidget( return CardItemTemplateComponentWidget(
@ -292,12 +366,9 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
], ],
onTapCardItemAction: () async { onTapCardItemAction: () async {
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final userUUID = final userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? ''; final cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final cliUUID = final cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final cliName =
(await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
await showDialog( await showDialog(
useSafeArea: true, useSafeArea: true,
context: context, context: context,

View File

@ -125,17 +125,14 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
), ),
), ),
), ),
), ),
Form( Form(
key: _model.registerFormKey, key: _model.registerFormKey,
autovalidateMode: AutovalidateMode.onUserInteraction, autovalidateMode: AutovalidateMode.onUserInteraction,
child: Column( child:
mainAxisSize: MainAxisSize.max, Column(mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Padding( Padding(
padding: const EdgeInsets.fromLTRB(0, 10, 0, 20), padding: const EdgeInsets.fromLTRB(0, 10, 0, 20),
child: MediaUploadButtonUtil( child: MediaUploadButtonUtil(
@ -143,19 +140,15 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
isUploading: _model.isDataUploading, isUploading: _model.isDataUploading,
uploadedFiles: _model.uploadedLocalFile, uploadedFiles: _model.uploadedLocalFile,
labelText: FFLocalizations.of(context).getVariableText( labelText: FFLocalizations.of(context).getVariableText(
ptText: 'Clique para adicionar a foto de seu Pet', ptText: 'Clique para adicionar a foto de seu Pet', enText: 'Click to add your Pet\'s photo'),
enText: 'Click to add your Pet\'s photo'),
), ),
), ),
CustomInputUtil( CustomInputUtil(
controller: _model.textControllerName, controller: _model.textControllerName,
validator: _model.textControllerNameValidator validator: _model.textControllerNameValidator.asValidator(context),
.asValidator(context),
focusNode: _model.textFieldFocusName, focusNode: _model.textFieldFocusName,
labelText: FFLocalizations.of(context) labelText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
.getVariableText(ptText: 'Nome', enText: 'Name'), hintText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
hintText: FFLocalizations.of(context)
.getVariableText(ptText: 'Nome', enText: 'Name'),
suffixIcon: Symbols.format_color_text, suffixIcon: Symbols.format_color_text,
haveMaxLength: true, haveMaxLength: true,
onChanged: (value) => setState(() {}), onChanged: (value) => setState(() {}),
@ -163,14 +156,11 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
), ),
CustomInputUtil( CustomInputUtil(
controller: _model.textControllerSpecies, controller: _model.textControllerSpecies,
validator: _model.textControllerSpeciesValidator validator: _model.textControllerSpeciesValidator.asValidator(context),
.asValidator(context),
focusNode: _model.textFieldFocusSpecies, focusNode: _model.textFieldFocusSpecies,
labelText: FFLocalizations.of(context).getVariableText( labelText: FFLocalizations.of(context).getVariableText(ptText: 'Espécie', enText: 'Species'),
ptText: 'Espécie', enText: 'Species'), hintText: FFLocalizations.of(context)
hintText: FFLocalizations.of(context).getVariableText( .getVariableText(ptText: 'Ex: Cachorro, Gato, Papagaio', enText: 'e.g. Dog, Cat, Parrot'),
ptText: 'Ex: Cachorro, Gato, Papagaio',
enText: 'e.g. Dog, Cat, Parrot'),
suffixIcon: Symbols.sound_detection_dog_barking, suffixIcon: Symbols.sound_detection_dog_barking,
haveMaxLength: true, haveMaxLength: true,
onChanged: (value) => setState(() {}), onChanged: (value) => setState(() {}),
@ -178,14 +168,11 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
), ),
CustomInputUtil( CustomInputUtil(
controller: _model.textControllerRace, controller: _model.textControllerRace,
validator: _model.textControllerRaceValidator validator: _model.textControllerRaceValidator.asValidator(context),
.asValidator(context),
focusNode: _model.textFieldFocusRace, focusNode: _model.textFieldFocusRace,
labelText: FFLocalizations.of(context) labelText: FFLocalizations.of(context).getVariableText(ptText: 'Raça', enText: 'Race'),
.getVariableText(ptText: 'Raça', enText: 'Race'),
hintText: FFLocalizations.of(context).getVariableText( hintText: FFLocalizations.of(context).getVariableText(
ptText: 'Ex: Labrador, Poodle, Siamês, Persa', ptText: 'Ex: Labrador, Poodle, Siamês, Persa', enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
suffixIcon: Icons.pets_outlined, suffixIcon: Icons.pets_outlined,
haveMaxLength: true, haveMaxLength: true,
onChanged: (value) => setState(() {}), onChanged: (value) => setState(() {}),
@ -193,14 +180,11 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
), ),
CustomInputUtil( CustomInputUtil(
controller: _model.textControllerColor, controller: _model.textControllerColor,
validator: _model.textControllerColorValidator validator: _model.textControllerColorValidator.asValidator(context),
.asValidator(context),
focusNode: _model.textFieldFocusColor, focusNode: _model.textFieldFocusColor,
labelText: FFLocalizations.of(context) labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cor', enText: 'Color'),
.getVariableText(ptText: 'Cor', enText: 'Color'), hintText: FFLocalizations.of(context)
hintText: FFLocalizations.of(context).getVariableText( .getVariableText(ptText: 'Ex: Preto, Amarelo, Branco', enText: 'e.g. Black, Yellow, White'),
ptText: 'Ex: Preto, Amarelo, Branco',
enText: 'e.g. Black, Yellow, White'),
suffixIcon: Symbols.palette, suffixIcon: Symbols.palette,
haveMaxLength: true, haveMaxLength: true,
onChanged: (value) => setState(() {}), onChanged: (value) => setState(() {}),
@ -217,121 +201,85 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
child: Stack( child: Stack(
children: [ children: [
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
24.0, 0.0, 24.0, 0.0),
child: TextFormField( child: TextFormField(
controller: _model.textControllerData, controller: _model.textControllerData,
focusNode: _model.textFieldFocusData, focusNode: _model.textFieldFocusData,
cursorColor: cursorColor: FlutterFlowTheme.of(context).primary,
FlutterFlowTheme.of(context).primary,
readOnly: true, readOnly: true,
autovalidateMode: autovalidateMode: AutovalidateMode.onUserInteraction,
AutovalidateMode.onUserInteraction,
autofocus: false, autofocus: false,
obscureText: false, obscureText: false,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
labelStyle: FlutterFlowTheme.of(context) labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
.labelMedium fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
.override( color: FlutterFlowTheme.of(context).primaryText,
fontFamily:
FlutterFlowTheme.of(context)
.labelMediumFamily,
color: FlutterFlowTheme.of(context)
.primaryText,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey( .containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
FlutterFlowTheme.of(context)
.labelMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
hintText: FFLocalizations.of(context) hintText: FFLocalizations.of(context).getVariableText(
.getVariableText(
ptText: 'Data de Nascimento', ptText: 'Data de Nascimento',
enText: 'Date of Birth', enText: 'Date of Birth',
), ),
hintStyle: FlutterFlowTheme.of(context) hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
.labelMedium fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
.override( color: FlutterFlowTheme.of(context).primaryText,
fontFamily:
FlutterFlowTheme.of(context)
.labelMediumFamily,
color: FlutterFlowTheme.of(context)
.primaryText,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey( .containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
FlutterFlowTheme.of(context)
.labelMediumFamily),
lineHeight: 1.0, lineHeight: 1.0,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: FlutterFlowTheme.of(context) color: FlutterFlowTheme.of(context).customColor6,
.customColor6,
width: 0.5, width: 0.5,
), ),
borderRadius: borderRadius: BorderRadius.circular(10.0),
BorderRadius.circular(10.0),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: FlutterFlowTheme.of(context) color: FlutterFlowTheme.of(context).primary,
.primary,
width: 0.5, width: 0.5,
), ),
borderRadius: borderRadius: BorderRadius.circular(10.0),
BorderRadius.circular(10.0),
), ),
errorBorder: OutlineInputBorder( errorBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: FlutterFlowTheme.of(context) color: FlutterFlowTheme.of(context).error,
.error,
width: 0.5, width: 0.5,
), ),
borderRadius: borderRadius: BorderRadius.circular(10.0),
BorderRadius.circular(10.0),
), ),
focusedErrorBorder: OutlineInputBorder( focusedErrorBorder: OutlineInputBorder(
borderSide: BorderSide( borderSide: BorderSide(
color: FlutterFlowTheme.of(context) color: FlutterFlowTheme.of(context).error,
.error,
width: 0.5, width: 0.5,
), ),
borderRadius: borderRadius: BorderRadius.circular(10.0),
BorderRadius.circular(10.0),
), ),
suffixIcon: Icon( suffixIcon: Icon(
Icons.date_range, Icons.date_range,
color: FlutterFlowTheme.of(context) color: FlutterFlowTheme.of(context).accent1,
.accent1,
), ),
), ),
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).bodyMedium.override(
.bodyMedium fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
.override(
fontFamily:
FlutterFlowTheme.of(context)
.bodyMediumFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey( .containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
FlutterFlowTheme.of(context)
.bodyMediumFamily),
lineHeight: 1.8, lineHeight: 1.8,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
textAlign: TextAlign.start, textAlign: TextAlign.start,
validator: _model validator: _model.textControllerDataValidator.asValidator(context),
.textControllerDataValidator
.asValidator(context),
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
24.0, 0.0, 24.0, 0.0),
child: InkWell( child: InkWell(
splashColor: Colors.transparent, splashColor: Colors.transparent,
focusColor: Colors.transparent, focusColor: Colors.transparent,
@ -347,45 +295,21 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
return wrapInMaterialDatePickerTheme( return wrapInMaterialDatePickerTheme(
context, context,
child!, child!,
headerBackgroundColor: headerBackgroundColor: FlutterFlowTheme.of(context).primary,
FlutterFlowTheme.of(context) headerForegroundColor: FlutterFlowTheme.of(context).info,
.primary, headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
headerForegroundColor: fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
FlutterFlowTheme.of(context)
.info,
headerTextStyle:
FlutterFlowTheme.of(context)
.headlineLarge
.override(
fontFamily: FlutterFlowTheme
.of(context)
.headlineLargeFamily,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: fontWeight: FontWeight.w600,
FontWeight.w600, useGoogleFonts: GoogleFonts.asMap()
useGoogleFonts: GoogleFonts .containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.headlineLargeFamily),
), ),
pickerBackgroundColor: pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
FlutterFlowTheme.of(context) pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
.primaryBackground, selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
pickerForegroundColor: selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
FlutterFlowTheme.of(context) actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
.primaryText,
selectedDateTimeBackgroundColor:
FlutterFlowTheme.of(context)
.primary,
selectedDateTimeForegroundColor:
FlutterFlowTheme.of(context)
.info,
actionButtonForegroundColor:
FlutterFlowTheme.of(context)
.primaryText,
iconSize: 24.0, iconSize: 24.0,
); );
}, },
@ -399,18 +323,14 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
pickedDate.day, pickedDate.day,
); );
_model.textControllerData = _model.textControllerData = TextEditingController(
TextEditingController(
text: dateTimeFormat( text: dateTimeFormat(
'dd/MM/yyyy', 'dd/MM/yyyy',
_model.selectedDate, _model.selectedDate,
locale: FFLocalizations.of(context) locale: FFLocalizations.of(context).languageCode,
.languageCode,
)); ));
_model.textControllerData?.selection = _model.textControllerData?.selection = TextSelection.collapsed(
TextSelection.collapsed( offset: _model.textControllerData!.text.length,
offset: _model.textControllerData!
.text.length,
); );
}); });
} }
@ -419,8 +339,7 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
width: double.infinity, width: double.infinity,
height: 80.0, height: 80.0,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.circular(10.0),
BorderRadius.circular(10.0),
), ),
), ),
), ),
@ -434,24 +353,19 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
Align( Align(
alignment: const AlignmentDirectional(-1.0, 0.0), alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15),
24.0, 0, 0.0, 15),
child: Text( child: Text(
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(
ptText: 'Selecione as opções disponíveis', ptText: 'Selecione as opções disponíveis',
enText: 'Select the available options', enText: 'Select the available options',
), ),
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).bodySmall.override(
.bodySmall fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
.override(
fontFamily: FlutterFlowTheme.of(context)
.bodySmallFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts:
FlutterFlowTheme.of(context) GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
.bodyMediumFamily),
fontSize: limitedSubHeaderFontSize, fontSize: limitedSubHeaderFontSize,
), ),
), ),
@ -462,75 +376,56 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
child: CustomSelect( child: CustomSelect(
options: const ['MAC', 'FEM'], options: const ['MAC', 'FEM'],
controller: _model.dropDownValueController1 ??= controller: _model.dropDownValueController1 ??=
FormFieldController<String>( FormFieldController<String>(_model.dropDownValue1 ??= ''),
_model.dropDownValue1 ??= ''),
isRequired: true, isRequired: true,
changed: (val) => safeSetState(() { changed: (val) => safeSetState(() {
_model.dropDownValue1 = val; _model.dropDownValue1 = val;
}), }),
dropDownValue: _model.dropDownValue1, dropDownValue: _model.dropDownValue1,
optionsLabel: [ optionsLabel: [
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(ptText: 'Macho', enText: 'Male'),
ptText: 'Macho', enText: 'Male'), FFLocalizations.of(context).getVariableText(ptText: 'Fêmea', enText: 'Female')
FFLocalizations.of(context).getVariableText(
ptText: 'Fêmea', enText: 'Female')
], ],
hintText: FFLocalizations.of(context).getVariableText( hintText: FFLocalizations.of(context)
ptText: 'Gênero do Pet', .getVariableText(ptText: 'Gênero do Pet', enText: 'Gender of the Pet')),
enText: 'Gender of the Pet')
),
), ),
Padding( Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15), padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
child: CustomSelect( child: CustomSelect(
options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'], options: const ['MIN', 'PEQ', 'MED', 'GRA', 'GIG'],
controller: _model.dropDownValueController2 ??= controller: _model.dropDownValueController2 ??=
FormFieldController<String>( FormFieldController<String>(_model.dropDownValue2 ??= ''),
_model.dropDownValue2 ??= ''),
isRequired: true, isRequired: true,
changed: (val) => safeSetState(() { changed: (val) => safeSetState(() {
_model.dropDownValue2 = val; _model.dropDownValue2 = val;
}), }),
dropDownValue: _model.dropDownValue2, dropDownValue: _model.dropDownValue2,
optionsLabel: [ optionsLabel: [
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(ptText: 'Mini', enText: 'Mini'),
ptText: 'Mini', enText: 'Mini'), FFLocalizations.of(context).getVariableText(ptText: 'Pequeno', enText: 'Small'),
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(ptText: 'Médio', enText: 'Medium'),
ptText: 'Pequeno', enText: 'Small'), FFLocalizations.of(context).getVariableText(ptText: 'Grande', enText: 'Big'),
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(ptText: 'Gigante', enText: 'Giant'),
ptText: 'Médio', enText: 'Medium'),
FFLocalizations.of(context).getVariableText(
ptText: 'Grande', enText: 'Big'),
FFLocalizations.of(context).getVariableText(
ptText: 'Gigante', enText: 'Giant'),
], ],
hintText: FFLocalizations.of(context).getVariableText( hintText: FFLocalizations.of(context)
ptText: 'Porte do Pet', .getVariableText(ptText: 'Porte do Pet', enText: 'Size of the Pet')),
enText: 'Size of the Pet')),
), ),
Align( Align(
alignment: const AlignmentDirectional(-1.0, 0.0), alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15),
24.0, 0, 0.0, 15),
child: Text( child: Text(
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(
ptText: ptText: 'Você tem alguma observação sobre o seu Pet?',
'Você tem alguma observação sobre o seu Pet?', enText: 'Do you have any observations about your Pet?',
enText:
'Do you have any observations about your Pet?',
), ),
textAlign: TextAlign.start, textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).bodySmall.override(
.bodySmall fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
.override(
fontFamily: FlutterFlowTheme.of(context)
.bodySmallFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts:
FlutterFlowTheme.of(context) GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
.bodyMediumFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
), ),
@ -538,15 +433,12 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
), ),
CustomInputUtil( CustomInputUtil(
controller: _model.textControllerObservation, controller: _model.textControllerObservation,
validator: _model.textControllerObservationValidator validator: _model.textControllerObservationValidator.asValidator(context),
.asValidator(context),
focusNode: _model.textFieldFocusObservation, focusNode: _model.textFieldFocusObservation,
labelText: FFLocalizations.of(context).getVariableText( labelText: FFLocalizations.of(context).getVariableText(
ptText: 'Escreva as suas observações aqui...', ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'),
enText: 'Write your observations here...'),
hintText: FFLocalizations.of(context).getVariableText( hintText: FFLocalizations.of(context).getVariableText(
ptText: 'Escreva as suas observações aqui...', ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'),
enText: 'Write your observations here...'),
suffixIcon: Icons.text_fields, suffixIcon: Icons.text_fields,
haveMaxLength: true, haveMaxLength: true,
onChanged: (value) => setState(() {}), onChanged: (value) => setState(() {}),
@ -555,12 +447,8 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
Padding( Padding(
padding: const EdgeInsets.fromLTRB(70, 20, 70, 30), padding: const EdgeInsets.fromLTRB(70, 20, 70, 30),
child: SubmitButtonUtil( child: SubmitButtonUtil(
labelText: FFLocalizations.of(context) labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cadastrar', enText: 'Register'),
.getVariableText( onPressed: _model.isFormValid(context) ? _model.registerPet : null),
ptText: 'Cadastrar', enText: 'Register'),
onPressed: _model.isFormValid(context)
? _model.registerPet
: null),
), ),
])), ])),
], ],

View File

@ -23,8 +23,7 @@ class PreferencesPageModel with ChangeNotifier {
late bool isPanic = false; late bool isPanic = false;
Future<void> _initialize() async { Future<void> _initialize() async {
isFingerprint = isFingerprint = await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
isPerson = await StorageHelper().get(SQLiteStorageKey.person.value, Storage.SQLiteStorage) == 'true'; isPerson = await StorageHelper().get(SQLiteStorageKey.person.value, Storage.SQLiteStorage) == 'true';
isNotify = await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true'; isNotify = await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true';
isAccess = await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true'; isAccess = await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true';
@ -89,8 +88,8 @@ class PreferencesPageModel with ChangeNotifier {
); );
SnackBarUtil.showSnackBar(context, content, isError: true); SnackBarUtil.showSnackBar(context, content, isError: true);
}) })
.then((_) async => isNotify = .then((_) async =>
await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true') isNotify = await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true')
.whenComplete(() => notifyListeners()); .whenComplete(() => notifyListeners());
context.pop(); context.pop();
} }
@ -168,8 +167,8 @@ class PreferencesPageModel with ChangeNotifier {
); );
SnackBarUtil.showSnackBar(context, content, isError: true); SnackBarUtil.showSnackBar(context, content, isError: true);
}) })
.then((_) async => isAccess = .then((_) async =>
await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true') isAccess = await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true')
.whenComplete(() => notifyListeners()); .whenComplete(() => notifyListeners());
} }
@ -228,8 +227,7 @@ class PreferencesPageModel with ChangeNotifier {
.set(SQLiteStorageKey.fingerprint.value, isFingerprint ? 'true' : 'false', Storage.SQLiteStorage); .set(SQLiteStorageKey.fingerprint.value, isFingerprint ? 'true' : 'false', Storage.SQLiteStorage);
notifyListeners(); notifyListeners();
SnackBarUtil.showSnackBar(context, content); SnackBarUtil.showSnackBar(context, content);
isFingerprint = isFingerprint = await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
} }
isFingerprint ? onChange(null) : _showPassKey(context, onChange); isFingerprint ? onChange(null) : _showPassKey(context, onChange);

View File

@ -22,7 +22,6 @@ class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ChangeNotifierProvider<PreferencesPageModel>( return ChangeNotifierProvider<PreferencesPageModel>(

View File

@ -29,8 +29,7 @@ class QrCodePageModel extends FlutterFlowModel<QrCodePageWidget> {
} }
Future<void> initVariable() async { Future<void> initVariable() async {
isFingerprint = isFingerprint = await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
userDevUUID = await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage) ?? ''; userDevUUID = await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage) ?? '';
safeSetState?.call(); safeSetState?.call();
} }

View File

@ -125,9 +125,8 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
fontSize: limitedHeaderTextSize, fontSize: limitedHeaderTextSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts:
FlutterFlowTheme.of(context).bodyMediumFamily), GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
), ),
), ),
), ),
@ -207,21 +206,15 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
), ),
options: FFButtonOptions( options: FFButtonOptions(
height: 40.0, height: 40.0,
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
24.0, 0.0, 24.0, 0.0), iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context).primary, color: FlutterFlowTheme.of(context).primary,
textStyle: FlutterFlowTheme.of(context) textStyle: FlutterFlowTheme.of(context).titleSmall.override(
.titleSmall fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
.override(
fontFamily: FlutterFlowTheme.of(context)
.titleSmallFamily,
color: Colors.white, color: Colors.white,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context) .containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
.titleSmallFamily),
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 12, 12, 10), fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 12, 12, 10),
), ),
elevation: 3.0, elevation: 3.0,
@ -248,18 +241,16 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
visible: _model.isAccess == true, visible: _model.isAccess == true,
child: Text( child: Text(
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(
ptText: ptText: 'Certifique-se de que o QRCode está visivel para o leitor',
'Certifique-se de que o QRCode está visivel para o leitor',
enText: 'Make sure the QRCode is visible to the reader', enText: 'Make sure the QRCode is visible to the reader',
// '6z6kvmhl' /* Certifique-se de que o QRCode ... */, // '6z6kvmhl' /* Certifique-se de que o QRCode ... */,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: FlutterFlowTheme.of(context).bodyMedium.override( style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
FlutterFlowTheme.of(context).bodyMediumFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts:
FlutterFlowTheme.of(context).bodyMediumFamily), GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedBodyFontSize, fontSize: limitedBodyFontSize,
), ),
), ),
@ -283,8 +274,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
children: [ children: [
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 0.0),
10.0, 0.0, 0.0, 0.0),
child: Text( child: Text(
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(
ptText: 'Expirando QR code em', ptText: 'Expirando QR code em',
@ -293,13 +283,11 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: FlutterFlowTheme.of(context).bodyMedium.override( style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
FlutterFlowTheme.of(context).bodyMediumFamily,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts:
FlutterFlowTheme.of(context) GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
.bodyMediumFamily),
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14), fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
), ),
), ),
@ -308,13 +296,11 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
Align( Align(
alignment: const AlignmentDirectional(0.0, 0.0), alignment: const AlignmentDirectional(0.0, 0.0),
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 20.0, 0.0),
0.0, 0.0, 20.0, 0.0),
child: StreamBuilder<double>( child: StreamBuilder<double>(
stream: getProgressValue(), stream: getProgressValue(),
builder: (context, snapshot) { builder: (context, snapshot) {
if (snapshot.connectionState == if (snapshot.connectionState == ConnectionState.waiting) {
ConnectionState.waiting) {
return const CircularProgressIndicator(); return const CircularProgressIndicator();
} else if (snapshot.hasError) { } else if (snapshot.hasError) {
return Text('Error: ${snapshot.error}'); return Text('Error: ${snapshot.error}');
@ -333,23 +319,16 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
onAnimationEnd: () { onAnimationEnd: () {
_resetAnimationAndToggleAccess(); _resetAnimationAndToggleAccess();
}, },
progressColor: progressColor: FlutterFlowTheme.of(context).primary,
FlutterFlowTheme.of(context).primary, backgroundColor: FlutterFlowTheme.of(context).primaryText,
backgroundColor:
FlutterFlowTheme.of(context).primaryText,
center: Text( center: Text(
'${(progress * totalTimeInSeconds / 5).toStringAsFixed(1)}s', '${(progress * totalTimeInSeconds / 5).toStringAsFixed(1)}s',
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).headlineSmall.override(
.headlineSmall fontFamily: FlutterFlowTheme.of(context).headlineSmallFamily,
.override(
fontFamily: FlutterFlowTheme.of(context)
.headlineSmallFamily,
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14), fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap()
.containsKey( .containsKey(FlutterFlowTheme.of(context).headlineSmallFamily),
FlutterFlowTheme.of(context)
.headlineSmallFamily),
), ),
), ),
startAngle: 20.0, startAngle: 20.0,

View File

@ -123,8 +123,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
enText: 'My Identifier'), enText: 'My Identifier'),
textStyle: FlutterFlowTheme.of(context).labelSmall.override( textStyle: FlutterFlowTheme.of(context).labelSmall.override(
fontFamily: 'Nunito Sans', fontFamily: 'Nunito Sans',
color: FlutterFlowTheme.of(context) color: FlutterFlowTheme.of(context).secondaryText,
.secondaryText,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -137,11 +136,8 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
options: FFButtonOptions( options: FFButtonOptions(
width: double.infinity, width: double.infinity,
height: 30, height: 30,
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
0.0, 0.0, 0.0, 0.0), iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding:
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context).primary, color: FlutterFlowTheme.of(context).primary,
textStyle: FlutterFlowTheme.of(context).titleSmall.override( textStyle: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: 'Nunito Sans', fontFamily: 'Nunito Sans',
@ -175,16 +171,10 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
options: FFButtonOptions( options: FFButtonOptions(
width: double.infinity, width: double.infinity,
height: 30, height: 30,
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
0.0, 0.0, 0.0, 0.0), iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding: color: FlutterFlowTheme.of(context).customColor1,
const EdgeInsetsDirectional.fromSTEB( textStyle: FlutterFlowTheme.of(context).titleSmall.override(
0.0, 0.0, 0.0, 0.0),
color:
FlutterFlowTheme.of(context).customColor1,
textStyle: FlutterFlowTheme.of(context)
.titleSmall
.override(
fontFamily: 'Nunito Sans', fontFamily: 'Nunito Sans',
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,

View File

@ -419,7 +419,6 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
ptText: 'Cancelar', ptText: 'Cancelar',
enText: 'Cancel', enText: 'Cancel',
), ),
icon: const Icon(Icons.close), icon: const Icon(Icons.close),
onPressed: () async { onPressed: () async {
showAlertDialog( showAlertDialog(

View File

@ -130,7 +130,6 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
return Column( return Column(
@ -144,14 +143,13 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Center( Center(
child: Text(FFLocalizations.of(context) child: Text(
FFLocalizations.of(context)
.getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"), .getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"),
style: TextStyle( style: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
fontWeight: FontWeight.bold fontWeight: FontWeight.bold)),
)
),
) )
], ],
), ),
@ -249,12 +247,9 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
], ],
onTapCardItemAction: () async { onTapCardItemAction: () async {
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final userUUID = final userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? ''; final cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final cliUUID = final cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final cliName =
(await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
await showDialog( await showDialog(
useSafeArea: true, useSafeArea: true,

View File

@ -18,8 +18,7 @@ class AtomTermsOfUse extends StatelessWidget {
style: FlutterFlowTheme.of(context).bodyMedium.override( style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: LimitedFontSizeUtil.getInputFontSize( fontSize: LimitedFontSizeUtil.getInputFontSize(context),
context),
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily), useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
), ),

View File

@ -15,7 +15,8 @@ class SQLiteStorage implements BaseStorage {
late final _database; late final _database;
@override Future<void> init() async { @override
Future<void> init() async {
_database = await openDatabase( _database = await openDatabase(
join(await getDatabasesPath(), _dbName), join(await getDatabasesPath(), _dbName),
version: _dbVersion, version: _dbVersion,
@ -29,10 +30,10 @@ class SQLiteStorage implements BaseStorage {
_onCreate(Database database, int version) async { _onCreate(Database database, int version) async {
await database.execute(_tableKeychain); await database.execute(_tableKeychain);
} }
_onUpdate(Database database, int oldVersion, int newVersion) async {} _onUpdate(Database database, int oldVersion, int newVersion) async {}
_onDowngrade(Database database, int oldVersion, int newVersion) async {} _onDowngrade(Database database, int oldVersion, int newVersion) async {}
String get _tableKeychain => ''' String get _tableKeychain => '''
CREATE TABLE keychain ( CREATE TABLE keychain (
key TEXT UNIQUE, key TEXT UNIQUE,
@ -66,7 +67,8 @@ class SQLiteStorage implements BaseStorage {
{'key': SQLiteStorageKey.petAmount.value, 'value': '', 'type': 'local'}, {'key': SQLiteStorageKey.petAmount.value, 'value': '', 'type': 'local'},
]; ];
@override Future<String?> get(String key) async { @override
Future<String?> get(String key) async {
var response = await _database.query('keychain', where: 'key = ?', whereArgs: [key]); var response = await _database.query('keychain', where: 'key = ?', whereArgs: [key]);
if (response.isEmpty) { if (response.isEmpty) {
return null; return null;
@ -74,7 +76,8 @@ class SQLiteStorage implements BaseStorage {
return response.first['value']; return response.first['value'];
} }
@override Future<void> set(String key, String value) async { @override
Future<void> set(String key, String value) async {
var date = DateTime.now().toIso8601String(); var date = DateTime.now().toIso8601String();
await _database.insert( await _database.insert(
tableKeychain, tableKeychain,
@ -86,15 +89,16 @@ class SQLiteStorage implements BaseStorage {
'resolvedAt': date, 'resolvedAt': date,
'createdAt': date, 'createdAt': date,
}, },
conflictAlgorithm: ConflictAlgorithm.replace conflictAlgorithm: ConflictAlgorithm.replace);
);
} }
@override Future<void> delete(String key) async { @override
Future<void> delete(String key) async {
await _database.delete('keychain', where: 'key = ?', whereArgs: [key]); await _database.delete('keychain', where: 'key = ?', whereArgs: [key]);
} }
@override Future<void> clearAll() async { @override
Future<void> clearAll() async {
await _database.delete('keychain'); await _database.delete('keychain');
} }
} }

View File

@ -4,13 +4,11 @@ import 'package:hub/shared/helpers/secure_storage.dart';
import 'package:hub/shared/helpers/shared_preferences_storage.dart'; import 'package:hub/shared/helpers/shared_preferences_storage.dart';
import 'package:hub/shared/helpers/sqlite_storage.dart'; import 'package:hub/shared/helpers/sqlite_storage.dart';
class StorageHelper { class StorageHelper {
static final StorageHelper _instance = StorageHelper._internal(); static final StorageHelper _instance = StorageHelper._internal();
factory StorageHelper() => _instance; factory StorageHelper() => _instance;
StorageHelper._internal(); StorageHelper._internal();
late BuildContext? _context; late BuildContext? _context;
late bool _isRecovered = false; late bool _isRecovered = false;
BuildContext? get context => _context; BuildContext? get context => _context;
@ -75,6 +73,4 @@ class StorageHelper {
return SQLiteStorage.instance.clearAll(); return SQLiteStorage.instance.clearAll();
} }
} }
} }

View File

@ -84,7 +84,8 @@ class AuthenticationService {
DialogUtil.error(context, response.jsonBody['error_msg'].toString()); DialogUtil.error(context, response.jsonBody['error_msg'].toString());
} }
} }
} return; }
return;
} catch (e, s) { } catch (e, s) {
DialogUtil.errorDefault(context); DialogUtil.errorDefault(context);
LogUtil.requestAPIFailed('login.php', emailAdress.toString(), "Login", e, s); LogUtil.requestAPIFailed('login.php', emailAdress.toString(), "Login", e, s);

View File

@ -226,7 +226,6 @@ class LocalizationService {
return; return;
} }
await DialogUtil.error(context, errorMsg).whenComplete(() async => await selectLocal(context)); await DialogUtil.error(context, errorMsg).whenComplete(() async => await selectLocal(context));
} }
static Future<bool> _handleUnavailable(BuildContext context, List<dynamic> locals) async { static Future<bool> _handleUnavailable(BuildContext context, List<dynamic> locals) async {
@ -283,8 +282,7 @@ class LocalizationService {
static Future<bool> _isUnselected() async { static Future<bool> _isUnselected() async {
String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? ''; String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
String cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? ''; String cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
String ownerUUID = String ownerUUID = (await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty; return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty;
} }
@ -312,9 +310,7 @@ class LocalizationService {
jsonBody['petAmountRegister'] != null && jsonBody['petAmountRegister'].toString().isEmpty jsonBody['petAmountRegister'] != null && jsonBody['petAmountRegister'].toString().isEmpty
? '0' ? '0'
: jsonBody['petAmountRegister'].toString(), : jsonBody['petAmountRegister'].toString(),
Storage.SQLiteStorage Storage.SQLiteStorage);
); await StorageHelper().set(SQLiteStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'], Storage.SQLiteStorage);
await StorageHelper()
.set(SQLiteStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'], Storage.SQLiteStorage);
} }
} }

View File

@ -1,7 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class LimitedFontSizeUtil { class LimitedFontSizeUtil {
static double getCalculateFontSize(BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) { static double getCalculateFontSize(
BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) {
final textScaler = MediaQuery.textScalerOf(context); final textScaler = MediaQuery.textScalerOf(context);
final double scaledFontSize = baseFontSize * textScaler.scale(1); final double scaledFontSize = baseFontSize * textScaler.scale(1);
return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize; return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize;
@ -13,7 +14,8 @@ class LimitedFontSizeUtil {
return noscaledFontSize; return noscaledFontSize;
} }
static double getScaledSizedBoxSize(BuildContext context, double baseFontSize, double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) { static double getScaledSizedBoxSize(
BuildContext context, double baseFontSize, double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) {
final textScaler = MediaQuery.textScalerOf(context); final textScaler = MediaQuery.textScalerOf(context);
final double scaledFontSize = baseFontSize * textScaler.scale(1); final double scaledFontSize = baseFontSize * textScaler.scale(1);
return scaledFontSize > maxFontSize ? sizeIfExceeded : sizeIfNotExceeded; return scaledFontSize > maxFontSize ? sizeIfExceeded : sizeIfNotExceeded;

View File

@ -16,9 +16,8 @@ class TextUtil extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
var textScale = MediaQuery.textScalerOf(context); var textScale = MediaQuery.textScalerOf(context);
var scaledTextSize = textScale.scale(style?.fontSize ?? 14); var scaledTextSize = textScale.scale(style?.fontSize ?? 14);
double limitedTextSize = scaledTextSize > (style?.fontSize ?? 14) * 2 double limitedTextSize =
? (style?.fontSize ?? 14) * 2 scaledTextSize > (style?.fontSize ?? 14) * 2 ? (style?.fontSize ?? 14) * 2 : scaledTextSize;
: scaledTextSize;
return Text( return Text(
text, text,