This commit is contained in:
J. A. Messias 2024-11-11 14:08:17 -03:00
parent e36df19108
commit 2bc3db5c44
55 changed files with 1479 additions and 2543 deletions

View File

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

View File

@ -61,10 +61,8 @@ class PhpGroup {
class UnregisterDevice {
Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall(
callName: 'unregisterDevice',
@ -91,12 +89,9 @@ class UnregisterDevice {
class DeletePet {
Future<ApiCallResponse> call({final int? petID = 0}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'excluirPet';
return ApiManager.instance.makeApiCall(
@ -139,12 +134,9 @@ class UpdatePet {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'atualizarPet';
return ApiManager.instance.makeApiCall(
@ -188,12 +180,9 @@ class GetPets {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'consultaPets';
return ApiManager.instance.makeApiCall(
@ -225,12 +214,9 @@ class GetPetPhoto {
Future<ApiCallResponse> call({final int? petId}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'consultaFotoPet';
return ApiManager.instance.makeApiCall(
@ -271,12 +257,9 @@ class RegisterPet {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'cadastrarPet';
return ApiManager.instance.makeApiCall(
@ -319,12 +302,9 @@ class BuscaEnconcomendas {
final String? adresseeType,
final String? status,
}) async {
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getEncomendas';
final String baseUrl = PhpGroup.getBaseUrl();
@ -366,12 +346,9 @@ class CancelaVisita {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'cancelaVisita';
return ApiManager.instance.makeApiCall(
@ -403,10 +380,8 @@ class CancelaVisita {
class DeleteAccount {
Future<ApiCallResponse> call() async {
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String baseUrl = PhpGroup.getBaseUrl();
return ApiManager.instance.makeApiCall(
@ -437,12 +412,9 @@ class ChangePanic {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall(
@ -476,12 +448,9 @@ class ChangePass {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall(
@ -515,12 +484,9 @@ class RespondeVinculo {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall(
callName: 'respondeVinculo',
@ -552,12 +518,9 @@ class ChangeNotifica {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall(
@ -589,14 +552,10 @@ class UpdateIDE {
Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
final String newIde =
(await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
final String newIde = (await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall(
@ -628,10 +587,8 @@ class UpdToken {
Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
return ApiManager.instance.makeApiCall(
@ -659,20 +616,17 @@ class UpdToken {
class LoginCall {
Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String email = (await StorageHelper().get(SecureStorageKey.email.value, Storage.SecureStorage)) ?? '';
final String password =
(await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
final String type =
(await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
final String password = (await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
final String type = (await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
final String description =
(await StorageHelper().get(SecureStorageKey.deviceDescription.value, Storage.SecureStorage)) ?? '';
late final String token;
try {
token = await FirebaseMessagingService.getToken();
if(token == null || token.isEmpty) throw Exception('Token is empty'); }
catch (e, s) {
if (token == null || token.isEmpty) throw Exception('Token is empty');
} catch (e, s) {
token = '';
log('Error getting token', error: e, stackTrace: s);
LogUtil.requestAPIFailed('login.php', email, "Login", e, s);
@ -750,12 +704,9 @@ class ChangePasswordCall {
required final String psswd,
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall(
callName: 'changePassword',
@ -854,12 +805,9 @@ class PostScheduleVisitorCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'putVisitante';
return ApiManager.instance.makeApiCall(
@ -912,12 +860,9 @@ class PostScheduleVisitCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'putVisita';
return ApiManager.instance.makeApiCall(
@ -969,12 +914,9 @@ class GetScheduleVisitCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
const String atividade = 'getVisitas';
return ApiManager.instance.makeApiCall(
@ -1246,12 +1188,9 @@ class GetDadosCall {
Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
const String atividade = 'getDados';
return ApiManager.instance.makeApiCall(
@ -1482,12 +1421,9 @@ class GetVisitorByDocCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getVisitante';
return ApiManager.instance.makeApiCall(
@ -1539,12 +1475,9 @@ class GetFotoVisitanteCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getFotoVisitante';
return ApiManager.instance.makeApiCall(
@ -1581,12 +1514,9 @@ class PostProvVisitSchedulingCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'putAgendamentoProv';
return ApiManager.instance.makeApiCall(
@ -1633,12 +1563,9 @@ class GetVisitsCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getVisitas';
return ApiManager.instance.makeApiCall(
@ -1899,12 +1826,9 @@ class DeleteVisitCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'cancelaVisita';
return ApiManager.instance.makeApiCall(
@ -1945,14 +1869,10 @@ class GetPessoasLocalCall {
Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String ownerUUID =
(await StorageHelper().get(SQLiteStorageKey.ownerUUID.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)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String ownerUUID = (await StorageHelper().get(SQLiteStorageKey.ownerUUID.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(
callName: 'getPessoasLocal',
@ -2015,12 +1935,9 @@ class RespondeSolicitacaoCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
const String atividade = 'respondeSolicitacao';
return ApiManager.instance.makeApiCall(
@ -2068,12 +1985,9 @@ class GetAccessCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
const String atividade = 'getAcessos';
return ApiManager.instance.makeApiCall(
@ -2320,10 +2234,8 @@ class GetLiberationsCall {
final StreamController<ApiCallResponse> controller = StreamController();
Future.microtask(() async {
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
const String atividade = 'getSolicitacoes';
@ -2515,12 +2427,9 @@ class GetMessagesCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID =
(await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.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)) ?? '';
const String atividade = 'getMensagens';
return ApiManager.instance.makeApiCall(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -29,13 +29,11 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
late Map<String, dynamic> selected;
final List<Map<String, String>> adresseeTypeOptions = [
{
'title':
FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Resident', ptText: 'Morador'),
'title': FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Resident', ptText: 'Morador'),
'value': 'MOR'
},
{
'title': FFLocalizations.of(StorageHelper().context!)
.getVariableText(enText: 'Property', ptText: 'Propriedade'),
'title': FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Property', ptText: 'Propriedade'),
'value': 'PRO'
},
];
@ -46,8 +44,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
'value': 'notPickedUp'
},
{
'title':
FFLocalizations.of(StorageHelper().context!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
'title': FFLocalizations.of(StorageHelper().context!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
'value': 'pickedUp'
},
];
@ -213,8 +210,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
_buildCheckboxListTile(
'adresseeType', adresseeTypeOptions, limitedBodyFontSize),
_buildCheckboxListTile('adresseeType', adresseeTypeOptions, limitedBodyFontSize),
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
],
),
@ -227,7 +223,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
foregroundColor: FlutterFlowTheme.of(context).info,
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();
}
@override Widget build(BuildContext context) {
@override
Widget build(BuildContext context) {
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
return InkWell(
@ -139,7 +141,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
fontSize: limitedHeaderFontSize,
letterSpacing: 0.0,
fontWeight: FontWeight.bold,
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
useGoogleFonts:
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
),
),
Padding(
@ -151,7 +154,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
useGoogleFonts:
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedBodyFontSize,
),
),
@ -163,5 +167,5 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
),
),
);
}
}
}

View File

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

View File

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

View File

@ -52,7 +52,11 @@ class _MenuStaggeredViewComponentWidgetState extends State<MenuStaggeredViewComp
Widget build(BuildContext context) {
final textScaler = MediaQuery.textScalerOf(context);
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(
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/shared/utils/limited_text_size.dart';
class DetailsComponentWidget extends StatefulWidget {
const DetailsComponentWidget({
Key? key,
@ -176,7 +175,6 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
return TextFormField(
readOnly: true,
initialValue: '$value',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).primaryText,
@ -186,9 +184,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
),
fontSize: limitedBodyFontSize,
),
decoration: InputDecoration(
labelText: key,
filled: true,
fillColor: FlutterFlowTheme.of(context).primaryBackground,
@ -205,14 +201,9 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context).labelMediumFamily,
),
),
hintStyle: FlutterFlowTheme.of(context)
.labelMedium
.override(
fontFamily:
FlutterFlowTheme.of(context).labelMediumFamily,
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
color: FlutterFlowTheme.of(context).primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey(

View File

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

View File

@ -70,11 +70,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
FFLocalizations.of(context).getText('uj8acuab'),
textAlign: TextAlign.start,
overflow: TextOverflow.clip,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: FlutterFlowTheme.of(context)
.bodyMediumFamily,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
fontSize: limitedHeaderFontSize,
letterSpacing: 0.0,
fontWeight: FontWeight.bold,
@ -103,9 +100,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
FlutterFlowTheme.of(context)
.bodyMediumFamily),
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedSubHeaderFontSize,
),
),
@ -154,27 +149,16 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
),
Expanded(
child: Padding(
padding: const EdgeInsetsDirectional
.fromSTEB(15.0, 0.0, 0.0, 0.0),
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 0.0, 0.0),
child: Text(
model.cliName,
overflow: TextOverflow.ellipsis,
maxLines: 1,
style:
FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedBodyFontSize,
),
),
@ -205,9 +189,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap()
.containsKey(
FlutterFlowTheme.of(context)
.bodyMediumFamily),
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedSubHeaderFontSize,
),
),
@ -251,7 +233,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
fontSize: limitedInputFontSize,
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
@ -290,14 +271,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedInputFontSize,
),
textAlign: TextAlign.start,
maxLines: null,
@ -340,7 +316,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedInputFontSize,
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
@ -381,7 +356,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedInputFontSize,
),
textAlign: TextAlign.start,
validator: model.dateTimeTextControllerValidator.asValidator(context),
@ -524,7 +498,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
child: TextFormField(
controller: model.notesTextController,
focusNode: model.notesFocusNode,
autofocus: false,
showCursor: true,
cursorColor: FlutterFlowTheme.of(context).primary,
@ -532,43 +505,20 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
obscureText: false,
decoration: InputDecoration(
isDense: true,
counterStyle: FlutterFlowTheme
.of(context)
.bodyText1
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyText1Family,
color: FlutterFlowTheme.of(
context)
.primaryText,
counterStyle: FlutterFlowTheme.of(context).bodyText1.override(
fontFamily: FlutterFlowTheme.of(context).bodyText1Family,
color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedInputFontSize,
),
labelText:
FFLocalizations.of(
context)
.getText(
labelText: FFLocalizations.of(context).getText(
'cw8b3tbb' /* Observação da Visita */,
),
labelStyle: FlutterFlowTheme
.of(context)
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
color: FlutterFlowTheme
.of(context)
.primaryText,
labelStyle: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
color: FlutterFlowTheme.of(context).primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
.bodyMediumFamily),
useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedInputFontSize,
),
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
@ -619,7 +569,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
useGoogleFonts: GoogleFonts.asMap()
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
fontSize: limitedInputFontSize,
),
textAlign: TextAlign.start,
maxLines: 3,
@ -685,12 +634,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
showLoadingIndicator: true,
text: FFLocalizations.of(context).getText('bv5fg9sv'),
options: FFButtonOptions(
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
padding: const EdgeInsetsDirectional.fromSTEB(
24.0, 0.0, 24.0, 0.0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context).primary,
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
@ -700,7 +646,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
fontSize: limitedInputFontSize,
),
elevation: 3.0,
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
borderRadius: BorderRadius.circular(8.0),

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -80,10 +80,16 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
builder: (context, _) {
return FutureBuilder<Widget>(
future: () async {
final bool isLogged = await StorageHelper().get(SecureStorageKey.isLogged.value, Storage.SecureStorage) == 'true';
final bool haveLocal = 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;
final bool isLogged =
await StorageHelper().get(SecureStorageKey.isLogged.value, Storage.SecureStorage) == 'true';
final bool haveLocal =
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) {
return haveLocal ? const HomePageWidget() : const ReceptionPageWidget();

View File

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

View File

@ -49,9 +49,11 @@ Future<void> initializeApp() async {
Future<void> _initializeTracking() async {
await AppTrackingTransparency.requestTrackingAuthorization();
}
Future<void> _initializeFirebase() async {
await Firebase.initializeApp();
}
Future<void> _initializeNotificationService() async {
await NotificationService.initialize();
}
@ -59,6 +61,7 @@ Future<void> _initializeNotificationService() async {
void _initializeUrlStrategy() {
setUrlStrategy(PathUrlStrategy());
}
void _initializeSystemSettings() {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
if (kDebugMode) {
@ -77,6 +80,7 @@ Future<void> _initializeFlutterFlow() async {
GoRouter.optionURLReflectsImperativeAPIs = true;
usePathUrlStrategy();
}
Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
if (message.data['click_action'] == 'enroll_cond') {
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));
}
}
Future<void> _backgroundHandlerMessage(RemoteMessage message) async {
if (message.data['click_action'] == 'enroll_cond') {
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>()!;
}
class _AppState extends State<App> with WidgetsBindingObserver {
Locale? _locale = FFLocalizations.getStoredLocale();
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
@ -253,7 +259,6 @@ class _AppState extends State<App> with WidgetsBindingObserver {
super.initState();
WidgetsBinding.instance.addObserver(this);
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
_appStateNotifier = AppStateNotifier.instance;
_router = createRouter(_appStateNotifier);
@ -273,7 +278,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
@override
void didChangeAppLifecycleState(AppLifecycleState state) async {
if(state == AppLifecycleState.detached) {
if (state == AppLifecycleState.detached) {
await LocalizationService.processLocals(context);
FirebaseMessagingService().updateDeviceToken();
}
@ -295,4 +300,3 @@ class _AppState extends State<App> with WidgetsBindingObserver {
);
}
}

View File

@ -224,7 +224,10 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
SnackBar(
content: Text(
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),
backgroundColor: FlutterFlowTheme.of(context).primary,

View File

@ -24,14 +24,10 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
Future<Map<String, String>> initVariables() async {
final email = (await StorageHelper().get(hub.SecureStorageKey.email.value, hub.Storage.SecureStorage)) ?? '';
final name =
(await StorageHelper().get(hub.SQLiteStorageKey.userName.value, hub.Storage.SQLiteStorage)) ?? '';
final devUUID =
(await StorageHelper().get(hub.SQLiteStorageKey.devUUID.value, hub.Storage.SQLiteStorage)) ?? '';
final userUUID =
(await StorageHelper().get(hub.SQLiteStorageKey.userUUID.value, hub.Storage.SQLiteStorage)) ?? '';
final cliUUID =
(await StorageHelper().get(hub.SQLiteStorageKey.clientUUID.value, hub.Storage.SQLiteStorage)) ?? '';
final name = (await StorageHelper().get(hub.SQLiteStorageKey.userName.value, hub.Storage.SQLiteStorage)) ?? '';
final devUUID = (await StorageHelper().get(hub.SQLiteStorageKey.devUUID.value, hub.Storage.SQLiteStorage)) ?? '';
final userUUID = (await StorageHelper().get(hub.SQLiteStorageKey.userUUID.value, hub.Storage.SQLiteStorage)) ?? '';
final cliUUID = (await StorageHelper().get(hub.SQLiteStorageKey.clientUUID.value, hub.Storage.SQLiteStorage)) ?? '';
const createdAt = '0000-00-00 00:00:00';
final url = 'https://hub.freaccess.com.br/hub/fast-pass/$cliUUID';
final freUserData =

View File

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

View File

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

View File

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

View File

@ -106,7 +106,7 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
content: Text(
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
style: TextStyle(
color :Colors.white,
color: Colors.white,
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
),
),
@ -132,13 +132,13 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
mainAxisSize: MainAxisSize.max,
children: [
Center(
child: Text(FFLocalizations.of(context).getVariableText(
ptText: "Nenhum Pet encontrado!",
enText: "No pets found"),
child: Text(
FFLocalizations.of(context)
.getVariableText(ptText: "Nenhum Pet encontrado!", enText: "No pets found"),
style: TextStyle(
fontFamily: 'Nunito',
fontSize: limitedHeaderTextSize,)
),
fontSize: limitedHeaderTextSize,
)),
)
],
),
@ -250,12 +250,9 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
],
onTapCardItemAction: () async {
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final userUUID =
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final cliName =
(await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
final userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
await showDialog(
useSafeArea: true,
context: context,

View File

@ -106,8 +106,7 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
petAmountRegister =
(await StorageHelper().get(SQLiteStorageKey.petAmount.value, Storage.SQLiteStorage)) ?? '';
petAmountRegister = (await StorageHelper().get(SQLiteStorageKey.petAmount.value, Storage.SQLiteStorage)) ?? '';
safeSetState?.call();
}

View File

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

View File

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

View File

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

View File

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

View File

@ -122,8 +122,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
enText: 'My Identifier'),
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
fontFamily: 'Nunito Sans',
color: FlutterFlowTheme.of(context)
.secondaryText,
color: FlutterFlowTheme.of(context).secondaryText,
fontSize: limitedInputFontSize,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
@ -135,12 +134,9 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
.getVariableText(ptText: 'Meu Identificador', enText: 'My Identifier'),
options: FFButtonOptions(
width: double.infinity,
height:30,
padding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
iconPadding:
const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
height: 30,
padding: 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,
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: 'Nunito Sans',
@ -187,16 +183,10 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
options: FFButtonOptions(
width: double.infinity,
height: 30,
padding: 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).customColor1,
textStyle: FlutterFlowTheme.of(context)
.titleSmall
.override(
padding: 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).customColor1,
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: 'Nunito Sans',
color: FlutterFlowTheme.of(context).primaryBackground,
fontSize: limitedInputFontSize,

View File

@ -23,12 +23,9 @@ class _ReservationPageWidgetState extends State<ReservationPageWidget> {
Future<Map<String, String>> initVariables() async {
final email = (await StorageHelper().get(hub.SecureStorageKey.email.value, hub.Storage.SecureStorage)) ?? '';
final name =
(await StorageHelper().get(hub.SQLiteStorageKey.userName.value, hub.Storage.SQLiteStorage)) ?? '';
final devUUID =
(await StorageHelper().get(hub.SQLiteStorageKey.devUUID.value, hub.Storage.SQLiteStorage)) ?? '';
final userUUID =
(await StorageHelper().get(hub.SQLiteStorageKey.userUUID.value, hub.Storage.SQLiteStorage)) ?? '';
final name = (await StorageHelper().get(hub.SQLiteStorageKey.userName.value, hub.Storage.SQLiteStorage)) ?? '';
final devUUID = (await StorageHelper().get(hub.SQLiteStorageKey.devUUID.value, hub.Storage.SQLiteStorage)) ?? '';
final userUUID = (await StorageHelper().get(hub.SQLiteStorageKey.userUUID.value, hub.Storage.SQLiteStorage)) ?? '';
final clientId =
(await StorageHelper().get(hub.SQLiteStorageKey.clientUUID.value, hub.Storage.SQLiteStorage)) ?? '';
const createdAt = '0000-00-00 00:00:00';

View File

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

View File

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

View File

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

View File

@ -15,7 +15,8 @@ class SQLiteStorage implements BaseStorage {
late final _database;
@override Future<void> init() async {
@override
Future<void> init() async {
_database = await openDatabase(
join(await getDatabasesPath(), _dbName),
version: _dbVersion,
@ -29,10 +30,10 @@ class SQLiteStorage implements BaseStorage {
_onCreate(Database database, int version) async {
await database.execute(_tableKeychain);
}
_onUpdate(Database database, int oldVersion, int newVersion) async {}
_onDowngrade(Database database, int oldVersion, int newVersion) async {}
String get _tableKeychain => '''
CREATE TABLE keychain (
key TEXT UNIQUE,
@ -66,7 +67,8 @@ class SQLiteStorage implements BaseStorage {
{'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]);
if (response.isEmpty) {
return null;
@ -74,7 +76,8 @@ class SQLiteStorage implements BaseStorage {
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();
await _database.insert(
tableKeychain,
@ -86,15 +89,16 @@ class SQLiteStorage implements BaseStorage {
'resolvedAt': 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]);
}
@override Future<void> clearAll() async {
@override
Future<void> clearAll() async {
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/sqlite_storage.dart';
class StorageHelper {
static final StorageHelper _instance = StorageHelper._internal();
factory StorageHelper() => _instance;
StorageHelper._internal();
late BuildContext? _context;
late bool _isRecovered = false;
BuildContext? get context => _context;
@ -75,6 +73,4 @@ class StorageHelper {
return SQLiteStorage.instance.clearAll();
}
}
}

View File

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

View File

@ -222,7 +222,6 @@ class LocalizationService {
return;
}
await DialogUtil.error(context, errorMsg).whenComplete(() async => await selectLocal(context));
}
static Future<bool> _handleUnavailable(BuildContext context, List<dynamic> locals) async {
@ -279,8 +278,7 @@ class LocalizationService {
static Future<bool> _isUnselected() async {
String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
String cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
String ownerUUID =
(await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
String ownerUUID = (await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty;
}
@ -308,9 +306,7 @@ class LocalizationService {
jsonBody['petAmountRegister'] != null && jsonBody['petAmountRegister'].toString().isEmpty
? '0'
: jsonBody['petAmountRegister'].toString(),
Storage.SQLiteStorage
);
await StorageHelper()
.set(SQLiteStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'], Storage.SQLiteStorage);
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';
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 double scaledFontSize = baseFontSize * textScaler.scale(1);
return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize;
@ -13,7 +14,8 @@ class LimitedFontSizeUtil {
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 double scaledFontSize = baseFontSize * textScaler.scale(1);
return scaledFontSize > maxFontSize ? sizeIfExceeded : sizeIfNotExceeded;

View File

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