Merge branch 'develop' into feature/fd-466
This commit is contained in:
commit
4de6f215d0
|
@ -14,8 +14,8 @@ void main() {
|
||||||
|
|
||||||
group('Initialization', () {
|
group('Initialization', () {
|
||||||
group('Navigation', () {
|
group('Navigation', () {
|
||||||
setUpAll(() async => await initializeApp().then(
|
setUpAll(() async => await initializeApp()
|
||||||
(_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
.then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||||
testWidgets('Test Welcome', (WidgetTester tester) async {
|
testWidgets('Test Welcome', (WidgetTester tester) async {
|
||||||
widget = tester;
|
widget = tester;
|
||||||
await _testWelcome();
|
await _testWelcome();
|
||||||
|
@ -26,16 +26,16 @@ void main() {
|
||||||
});
|
});
|
||||||
group('Authentication', () {
|
group('Authentication', () {
|
||||||
group('Sign in', () {
|
group('Sign in', () {
|
||||||
setUpAll(() async => await initializeApp().then(
|
setUpAll(() async => await initializeApp()
|
||||||
(_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
.then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||||
testWidgets('Test Sign In', (WidgetTester tester) async {
|
testWidgets('Test Sign In', (WidgetTester tester) async {
|
||||||
widget = tester;
|
widget = tester;
|
||||||
await _testSignIn();
|
await _testSignIn();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
group('Sign up', () {
|
group('Sign up', () {
|
||||||
setUpAll(() async => await initializeApp().then(
|
setUpAll(() async => await initializeApp()
|
||||||
(_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
.then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||||
testWidgets('Test Sign Up', (WidgetTester tester) async {
|
testWidgets('Test Sign Up', (WidgetTester tester) async {
|
||||||
widget = tester;
|
widget = tester;
|
||||||
await _testSignUp();
|
await _testSignUp();
|
||||||
|
|
|
@ -167,10 +167,8 @@ class GetVehiclesByProperty {
|
||||||
class UnregisterDevice {
|
class UnregisterDevice {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
callName: 'unregisterDevice',
|
callName: 'unregisterDevice',
|
||||||
|
@ -197,12 +195,9 @@ class UnregisterDevice {
|
||||||
class DeletePet {
|
class DeletePet {
|
||||||
Future<ApiCallResponse> call({final int? petID = 0}) async {
|
Future<ApiCallResponse> call({final int? petID = 0}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'excluirPet';
|
const String atividade = 'excluirPet';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -291,12 +286,9 @@ class GetPets {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'consultaPets';
|
const String atividade = 'consultaPets';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -328,12 +320,9 @@ class GetPetPhoto {
|
||||||
Future<ApiCallResponse> call({final int? petId}) async {
|
Future<ApiCallResponse> call({final int? petId}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'consultaFotoPet';
|
const String atividade = 'consultaFotoPet';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -374,12 +363,9 @@ class RegisterPet {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'cadastrarPet';
|
const String atividade = 'cadastrarPet';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -422,12 +408,9 @@ class BuscaEnconcomendas {
|
||||||
final String? adresseeType,
|
final String? adresseeType,
|
||||||
final String? status,
|
final String? status,
|
||||||
}) async {
|
}) async {
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'getEncomendas';
|
const String atividade = 'getEncomendas';
|
||||||
|
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
@ -469,12 +452,9 @@ class CancelaVisita {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'cancelaVisita';
|
const String atividade = 'cancelaVisita';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -506,10 +486,8 @@ class CancelaVisita {
|
||||||
|
|
||||||
class DeleteAccount {
|
class DeleteAccount {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
|
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -540,12 +518,9 @@ class ChangePanic {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'updVisitado';
|
const String atividade = 'updVisitado';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -579,12 +554,9 @@ class ChangePass {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'updVisitado';
|
const String atividade = 'updVisitado';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -618,12 +590,9 @@ class RespondeVinculo {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
callName: 'respondeVinculo',
|
callName: 'respondeVinculo',
|
||||||
|
@ -655,12 +624,9 @@ class ChangeNotifica {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'updVisitado';
|
const String atividade = 'updVisitado';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -692,14 +658,10 @@ class UpdateIDE {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String newIde = (await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String cliUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String newIde =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'updVisitado';
|
const String atividade = 'updVisitado';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -731,10 +693,8 @@ class UpdToken {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String token = (await StorageHelper().get(SecureStorageKey.token.value, Storage.SecureStorage)) ?? '';
|
final String token = (await StorageHelper().get(SecureStorageKey.token.value, Storage.SecureStorage)) ?? '';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -762,23 +722,20 @@ class UpdToken {
|
||||||
class LoginCall {
|
class LoginCall {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String email = (await StorageHelper().get(SecureStorageKey.email.value, Storage.SecureStorage)) ?? '';
|
final String email = (await StorageHelper().get(SecureStorageKey.email.value, Storage.SecureStorage)) ?? '';
|
||||||
final String password =
|
final String password = (await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
|
||||||
(await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
|
final String type = (await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
|
||||||
final String type =
|
|
||||||
(await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
|
|
||||||
final String description =
|
final String description =
|
||||||
(await StorageHelper().get(SecureStorageKey.deviceDescription.value, Storage.SecureStorage)) ?? '';
|
(await StorageHelper().get(SecureStorageKey.deviceDescription.value, Storage.SecureStorage)) ?? '';
|
||||||
late final String token;
|
late final String token;
|
||||||
try {
|
try {
|
||||||
token = await FirebaseMessagingService.getToken();
|
token = await FirebaseMessagingService.getToken();
|
||||||
if(token == null || token.isEmpty) throw Exception('Token is empty'); }
|
if (token == null || token.isEmpty) throw Exception('Token is empty');
|
||||||
catch (e, s) {
|
} catch (e, s) {
|
||||||
token = '';
|
token = '';
|
||||||
log('Error getting token', error: e, stackTrace: s);
|
log('Error getting token', error: e, stackTrace: s);
|
||||||
LogUtil.requestAPIFailed('login.php', email, "Login", e, s);
|
LogUtil.requestAPIFailed('login.php', email, "Login", e, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -853,12 +810,9 @@ class ChangePasswordCall {
|
||||||
required final String psswd,
|
required final String psswd,
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
callName: 'changePassword',
|
callName: 'changePassword',
|
||||||
|
@ -957,12 +911,9 @@ class PostScheduleVisitorCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'putVisitante';
|
const String atividade = 'putVisitante';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -1015,12 +966,9 @@ class PostScheduleVisitCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'putVisita';
|
const String atividade = 'putVisita';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -1072,12 +1020,9 @@ class GetScheduleVisitCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'getVisitas';
|
const String atividade = 'getVisitas';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -1349,12 +1294,9 @@ class GetDadosCall {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'getDados';
|
const String atividade = 'getDados';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -1585,12 +1527,9 @@ class GetVisitorByDocCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'getVisitante';
|
const String atividade = 'getVisitante';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -1642,12 +1581,9 @@ class GetFotoVisitanteCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'getFotoVisitante';
|
const String atividade = 'getFotoVisitante';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -1684,12 +1620,9 @@ class PostProvVisitSchedulingCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'putAgendamentoProv';
|
const String atividade = 'putAgendamentoProv';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -1736,12 +1669,9 @@ class GetVisitsCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'getVisitas';
|
const String atividade = 'getVisitas';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -2002,12 +1932,9 @@ class DeleteVisitCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'cancelaVisita';
|
const String atividade = 'cancelaVisita';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -2048,14 +1975,10 @@ class GetPessoasLocalCall {
|
||||||
Future<ApiCallResponse> call() async {
|
Future<ApiCallResponse> call() async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String ownerUUID = (await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String ownerUUID =
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
callName: 'getPessoasLocal',
|
callName: 'getPessoasLocal',
|
||||||
|
@ -2118,12 +2041,9 @@ class RespondeSolicitacaoCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'respondeSolicitacao';
|
const String atividade = 'respondeSolicitacao';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -2171,12 +2091,9 @@ class GetAccessCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'getAcessos';
|
const String atividade = 'getAcessos';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
@ -2423,10 +2340,8 @@ class GetLiberationsCall {
|
||||||
final StreamController<ApiCallResponse> controller = StreamController();
|
final StreamController<ApiCallResponse> controller = StreamController();
|
||||||
|
|
||||||
Future.microtask(() async {
|
Future.microtask(() async {
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliUUID =
|
final String cliUUID =
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
const String atividade = 'getSolicitacoes';
|
const String atividade = 'getSolicitacoes';
|
||||||
|
@ -2618,12 +2533,9 @@ class GetMessagesCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID =
|
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final String userUUID =
|
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final String cliUUID =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
const String atividade = 'getMensagens';
|
const String atividade = 'getMensagens';
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
|
|
|
@ -271,8 +271,7 @@ class NotificationService {
|
||||||
|
|
||||||
await AwesomeNotifications().isNotificationAllowed().then((isAllowed) async {
|
await AwesomeNotifications().isNotificationAllowed().then((isAllowed) async {
|
||||||
final bool requestOSnotification =
|
final bool requestOSnotification =
|
||||||
(await StorageHelper().get(SQLiteStorageKey.requestOSNotification.value, Storage.SQLiteStorage)) ==
|
(await StorageHelper().get(SQLiteStorageKey.requestOSNotification.value, Storage.SQLiteStorage)) == 'true';
|
||||||
'true';
|
|
||||||
|
|
||||||
if (requestOSnotification == false) {
|
if (requestOSnotification == false) {
|
||||||
if (isAllowed == false) {
|
if (isAllowed == false) {
|
||||||
|
|
|
@ -45,9 +45,13 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
onTap: _isProcessing
|
onTap: _isProcessing
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
setState(() { _isProcessing = true; });
|
setState(() {
|
||||||
|
_isProcessing = true;
|
||||||
|
});
|
||||||
await widget.action.call();
|
await widget.action.call();
|
||||||
setState(() { _isProcessing = false; });
|
setState(() {
|
||||||
|
_isProcessing = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
||||||
|
|
|
@ -40,9 +40,13 @@ class _MenuCardItemState extends State<MenuCardItem> {
|
||||||
onTap: _isProcessing
|
onTap: _isProcessing
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
setState(() { _isProcessing = true; });
|
setState(() {
|
||||||
|
_isProcessing = true;
|
||||||
|
});
|
||||||
await widget.action.call();
|
await widget.action.call();
|
||||||
setState(() { _isProcessing = false; });
|
setState(() {
|
||||||
|
_isProcessing = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Card(
|
child: Card(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
|
|
@ -99,7 +99,7 @@ class _CustomInputUtilState extends State<CustomInputUtil> {
|
||||||
helperStyle: TextStyle(
|
helperStyle: TextStyle(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: limitedInputTextSize,
|
fontSize: limitedInputTextSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
|
|
|
@ -41,8 +41,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0, 0.0, 0, 10.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0, 0.0, 0, 10.0),
|
||||||
|
@ -110,13 +109,12 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
ptText: 'Este campo é obrigatório',
|
ptText: 'Este campo é obrigatório',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||||
fontSize: limitedInputFontSize
|
fontSize: limitedInputFontSize)),
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -38,8 +38,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
|
|
||||||
return Builder(
|
return Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (widget.uploadedFiles != null &&
|
if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) {
|
||||||
widget.uploadedFiles!.bytes!.isNotEmpty) {
|
|
||||||
{
|
{
|
||||||
return InkWell(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
@ -49,8 +48,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.isUploading = false;
|
widget.isUploading = false;
|
||||||
widget.uploadedFiles =
|
widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
|
||||||
widget.onUploadComplete(widget.uploadedFiles!);
|
widget.onUploadComplete(widget.uploadedFiles!);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -70,133 +68,117 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isLoading = true;
|
_isLoading = true;
|
||||||
});
|
});
|
||||||
final selectedMedia = await selectMediaWithSourceBottomSheet(
|
final selectedMedia = await selectMediaWithSourceBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
imageQuality: 100,
|
imageQuality: 100,
|
||||||
allowPhoto: true,
|
allowPhoto: true,
|
||||||
includeDimensions: true,
|
includeDimensions: true,
|
||||||
|
);
|
||||||
|
if (selectedMedia != null) {
|
||||||
|
setState(() => widget.isUploading = true);
|
||||||
|
var selectedUploadedFiles = <FFUploadedFile>[];
|
||||||
|
|
||||||
|
try {
|
||||||
|
final message = FFLocalizations.of(context)
|
||||||
|
.getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...');
|
||||||
|
showUploadMessage(
|
||||||
|
context,
|
||||||
|
message,
|
||||||
|
showLoading: true,
|
||||||
);
|
);
|
||||||
if (selectedMedia != null) {
|
selectedUploadedFiles = selectedMedia
|
||||||
setState(() => widget.isUploading = true);
|
.map((m) => FFUploadedFile(
|
||||||
var selectedUploadedFiles = <FFUploadedFile>[];
|
name: m.storagePath.split('/').last,
|
||||||
|
bytes: m.bytes,
|
||||||
try {
|
height: m.dimensions?.height,
|
||||||
final message = FFLocalizations.of(context)
|
width: m.dimensions?.width,
|
||||||
.getVariableText(
|
// blurHash: m.blurHash,
|
||||||
enText: 'Uploading file...',
|
))
|
||||||
ptText: 'Enviando arquivo...');
|
.toList();
|
||||||
showUploadMessage(
|
} finally {
|
||||||
context,
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
message,
|
widget.isUploading = false;
|
||||||
showLoading: true,
|
}
|
||||||
);
|
if (selectedUploadedFiles.length == selectedMedia.length) {
|
||||||
selectedUploadedFiles = selectedMedia
|
setState(() {
|
||||||
.map((m) => FFUploadedFile(
|
widget.uploadedFiles = selectedUploadedFiles.first;
|
||||||
name: m.storagePath.split('/').last,
|
});
|
||||||
bytes: m.bytes,
|
widget.onUploadComplete(widget.uploadedFiles!);
|
||||||
height: m.dimensions?.height,
|
final message =
|
||||||
width: m.dimensions?.width,
|
FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!');
|
||||||
// blurHash: m.blurHash,
|
showUploadMessage(context, message);
|
||||||
))
|
} else {
|
||||||
.toList();
|
setState(() {
|
||||||
} finally {
|
_isLoading = false;
|
||||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
});
|
||||||
widget.isUploading = false;
|
final message = FFLocalizations.of(context)
|
||||||
}
|
.getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados');
|
||||||
if (selectedUploadedFiles.length ==
|
showUploadMessage(context, message);
|
||||||
selectedMedia.length) {
|
return;
|
||||||
setState(() {
|
}
|
||||||
widget.uploadedFiles = selectedUploadedFiles.first;
|
} else {
|
||||||
});
|
setState(() {
|
||||||
widget.onUploadComplete(widget.uploadedFiles!);
|
_isLoading = false;
|
||||||
final message = FFLocalizations.of(context)
|
});
|
||||||
.getVariableText(
|
}
|
||||||
enText: 'Success!', ptText: 'Sucesso!');
|
},
|
||||||
showUploadMessage(context, message);
|
child: Center(
|
||||||
} else {
|
child: Container(
|
||||||
setState(() {
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
_isLoading = false;
|
height: 120,
|
||||||
});
|
decoration: BoxDecoration(
|
||||||
final message = FFLocalizations.of(context)
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
.getVariableText(
|
border: Border.all(
|
||||||
enText: 'Failed to upload data',
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
ptText: 'Falha ao enviar dados');
|
width: 1.0,
|
||||||
showUploadMessage(context, message);
|
|
||||||
return;
|
|
||||||
} }else{
|
|
||||||
setState(() {
|
|
||||||
_isLoading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Container(
|
|
||||||
width: MediaQuery.of(context).size.width * 0.8,
|
|
||||||
height: 120,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
border: Border.all(
|
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
|
||||||
width: 1.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
_isLoading
|
|
||||||
? SizedBox(
|
|
||||||
width: 30.0,
|
|
||||||
height: 30.0,
|
|
||||||
child: CircularProgressIndicator(
|
|
||||||
valueColor:
|
|
||||||
AlwaysStoppedAnimation<Color>(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.primary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Icon(
|
|
||||||
Icons.photo_camera,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primary,
|
|
||||||
size: 30.0,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
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,
|
|
||||||
fontSize: limitedInputTextSize,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
_isLoading
|
||||||
|
? SizedBox(
|
||||||
|
width: 30.0,
|
||||||
|
height: 30.0,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
|
FlutterFlowTheme.of(context).primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Icon(
|
||||||
|
Icons.photo_camera,
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
size: 30.0,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
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,
|
||||||
|
fontSize: limitedInputTextSize,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -35,4 +35,4 @@ abstract class MenuEntry extends StatefulWidget {
|
||||||
final String title;
|
final String title;
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
final VoidCallback safeSetState;
|
final VoidCallback safeSetState;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,8 +78,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
context.pop(filterResult);
|
context.pop(filterResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCheckboxListTile(
|
Widget _buildCheckboxListTile(String key, List<Map<String, String>> options, double fontsize) {
|
||||||
String key, List<Map<String, String>> options, double fontsize) {
|
|
||||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -169,7 +168,6 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double screenWidth = MediaQuery.of(context).size.width;
|
double screenWidth = MediaQuery.of(context).size.width;
|
||||||
|
|
||||||
|
|
||||||
return Center(
|
return Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: screenWidth - (screenWidth * 0.35),
|
width: screenWidth - (screenWidth * 0.35),
|
||||||
|
@ -193,8 +191,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(
|
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||||
context),
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
|
@ -223,15 +220,16 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
foregroundColor: FlutterFlowTheme.of(context).info,
|
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
),
|
),
|
||||||
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: FlutterFlowTheme.of(context).bodyMedium.override(
|
child: Text(FFLocalizations.of(context).getText('88kshkph'),
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
color: FlutterFlowTheme.of(context).info,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
fontWeight: FontWeight.bold,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
fontWeight: FontWeight.bold,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts:
|
||||||
)),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -29,13 +29,11 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
late Map<String, dynamic> selected;
|
late Map<String, dynamic> selected;
|
||||||
final List<Map<String, String>> adresseeTypeOptions = [
|
final List<Map<String, String>> adresseeTypeOptions = [
|
||||||
{
|
{
|
||||||
'title':
|
'title': FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Resident', ptText: 'Morador'),
|
||||||
FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Resident', ptText: 'Morador'),
|
|
||||||
'value': 'MOR'
|
'value': 'MOR'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': FFLocalizations.of(StorageHelper().context!)
|
'title': FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
||||||
.getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
|
||||||
'value': 'PRO'
|
'value': 'PRO'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -46,8 +44,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
'value': 'notPickedUp'
|
'value': 'notPickedUp'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title':
|
'title': FFLocalizations.of(StorageHelper().context!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
|
||||||
FFLocalizations.of(StorageHelper().context!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
|
|
||||||
'value': 'pickedUp'
|
'value': 'pickedUp'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -213,8 +210,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildCheckboxListTile(
|
_buildCheckboxListTile('adresseeType', adresseeTypeOptions, limitedBodyFontSize),
|
||||||
'adresseeType', adresseeTypeOptions, limitedBodyFontSize),
|
|
||||||
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
|
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -227,7 +223,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
foregroundColor: FlutterFlowTheme.of(context).info,
|
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
),
|
),
|
||||||
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: TextStyle(fontSize: limitedBodyFontSize)),
|
child: Text(FFLocalizations.of(context).getText('88kshkph'),
|
||||||
|
style: TextStyle(fontSize: limitedBodyFontSize)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -92,76 +92,80 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
@override Widget build(BuildContext context) {
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
return InkWell(
|
return InkWell(
|
||||||
key: const ValueKey('ThrowExceptionWidget'),
|
key: const ValueKey('ThrowExceptionWidget'),
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário
|
borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário
|
||||||
),
|
),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 20.0),
|
const SizedBox(height: 20.0),
|
||||||
Stack(
|
Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
_getIconByType(context),
|
_getIconByType(context),
|
||||||
color: _getColorByType(context),
|
color: _getColorByType(context),
|
||||||
size: 150.0,
|
size: 150.0,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
|
||||||
).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
|
const SizedBox(height: 20.0),
|
||||||
const SizedBox(height: 20.0),
|
Column(
|
||||||
Column(
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Text(
|
||||||
Text(
|
_getTitleByType(context),
|
||||||
_getTitleByType(context),
|
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
fontSize: limitedHeaderFontSize,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 10.0, 15.0, 0.0),
|
|
||||||
child: Text(
|
|
||||||
valueOrDefault<String>(widget.msg, 'Message Not Found'),
|
|
||||||
overflow: TextOverflow.clip,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: limitedBodyFontSize,
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
],
|
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 10.0, 15.0, 0.0),
|
||||||
),
|
child: Text(
|
||||||
],
|
valueOrDefault<String>(widget.msg, 'Message Not Found'),
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
fontSize: limitedBodyFontSize,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,8 +53,14 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data.",),
|
FFLocalizations.of(context).getVariableText(
|
||||||
style: TextStyle(color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context),),
|
ptText: "Não há mais dados.",
|
||||||
|
enText: "No more data.",
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
duration: const Duration(seconds: 3),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -100,8 +106,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
|
|
||||||
await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage);
|
await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage);
|
||||||
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage);
|
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage);
|
||||||
await StorageHelper()
|
await StorageHelper().set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
|
||||||
.set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
|
|
||||||
|
|
||||||
context.pop();
|
context.pop();
|
||||||
return response;
|
return response;
|
||||||
|
@ -192,8 +197,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
||||||
if (local['CLU_STATUS'] == 'A') {
|
if (local['CLU_STATUS'] == 'A') {
|
||||||
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage);
|
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage);
|
||||||
await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage);
|
await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage);
|
||||||
await StorageHelper()
|
await StorageHelper().set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
|
||||||
.set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
|
|
||||||
|
|
||||||
context.pop();
|
context.pop();
|
||||||
} else if (local['CLU_STATUS'] == 'B') {
|
} else if (local['CLU_STATUS'] == 'B') {
|
||||||
|
|
|
@ -90,8 +90,8 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await LocalizationService.selectLocal(context).then(
|
await LocalizationService.selectLocal(context)
|
||||||
(value) => value == true ? onUpdate() : null);
|
.then((value) => value == true ? onUpdate() : null);
|
||||||
},
|
},
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(200.0),
|
borderRadius: BorderRadius.circular(200.0),
|
||||||
|
@ -143,8 +143,7 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
||||||
fontSize: limitedFontSize,
|
fontSize: limitedFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
GoogleFonts.asMap().containsKey('Nunito'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -52,7 +52,11 @@ class _MenuStaggeredViewComponentWidgetState extends State<MenuStaggeredViewComp
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final textScaler = MediaQuery.textScalerOf(context);
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
final double scaledFontSize = 14 * textScaler.scale(1);
|
final double scaledFontSize = 14 * textScaler.scale(1);
|
||||||
final int crossAxisCount = scaledFontSize >= 26 ? 1 : scaledFontSize >= 18 ? 2 : 3;
|
final int crossAxisCount = scaledFontSize >= 26
|
||||||
|
? 1
|
||||||
|
: scaledFontSize >= 18
|
||||||
|
? 2
|
||||||
|
: 3;
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -8,7 +8,6 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
|
|
||||||
|
|
||||||
class DetailsComponentWidget extends StatefulWidget {
|
class DetailsComponentWidget extends StatefulWidget {
|
||||||
const DetailsComponentWidget({
|
const DetailsComponentWidget({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -175,7 +174,6 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
return TextFormField(
|
return TextFormField(
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
initialValue: '$value',
|
initialValue: '$value',
|
||||||
|
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
@ -185,9 +183,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
),
|
),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
|
||||||
labelText: key,
|
labelText: key,
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -204,14 +200,9 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
|
|
@ -83,8 +83,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
tablet: false,
|
tablet: false,
|
||||||
))
|
))
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||||
16.0, 0.0, 16.0, 8.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: const ValueKey<String>('BackButton'),
|
key: const ValueKey<String>('BackButton'),
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
@ -98,8 +97,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
0.0, 12.0, 0.0, 12.0),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_rounded,
|
Icons.arrow_back_rounded,
|
||||||
color: Color(0xFF15161E),
|
color: Color(0xFF15161E),
|
||||||
|
@ -107,20 +105,16 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||||
12.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: const Color(0xFF15161E),
|
color: const Color(0xFF15161E),
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -129,36 +123,30 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context)
|
FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||||
.getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Outfit',
|
fontFamily: 'Outfit',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||||
GoogleFonts.asMap().containsKey('Outfit'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||||
16.0, 4.0, 16.0, 4.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText('wu2f7yzo' /* Não se preucupe nós vamos te a... */),
|
||||||
'wu2f7yzo' /* Não se preucupe nós vamos te a... */),
|
|
||||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: limitedSubHeaderFontSize,
|
fontSize: limitedSubHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -166,8 +154,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||||
16.0, 12.0, 16.0, 0.0),
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
@ -184,18 +171,15 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context)
|
labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */),
|
||||||
.getText('mtz8l7ft' /* E-mail */),
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
labelStyle:
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontSize: limitedInputFontSize,
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
letterSpacing: 0.0,
|
||||||
fontSize: limitedInputFontSize,
|
fontWeight: FontWeight.w500,
|
||||||
letterSpacing: 0.0,
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
fontWeight: FontWeight.w500,
|
),
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
|
@ -224,8 +208,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
||||||
24.0, 24.0, 20.0, 24.0),
|
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.email,
|
Icons.email,
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -238,14 +221,12 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
validator: _model.emailAddressTextControllerValidator
|
validator: _model.emailAddressTextControllerValidator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -253,45 +234,37 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||||
0.0, 24.0, 0.0, 0.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('SendButtonWidget'),
|
key: const ValueKey<String>('SendButtonWidget'),
|
||||||
onPressed: (_model.emailAddressTextController.text ==
|
onPressed: (_model.emailAddressTextController.text == '' ||
|
||||||
'' ||
|
!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
|
||||||
!ValidatorUtil.isValidEmail(
|
|
||||||
_model.emailAddressTextController.text))
|
|
||||||
? null
|
? null
|
||||||
: () async => AuthenticationService.forgotPassword(
|
: () async =>
|
||||||
context, _model.emailAddressTextController.text),
|
AuthenticationService.forgotPassword(context, _model.emailAddressTextController.text),
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(context).getText(
|
||||||
'74rnd5bu' /* Enviar */,
|
'74rnd5bu' /* Enviar */,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 270.0,
|
width: 270.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle:
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
FlutterFlowTheme.of(context).titleSmall.override(
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
color: Colors.white,
|
||||||
color: Colors.white,
|
fontSize: limitedInputFontSize,
|
||||||
fontSize: limitedInputFontSize,
|
letterSpacing: 0.0,
|
||||||
letterSpacing: 0.0,
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w500,
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
disabledColor:
|
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||||
FlutterFlowTheme.of(context).customColor5,
|
|
||||||
disabledTextColor: Colors.white,
|
disabledTextColor: Colors.white,
|
||||||
),
|
),
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
|
|
|
@ -70,11 +70,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
FFLocalizations.of(context).getText('uj8acuab'),
|
FFLocalizations.of(context).getText('uj8acuab'),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
overflow: TextOverflow.clip,
|
overflow: TextOverflow.clip,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
@ -105,9 +102,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
fontSize: limitedSubHeaderFontSize,
|
fontSize: limitedSubHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -156,29 +151,18 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
||||||
.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
model.cliName,
|
model.cliName,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style:
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
FlutterFlowTheme.of(context)
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.bodyMedium
|
letterSpacing: 0.0,
|
||||||
.override(
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
fontFamily:
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(
|
fontSize: limitedBodyFontSize,
|
||||||
context)
|
),
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts
|
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
fontSize: limitedBodyFontSize,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -209,9 +193,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
fontSize: limitedSubHeaderFontSize,
|
fontSize: limitedSubHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -251,7 +233,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
@ -259,8 +241,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -299,14 +280,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.asMap()
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.containsKey(
|
fontSize: limitedInputFontSize,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
fontSize: limitedInputFontSize,
|
|
||||||
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -351,8 +327,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -392,8 +367,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
validator: model.dateTimeTextControllerValidator.asValidator(context),
|
validator: model.dateTimeTextControllerValidator.asValidator(context),
|
||||||
|
@ -537,7 +511,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: model.notesTextController,
|
controller: model.notesTextController,
|
||||||
focusNode: model.notesFocusNode,
|
focusNode: model.notesFocusNode,
|
||||||
|
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
showCursor: true,
|
showCursor: true,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -545,43 +518,20 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
counterStyle: FlutterFlowTheme
|
counterStyle: FlutterFlowTheme.of(context).bodyText1.override(
|
||||||
.of(context)
|
fontFamily: FlutterFlowTheme.of(context).bodyText1Family,
|
||||||
.bodyText1
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.override(
|
fontSize: limitedInputFontSize,
|
||||||
fontFamily:
|
),
|
||||||
FlutterFlowTheme.of(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
context)
|
|
||||||
.bodyText1Family,
|
|
||||||
color: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: limitedInputFontSize,
|
|
||||||
),
|
|
||||||
labelText:
|
|
||||||
FFLocalizations.of(
|
|
||||||
context)
|
|
||||||
.getText(
|
|
||||||
'cw8b3tbb' /* Observação da Visita */,
|
'cw8b3tbb' /* Observação da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme
|
labelStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.of(context)
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.bodyMedium
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme
|
|
||||||
.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
.asMap()
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
|
@ -632,7 +582,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
|
@ -697,12 +646,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
text: FFLocalizations.of(context).getText('bv5fg9sv' /* Enviar */),
|
text: FFLocalizations.of(context).getText('bv5fg9sv' /* Enviar */),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
|
|
||||||
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
|
@ -712,7 +658,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
|
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
|
|
@ -51,7 +51,6 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -84,8 +83,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
tablet: false,
|
tablet: false,
|
||||||
))
|
))
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -98,8 +96,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
0.0, 12.0, 0.0, 12.0),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_rounded,
|
Icons.arrow_back_rounded,
|
||||||
color: Color(0xFF15161E),
|
color: Color(0xFF15161E),
|
||||||
|
@ -107,20 +104,17 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||||
12.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style:
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
color: const Color(0xFF15161E),
|
||||||
color: const Color(0xFF15161E),
|
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
|
||||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
|
letterSpacing: 0.0,
|
||||||
letterSpacing: 0.0,
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w500,
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -128,8 +122,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
'h1xilful' /* DIGITE A SUA SENHA */,
|
||||||
|
@ -145,8 +138,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
||||||
|
@ -157,8 +149,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 14, 14, 12),
|
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 14, 14, 12),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -166,8 +157,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.keyTextFieldTextController,
|
controller: _model.keyTextFieldTextController,
|
||||||
focusNode: _model.keyTextFieldFocusNode,
|
focusNode: _model.keyTextFieldFocusNode,
|
||||||
|
@ -186,30 +176,25 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'rfqrdet7' /* Senha */,
|
'rfqrdet7' /* Senha */,
|
||||||
),
|
),
|
||||||
labelStyle:
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
letterSpacing: 0.0,
|
||||||
letterSpacing: 0.0,
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w500,
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
|
|
||||||
),
|
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'zz1haydj' /* digite a sua senha..... */,
|
'zz1haydj' /* digite a sua senha..... */,
|
||||||
),
|
),
|
||||||
hintStyle:
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
letterSpacing: 0.0,
|
||||||
letterSpacing: 0.0,
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w500,
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -276,12 +261,10 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (_model.formKey.currentState == null ||
|
if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
|
||||||
!_model.formKey.currentState!.validate()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await widget.toggleActionStatus?.call(
|
await widget.toggleActionStatus?.call(
|
||||||
|
@ -295,10 +278,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 270.0,
|
width: 270.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: const Color(0xFF1AAB5F),
|
color: const Color(0xFF1AAB5F),
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -306,8 +287,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
|
|
@ -63,7 +63,7 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
||||||
enText: 'This field is required',
|
enText: 'This field is required',
|
||||||
ptText: 'Este campo é obrigatório',
|
ptText: 'Este campo é obrigatório',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,6 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
|
@ -144,8 +143,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 15.0),
|
||||||
24.0, 0.0, 24.0, 15.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'zazj5d8b' /* Preencha o formulário com os d... */,
|
'zazj5d8b' /* Preencha o formulário com os d... */,
|
||||||
|
@ -188,18 +186,15 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
|
),
|
||||||
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle:
|
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
fontSize: limitedInputFontSize,
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).customColor6,
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
|
@ -241,9 +236,9 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
_model.debounce(() async {
|
_model.debounce(() async {
|
||||||
|
@ -313,7 +308,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
|
@ -321,7 +316,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -437,7 +432,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -472,22 +467,20 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Stack(
|
return Stack(children: [
|
||||||
children: [
|
MediaUploadButtonUtil(
|
||||||
MediaUploadButtonUtil(
|
onUploadComplete: (uploadedFile) {
|
||||||
onUploadComplete: (uploadedFile) {
|
setState(() {
|
||||||
setState(() {
|
_model.uploadedLocalFile = uploadedFile;
|
||||||
_model.uploadedLocalFile = uploadedFile;
|
});
|
||||||
});
|
},
|
||||||
},
|
isUploading: _model.isDataUploading,
|
||||||
isUploading: _model.isDataUploading,
|
labelText: FFLocalizations.of(context).getText(
|
||||||
labelText: FFLocalizations.of(context).getText(
|
'p4ftwxcy' /* Selecione uma foto */,
|
||||||
'p4ftwxcy' /* Selecione uma foto */,
|
),
|
||||||
|
uploadedFiles: _model.uploadedLocalFile,
|
||||||
),
|
),
|
||||||
uploadedFiles: _model.uploadedLocalFile,
|
]);
|
||||||
),
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -630,7 +623,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -718,11 +711,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Visitante cadastrado com sucesso.',
|
ptText: 'Visitante cadastrado com sucesso.',
|
||||||
enText: 'Visitor successfully registered.'),
|
enText: 'Visitor successfully registered.'),
|
||||||
style: TextStyle(color: FlutterFlowTheme.of(context).info,
|
style: TextStyle(
|
||||||
fontSize: limitedInputFontSize,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
)
|
fontSize: limitedInputFontSize,
|
||||||
),
|
)),
|
||||||
|
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
duration: const Duration(seconds: 3),
|
duration: const Duration(seconds: 3),
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
|
@ -769,7 +761,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -19,15 +19,13 @@ import 'sign_up_template_component_model.dart';
|
||||||
export 'sign_up_template_component_model.dart';
|
export 'sign_up_template_component_model.dart';
|
||||||
|
|
||||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||||
const SignUpTemplateComponentWidget(
|
const SignUpTemplateComponentWidget({super.key, required this.toggleSignInPage});
|
||||||
{super.key, required this.toggleSignInPage});
|
|
||||||
final Future Function()? toggleSignInPage;
|
final Future Function()? toggleSignInPage;
|
||||||
@override
|
@override
|
||||||
State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SignUpTemplateComponentWidgetState
|
class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||||
extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
|
||||||
late SignUpTemplateComponentModel _model;
|
late SignUpTemplateComponentModel _model;
|
||||||
final animationsMap = <String, AnimationInfo>{};
|
final animationsMap = <String, AnimationInfo>{};
|
||||||
late String _deviceType;
|
late String _deviceType;
|
||||||
|
@ -160,17 +158,13 @@ class _SignUpTemplateComponentWidgetState
|
||||||
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
.displaySmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.primaryText,
|
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -271,18 +265,13 @@ class _SignUpTemplateComponentWidgetState
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
fontFamily:
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
'Plus Jakarta Sans',
|
color: FlutterFlowTheme.of(context).error,
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.error,
|
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontStyle: FontStyle.normal,
|
fontStyle: FontStyle.normal,
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color: FlutterFlowTheme.of(context).error,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
|
@ -363,18 +352,13 @@ class _SignUpTemplateComponentWidgetState
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
fontFamily:
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
'Plus Jakarta Sans',
|
color: FlutterFlowTheme.of(context).error,
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.error,
|
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontStyle: FontStyle.normal,
|
fontStyle: FontStyle.normal,
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
color: FlutterFlowTheme.of(context).error,
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
|
@ -456,22 +440,15 @@ class _SignUpTemplateComponentWidgetState
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
errorStyle: TextStyle(
|
errorStyle: TextStyle(
|
||||||
fontFamily:
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
'Plus Jakarta Sans',
|
color: FlutterFlowTheme.of(context).error,
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.error,
|
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontStyle: FontStyle.normal,
|
fontStyle: FontStyle.normal,
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
borderSide: const BorderSide(
|
||||||
borderSide:
|
color: Color(0xFFFF5963),
|
||||||
const BorderSide(
|
|
||||||
color:
|
|
||||||
Color(0xFFFF5963),
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
@ -479,9 +456,7 @@ class _SignUpTemplateComponentWidgetState
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
suffixIcon: InkWell(
|
suffixIcon: InkWell(
|
||||||
key: const ValueKey<
|
key: const ValueKey<String>('passwordVisibilitySuffixIcon'),
|
||||||
String>(
|
|
||||||
'passwordVisibilitySuffixIcon'),
|
|
||||||
onTap: () => setState(
|
onTap: () => setState(
|
||||||
() => _model.passwordRegisterFormVisibility =
|
() => _model.passwordRegisterFormVisibility =
|
||||||
!_model.passwordRegisterFormVisibility,
|
!_model.passwordRegisterFormVisibility,
|
||||||
|
@ -516,8 +491,7 @@ class _SignUpTemplateComponentWidgetState
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('SubmitButtonWidget'),
|
||||||
'SubmitButtonWidget'),
|
|
||||||
onPressed: isFormInvalid()
|
onPressed: isFormInvalid()
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
|
@ -531,17 +505,12 @@ class _SignUpTemplateComponentWidgetState
|
||||||
);
|
);
|
||||||
shouldSetState = true;
|
shouldSetState = true;
|
||||||
if (_model.register == true)
|
if (_model.register == true)
|
||||||
|
await widget.toggleSignInPage?.call();
|
||||||
await widget
|
|
||||||
.toggleSignInPage
|
|
||||||
?.call();
|
|
||||||
else {
|
else {
|
||||||
if (shouldSetState)
|
if (shouldSetState) setState(() {});
|
||||||
setState(() {});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (shouldSetState)
|
if (shouldSetState) setState(() {});
|
||||||
setState(() {});
|
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(context).getText(
|
||||||
'rnvdwzei' /* Cadastrar-se */,
|
'rnvdwzei' /* Cadastrar-se */,
|
||||||
|
@ -577,15 +546,12 @@ class _SignUpTemplateComponentWidgetState
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('toggleSignInPage'),
|
||||||
'toggleSignInPage'),
|
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async => await widget
|
onTap: () async => await widget.toggleSignInPage?.call(),
|
||||||
.toggleSignInPage
|
|
||||||
?.call(),
|
|
||||||
child: RichText(
|
child: RichText(
|
||||||
textScaler: MediaQuery.of(context).textScaler,
|
textScaler: MediaQuery.of(context).textScaler,
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
|
|
|
@ -46,4 +46,4 @@ class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel<VisitorS
|
||||||
textFieldFocusNode?.dispose();
|
textFieldFocusNode?.dispose();
|
||||||
textController?.dispose();
|
textController?.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,9 +75,9 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Column(children: [
|
Column(
|
||||||
|
children: [],
|
||||||
],),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
@ -165,7 +165,7 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -250,9 +250,9 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
FlutterFlowTheme.of(context).bodyLargeFamily),
|
.containsKey(FlutterFlowTheme.of(context).bodyLargeFamily),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -312,17 +312,14 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: MediaQuery.of(context).size.width * 0.4,
|
width: MediaQuery.of(context).size.width * 0.4,
|
||||||
height: 40,
|
height: 40,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
|
@ -373,8 +370,7 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
.getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'),
|
.getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'),
|
||||||
gravity: ToastGravity.TOP,
|
gravity: ToastGravity.TOP,
|
||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context)
|
fontSize: LimitedFontSizeUtil.getBodyFontSize(context));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await showAdaptiveDialog(
|
await showAdaptiveDialog(
|
||||||
|
@ -392,4 +388,4 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,7 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
|
||||||
State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState();
|
State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _WelcomeTemplateComponentWidgetState
|
class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponentWidget> with TickerProviderStateMixin {
|
||||||
extends State<WelcomeTemplateComponentWidget>
|
|
||||||
with TickerProviderStateMixin {
|
|
||||||
late WelcomeTemplateComponentModel _model;
|
late WelcomeTemplateComponentModel _model;
|
||||||
final animationsMap = <String, AnimationInfo>{};
|
final animationsMap = <String, AnimationInfo>{};
|
||||||
|
|
||||||
|
@ -89,7 +87,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
|
||||||
|
@ -106,8 +104,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
FFLocalizations.of(context)
|
FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||||
.getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -115,15 +112,13 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText('5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||||
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -131,8 +126,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
fontSize: limitedSubHeaderFontSize,
|
fontSize: limitedSubHeaderFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -147,8 +141,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
child: const AtomImageSvgTheme(
|
child: const AtomImageSvgTheme(filename: 'welcome', width: 600, height: double.infinity),
|
||||||
filename: 'welcome', width: 600, height: double.infinity),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -182,20 +175,14 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
children: [
|
children: [
|
||||||
Builder(
|
Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (MediaQuery.sizeOf(context).width <
|
if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
|
||||||
kBreakpointSmall
|
|
||||||
? true
|
|
||||||
: false) {
|
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 16.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('toggleSignInPage'),
|
||||||
'toggleSignInPage'),
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignInPage?.call();
|
await widget.toggleSignInPage?.call();
|
||||||
},
|
},
|
||||||
|
@ -203,17 +190,10 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding:
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
const EdgeInsetsDirectional
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primary,
|
|
||||||
textStyle: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
|
@ -254,7 +234,6 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
@ -277,11 +256,9 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('toggleSignInPage'),
|
||||||
'toggleSignInPage'),
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignInPage
|
await widget.toggleSignInPage?.call();
|
||||||
?.call();
|
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(context).getText(
|
||||||
'zvtay8ee' /* Entrar */,
|
'zvtay8ee' /* Entrar */,
|
||||||
|
@ -315,8 +292,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('toggleSignUpPage'),
|
||||||
'toggleSignUpPage'),
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignUpPage?.call();
|
await widget.toggleSignUpPage?.call();
|
||||||
},
|
},
|
||||||
|
|
|
@ -539,8 +539,7 @@ void showSnackbar(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showAlertDialog(BuildContext context, String title, String content,
|
void showAlertDialog(BuildContext context, String title, String content, Future<void> Function() action) {
|
||||||
Future<void> Function() action) {
|
|
||||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||||
|
@ -550,10 +549,13 @@ void showAlertDialog(BuildContext context, String title, String content,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
title: Text(title, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize), textAlign: TextAlign.center),
|
title: Text(title,
|
||||||
|
style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize),
|
||||||
|
textAlign: TextAlign.center),
|
||||||
content: Padding(
|
content: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Text(content, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize)),
|
child: Text(content,
|
||||||
|
style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize)),
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
Row(
|
Row(
|
||||||
|
@ -566,10 +568,8 @@ void showAlertDialog(BuildContext context, String title, String content,
|
||||||
width: MediaQuery.of(context).size.width * 0.3,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: 50,
|
height: 50,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
textStyle: TextStyle(
|
textStyle:
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedInputFontSize),
|
||||||
fontSize: limitedInputFontSize
|
|
||||||
),
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
width: 1,
|
width: 1,
|
||||||
|
@ -592,10 +592,8 @@ void showAlertDialog(BuildContext context, String title, String content,
|
||||||
height: 50,
|
height: 50,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
textStyle: TextStyle(
|
textStyle:
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedInputFontSize),
|
||||||
fontSize: limitedInputFontSize
|
|
||||||
),
|
|
||||||
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
|
|
@ -99,7 +99,6 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
||||||
textAlign: widget.options.textAlign,
|
textAlign: widget.options.textAlign,
|
||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final onPressed = widget.onPressed != null
|
final onPressed = widget.onPressed != null
|
||||||
|
|
|
@ -73,10 +73,16 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
|
||||||
builder: (context, _) {
|
builder: (context, _) {
|
||||||
return FutureBuilder<Widget>(
|
return FutureBuilder<Widget>(
|
||||||
future: () async {
|
future: () async {
|
||||||
final bool isLogged = await StorageHelper().get(SecureStorageKey.isLogged.value, Storage.SecureStorage) == 'true';
|
final bool isLogged =
|
||||||
final bool haveLocal = await StorageHelper().get(SecureStorageKey.haveLocal.value, Storage.SecureStorage) == 'true';
|
await StorageHelper().get(SecureStorageKey.isLogged.value, Storage.SecureStorage) == 'true';
|
||||||
final bool haveUserUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage))?.isNotEmpty ?? false;
|
final bool haveLocal =
|
||||||
final bool haveDevUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage))?.isNotEmpty ?? false;
|
await StorageHelper().get(SecureStorageKey.haveLocal.value, Storage.SecureStorage) == 'true';
|
||||||
|
final bool haveUserUUID =
|
||||||
|
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage))?.isNotEmpty ??
|
||||||
|
false;
|
||||||
|
final bool haveDevUUID =
|
||||||
|
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage))?.isNotEmpty ??
|
||||||
|
false;
|
||||||
|
|
||||||
if (isLogged && haveDevUUID && haveUserUUID) {
|
if (isLogged && haveDevUUID && haveUserUUID) {
|
||||||
return haveLocal ? const HomePageWidget() : const ReceptionPageWidget();
|
return haveLocal ? const HomePageWidget() : const ReceptionPageWidget();
|
||||||
|
|
|
@ -558,11 +558,11 @@ void showUploadMessage(
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Text(message,
|
||||||
Text(
|
style: TextStyle(
|
||||||
message, style: TextStyle(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context), )),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
|
|
@ -49,9 +49,11 @@ Future<void> initializeApp() async {
|
||||||
Future<void> _initializeTracking() async {
|
Future<void> _initializeTracking() async {
|
||||||
await AppTrackingTransparency.requestTrackingAuthorization();
|
await AppTrackingTransparency.requestTrackingAuthorization();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initializeFirebase() async {
|
Future<void> _initializeFirebase() async {
|
||||||
await Firebase.initializeApp();
|
await Firebase.initializeApp();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initializeNotificationService() async {
|
Future<void> _initializeNotificationService() async {
|
||||||
await NotificationService.initialize();
|
await NotificationService.initialize();
|
||||||
}
|
}
|
||||||
|
@ -59,6 +61,7 @@ Future<void> _initializeNotificationService() async {
|
||||||
void _initializeUrlStrategy() {
|
void _initializeUrlStrategy() {
|
||||||
setUrlStrategy(PathUrlStrategy());
|
setUrlStrategy(PathUrlStrategy());
|
||||||
}
|
}
|
||||||
|
|
||||||
void _initializeSystemSettings() {
|
void _initializeSystemSettings() {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||||
if (kDebugMode) {
|
if (kDebugMode) {
|
||||||
|
@ -77,6 +80,7 @@ Future<void> _initializeFlutterFlow() async {
|
||||||
GoRouter.optionURLReflectsImperativeAPIs = true;
|
GoRouter.optionURLReflectsImperativeAPIs = true;
|
||||||
usePathUrlStrategy();
|
usePathUrlStrategy();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
|
Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
|
||||||
if (message.data['click_action'] == 'enroll_cond') {
|
if (message.data['click_action'] == 'enroll_cond') {
|
||||||
await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage);
|
await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage);
|
||||||
|
@ -90,6 +94,7 @@ Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
|
||||||
payload: Map<String, String>.from(message.data));
|
payload: Map<String, String>.from(message.data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _backgroundHandlerMessage(RemoteMessage message) async {
|
Future<void> _backgroundHandlerMessage(RemoteMessage message) async {
|
||||||
if (message.data['click_action'] == 'enroll_cond') {
|
if (message.data['click_action'] == 'enroll_cond') {
|
||||||
await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage);
|
await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage);
|
||||||
|
@ -105,6 +110,7 @@ class App extends StatefulWidget {
|
||||||
|
|
||||||
static _AppState of(BuildContext context) => context.findAncestorStateOfType<_AppState>()!;
|
static _AppState of(BuildContext context) => context.findAncestorStateOfType<_AppState>()!;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AppState extends State<App> with WidgetsBindingObserver {
|
class _AppState extends State<App> with WidgetsBindingObserver {
|
||||||
Locale? _locale = FFLocalizations.getStoredLocale();
|
Locale? _locale = FFLocalizations.getStoredLocale();
|
||||||
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
|
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
|
||||||
|
@ -253,7 +259,6 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
||||||
super.initState();
|
super.initState();
|
||||||
WidgetsBinding.instance.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
|
|
||||||
|
|
||||||
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
|
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
|
||||||
_appStateNotifier = AppStateNotifier.instance;
|
_appStateNotifier = AppStateNotifier.instance;
|
||||||
_router = createRouter(_appStateNotifier);
|
_router = createRouter(_appStateNotifier);
|
||||||
|
@ -273,7 +278,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeAppLifecycleState(AppLifecycleState state) async {
|
void didChangeAppLifecycleState(AppLifecycleState state) async {
|
||||||
if(state == AppLifecycleState.detached) {
|
if (state == AppLifecycleState.detached) {
|
||||||
await LocalizationService.processLocals(context);
|
await LocalizationService.processLocals(context);
|
||||||
FirebaseMessagingService().updateDeviceToken();
|
FirebaseMessagingService().updateDeviceToken();
|
||||||
}
|
}
|
||||||
|
@ -295,4 +300,3 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,10 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||||
style: TextStyle(color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context),),
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
duration: const Duration(seconds: 3),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
|
|
@ -20,7 +20,7 @@ class HomePageWidget extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _HomePageWidgetState extends State<HomePageWidget> {
|
class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
late HomePageModel _model;
|
late HomePageModel _model;
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
late LocalProfileComponentWidget _localProfileComponentWidget;
|
late LocalProfileComponentWidget _localProfileComponentWidget;
|
||||||
|
@ -41,13 +41,10 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
|
|
||||||
_model = createModel(context, () => HomePageModel(safeSetState: () => safeSetState((){})));
|
_model = createModel(context, () => HomePageModel(safeSetState: () => safeSetState((){})));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_model.textController ??= TextEditingController();
|
_model.textController ??= TextEditingController();
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
StorageHelper().context = context;
|
StorageHelper().context = context;
|
||||||
|
@ -140,7 +137,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildBody() {
|
Widget buildBody() {
|
||||||
return Container(
|
return Container(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
|
|
@ -226,13 +226,13 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(FFLocalizations.of(context).getVariableText(
|
child: Text(
|
||||||
ptText: "Nenhuma mensagem encontrada!",
|
FFLocalizations.of(context)
|
||||||
enText: "No message found"),
|
.getVariableText(ptText: "Nenhuma mensagem encontrada!", enText: "No message found"),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: limitedSubHeaderFontSize,)
|
fontSize: limitedSubHeaderFontSize,
|
||||||
),
|
)),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -287,7 +287,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _item(BuildContext context, dynamic jsonBody) {
|
Widget _item(BuildContext context, dynamic jsonBody) {
|
||||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
@ -349,8 +349,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
FlutterFlowTheme.of(context).customColor6,
|
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
|
@ -374,8 +373,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
||||||
jsonBody['MSG_TEXTO'].toString(),
|
jsonBody['MSG_TEXTO'].toString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
FlutterFlowTheme.of(context).customColor6,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -163,31 +163,25 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: const Icon(Icons.filter_list),
|
icon: const Icon(Icons.filter_list),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final Map<String, String>? selectedFilter =
|
final Map<String, String>? selectedFilter = await showModalBottomSheet<Map<String, String>>(
|
||||||
await showModalBottomSheet<Map<String, String>>(
|
isScrollControlled: true,
|
||||||
isScrollControlled: true,
|
backgroundColor: Colors.transparent,
|
||||||
backgroundColor: Colors.transparent,
|
context: context,
|
||||||
context: context,
|
builder: (context) {
|
||||||
builder: (context) {
|
return GestureDetector(
|
||||||
return GestureDetector(
|
onTap: () => Navigator.of(context).pop(),
|
||||||
onTap: () => Navigator.of(context).pop(),
|
child: Container(
|
||||||
child: Container(
|
color: Colors.transparent,
|
||||||
color: Colors.transparent,
|
child: GestureDetector(
|
||||||
child: GestureDetector(
|
onTap: () {},
|
||||||
onTap: () {},
|
child: OrderFilterModalWidget(
|
||||||
child: OrderFilterModalWidget(
|
defaultAdresseeType: _selectedTypeSubject.value['adresseeType'] ?? '.*',
|
||||||
defaultAdresseeType: _selectedTypeSubject
|
defaultStatus: _selectedTypeSubject.value['status'] ?? '.*',
|
||||||
.value['adresseeType'] ??
|
|
||||||
'.*',
|
|
||||||
defaultStatus:
|
|
||||||
_selectedTypeSubject.value['status'] ??
|
|
||||||
'.*',
|
|
||||||
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
});
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
if (selectedFilter != null) {
|
if (selectedFilter != null) {
|
||||||
_updateFilterAction(selectedFilter);
|
_updateFilterAction(selectedFilter);
|
||||||
|
@ -261,9 +255,8 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context)
|
||||||
ptText: "Nenhuma encomenda encontrada!",
|
.getVariableText(ptText: "Nenhuma encomenda encontrada!", enText: "No orders found!"),
|
||||||
enText: "No orders found!"),
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||||
|
|
|
@ -222,7 +222,7 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
||||||
content: Text(
|
content: Text(
|
||||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color :Colors.white,
|
color: Colors.white,
|
||||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -232,6 +232,80 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
double limitedBodyTextSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||||
|
double limitedHeaderTextSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
if (_hasData == false && _pageNumber <= 1 && _loading == false)
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
FFLocalizations.of(context)
|
||||||
|
.getVariableText(ptText: "Nenhum Pet encontrado!", enText: "No pets found"),
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
fontSize: limitedHeaderTextSize,
|
||||||
|
)),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else if (_hasData == true || _pageNumber >= 1)
|
||||||
|
Expanded(
|
||||||
|
child: FutureBuilder<void>(
|
||||||
|
future: _petsFuture,
|
||||||
|
builder: (context, snapshot) {
|
||||||
|
return ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const BouncingScrollPhysics(),
|
||||||
|
controller: _scrollController,
|
||||||
|
itemCount: _petsWrap.length + 1,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
if (index == 0) {
|
||||||
|
// Add your item here
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 30, top: 10),
|
||||||
|
child: Text(
|
||||||
|
widget.model.petAmountRegister == '0'
|
||||||
|
? FFLocalizations.of(context).getVariableText(ptText: "Ilimitado", enText: "Unlimited")
|
||||||
|
: "${FFLocalizations.of(context).getVariableText(ptText: "Quantidade de Pets: ", enText: "Amount of Pets: ")}$count/${widget.model.petAmountRegister}",
|
||||||
|
textAlign: TextAlign.right,
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
fontSize: limitedBodyTextSize,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
final item = _petsWrap[index - 1];
|
||||||
|
return _item(context, item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
)),
|
||||||
|
if (_hasData == true && _loading == true)
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.only(top: 15, bottom: 15),
|
||||||
|
child: Center(
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
|
FlutterFlowTheme.of(context).primary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
].addToStart(const SizedBox(height: 0)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _item(BuildContext context, dynamic uItem) {
|
Widget _item(BuildContext context, dynamic uItem) {
|
||||||
return CardItemTemplateComponentWidget(
|
return CardItemTemplateComponentWidget(
|
||||||
|
@ -292,12 +366,9 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
||||||
],
|
],
|
||||||
onTapCardItemAction: () async {
|
onTapCardItemAction: () async {
|
||||||
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final userUUID =
|
final userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
final cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final cliUUID =
|
final cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final cliName =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
await showDialog(
|
await showDialog(
|
||||||
useSafeArea: true,
|
useSafeArea: true,
|
||||||
context: context,
|
context: context,
|
||||||
|
|
|
@ -125,271 +125,195 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
),
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Form(
|
Form(
|
||||||
key: _model.registerFormKey,
|
key: _model.registerFormKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
child: Column(
|
child:
|
||||||
mainAxisSize: MainAxisSize.max,
|
Column(mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
Padding(
|
||||||
children: [
|
padding: const EdgeInsets.fromLTRB(0, 10, 0, 20),
|
||||||
Padding(
|
child: MediaUploadButtonUtil(
|
||||||
padding: const EdgeInsets.fromLTRB(0, 10, 0, 20),
|
onUploadComplete: _model.handleUploadComplete,
|
||||||
child: MediaUploadButtonUtil(
|
isUploading: _model.isDataUploading,
|
||||||
onUploadComplete: _model.handleUploadComplete,
|
uploadedFiles: _model.uploadedLocalFile,
|
||||||
isUploading: _model.isDataUploading,
|
labelText: FFLocalizations.of(context).getVariableText(
|
||||||
uploadedFiles: _model.uploadedLocalFile,
|
ptText: 'Clique para adicionar a foto de seu Pet', enText: 'Click to add your Pet\'s photo'),
|
||||||
labelText: FFLocalizations.of(context).getVariableText(
|
),
|
||||||
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),
|
||||||
CustomInputUtil(
|
focusNode: _model.textFieldFocusName,
|
||||||
controller: _model.textControllerName,
|
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||||
validator: _model.textControllerNameValidator
|
hintText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||||
.asValidator(context),
|
suffixIcon: Symbols.format_color_text,
|
||||||
focusNode: _model.textFieldFocusName,
|
haveMaxLength: true,
|
||||||
labelText: FFLocalizations.of(context)
|
onChanged: (value) => setState(() {}),
|
||||||
.getVariableText(ptText: 'Nome', enText: 'Name'),
|
maxLength: 80,
|
||||||
hintText: FFLocalizations.of(context)
|
),
|
||||||
.getVariableText(ptText: 'Nome', enText: 'Name'),
|
CustomInputUtil(
|
||||||
suffixIcon: Symbols.format_color_text,
|
controller: _model.textControllerSpecies,
|
||||||
haveMaxLength: true,
|
validator: _model.textControllerSpeciesValidator.asValidator(context),
|
||||||
onChanged: (value) => setState(() {}),
|
focusNode: _model.textFieldFocusSpecies,
|
||||||
maxLength: 80,
|
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Espécie', enText: 'Species'),
|
||||||
),
|
hintText: FFLocalizations.of(context)
|
||||||
CustomInputUtil(
|
.getVariableText(ptText: 'Ex: Cachorro, Gato, Papagaio', enText: 'e.g. Dog, Cat, Parrot'),
|
||||||
controller: _model.textControllerSpecies,
|
suffixIcon: Symbols.sound_detection_dog_barking,
|
||||||
validator: _model.textControllerSpeciesValidator
|
haveMaxLength: true,
|
||||||
.asValidator(context),
|
onChanged: (value) => setState(() {}),
|
||||||
focusNode: _model.textFieldFocusSpecies,
|
maxLength: 80,
|
||||||
labelText: FFLocalizations.of(context).getVariableText(
|
),
|
||||||
ptText: 'Espécie', enText: 'Species'),
|
CustomInputUtil(
|
||||||
hintText: FFLocalizations.of(context).getVariableText(
|
controller: _model.textControllerRace,
|
||||||
ptText: 'Ex: Cachorro, Gato, Papagaio',
|
validator: _model.textControllerRaceValidator.asValidator(context),
|
||||||
enText: 'e.g. Dog, Cat, Parrot'),
|
focusNode: _model.textFieldFocusRace,
|
||||||
suffixIcon: Symbols.sound_detection_dog_barking,
|
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Raça', enText: 'Race'),
|
||||||
haveMaxLength: true,
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
onChanged: (value) => setState(() {}),
|
ptText: 'Ex: Labrador, Poodle, Siamês, Persa', enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
|
||||||
maxLength: 80,
|
suffixIcon: Icons.pets_outlined,
|
||||||
),
|
haveMaxLength: true,
|
||||||
CustomInputUtil(
|
onChanged: (value) => setState(() {}),
|
||||||
controller: _model.textControllerRace,
|
maxLength: 80,
|
||||||
validator: _model.textControllerRaceValidator
|
),
|
||||||
.asValidator(context),
|
CustomInputUtil(
|
||||||
focusNode: _model.textFieldFocusRace,
|
controller: _model.textControllerColor,
|
||||||
labelText: FFLocalizations.of(context)
|
validator: _model.textControllerColorValidator.asValidator(context),
|
||||||
.getVariableText(ptText: 'Raça', enText: 'Race'),
|
focusNode: _model.textFieldFocusColor,
|
||||||
hintText: FFLocalizations.of(context).getVariableText(
|
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cor', enText: 'Color'),
|
||||||
ptText: 'Ex: Labrador, Poodle, Siamês, Persa',
|
hintText: FFLocalizations.of(context)
|
||||||
enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
|
.getVariableText(ptText: 'Ex: Preto, Amarelo, Branco', enText: 'e.g. Black, Yellow, White'),
|
||||||
suffixIcon: Icons.pets_outlined,
|
suffixIcon: Symbols.palette,
|
||||||
haveMaxLength: true,
|
haveMaxLength: true,
|
||||||
onChanged: (value) => setState(() {}),
|
onChanged: (value) => setState(() {}),
|
||||||
maxLength: 80,
|
maxLength: 80,
|
||||||
),
|
),
|
||||||
CustomInputUtil(
|
Padding(
|
||||||
controller: _model.textControllerColor,
|
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||||
validator: _model.textControllerColorValidator
|
child: Row(
|
||||||
.asValidator(context),
|
mainAxisSize: MainAxisSize.max,
|
||||||
focusNode: _model.textFieldFocusColor,
|
children: [
|
||||||
labelText: FFLocalizations.of(context)
|
SizedBox(
|
||||||
.getVariableText(ptText: 'Cor', enText: 'Color'),
|
width: MediaQuery.of(context).size.width,
|
||||||
hintText: FFLocalizations.of(context).getVariableText(
|
height: 60.0,
|
||||||
ptText: 'Ex: Preto, Amarelo, Branco',
|
child: Stack(
|
||||||
enText: 'e.g. Black, Yellow, White'),
|
children: [
|
||||||
suffixIcon: Symbols.palette,
|
Padding(
|
||||||
haveMaxLength: true,
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
onChanged: (value) => setState(() {}),
|
child: TextFormField(
|
||||||
maxLength: 80,
|
controller: _model.textControllerData,
|
||||||
),
|
focusNode: _model.textFieldFocusData,
|
||||||
Padding(
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
readOnly: true,
|
||||||
child: Row(
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
mainAxisSize: MainAxisSize.max,
|
autofocus: false,
|
||||||
children: [
|
obscureText: false,
|
||||||
SizedBox(
|
decoration: InputDecoration(
|
||||||
width: MediaQuery.of(context).size.width,
|
isDense: true,
|
||||||
height: 60.0,
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
child: Stack(
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
children: [
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
Padding(
|
letterSpacing: 0.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
24.0, 0.0, 24.0, 0.0),
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
child: TextFormField(
|
fontSize: limitedInputFontSize,
|
||||||
controller: _model.textControllerData,
|
|
||||||
focusNode: _model.textFieldFocusData,
|
|
||||||
cursorColor:
|
|
||||||
FlutterFlowTheme.of(context).primary,
|
|
||||||
readOnly: true,
|
|
||||||
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,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
fontSize: limitedInputFontSize,
|
|
||||||
),
|
|
||||||
hintText: FFLocalizations.of(context)
|
|
||||||
.getVariableText(
|
|
||||||
ptText: 'Data de Nascimento',
|
|
||||||
enText: 'Date of Birth',
|
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
.labelMedium
|
ptText: 'Data de Nascimento',
|
||||||
.override(
|
enText: 'Date of Birth',
|
||||||
fontFamily:
|
),
|
||||||
FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.primaryText,
|
letterSpacing: 0.0,
|
||||||
letterSpacing: 0.0,
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.containsKey(
|
lineHeight: 1.0,
|
||||||
FlutterFlowTheme.of(context)
|
fontSize: limitedInputFontSize,
|
||||||
.labelMediumFamily),
|
|
||||||
lineHeight: 1.0,
|
|
||||||
fontSize: limitedInputFontSize,
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.customColor6,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
suffixIcon: Icon(
|
|
||||||
Icons.date_range,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.accent1,
|
|
||||||
),
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
|
width: 0.5,
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
.bodyMedium
|
),
|
||||||
.override(
|
focusedBorder: OutlineInputBorder(
|
||||||
fontFamily:
|
borderSide: BorderSide(
|
||||||
FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
.bodyMediumFamily,
|
width: 0.5,
|
||||||
letterSpacing: 0.0,
|
),
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
.containsKey(
|
),
|
||||||
FlutterFlowTheme.of(context)
|
errorBorder: OutlineInputBorder(
|
||||||
.bodyMediumFamily),
|
borderSide: BorderSide(
|
||||||
lineHeight: 1.8,
|
color: FlutterFlowTheme.of(context).error,
|
||||||
fontSize: limitedInputFontSize,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
validator: _model
|
),
|
||||||
.textControllerDataValidator
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
.asValidator(context),
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
),
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.date_range,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
24.0, 0.0, 24.0, 0.0),
|
letterSpacing: 0.0,
|
||||||
child: InkWell(
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
splashColor: Colors.transparent,
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
focusColor: Colors.transparent,
|
lineHeight: 1.8,
|
||||||
hoverColor: Colors.transparent,
|
fontSize: limitedInputFontSize,
|
||||||
highlightColor: Colors.transparent,
|
),
|
||||||
onTap: () async {
|
textAlign: TextAlign.start,
|
||||||
final pickedDate = await showDatePicker(
|
validator: _model.textControllerDataValidator.asValidator(context),
|
||||||
context: context,
|
),
|
||||||
initialDate: getCurrentTimestamp,
|
),
|
||||||
firstDate: DateTime(1990),
|
Padding(
|
||||||
lastDate: DateTime.now(),
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
builder: (context, child) {
|
child: InkWell(
|
||||||
return wrapInMaterialDatePickerTheme(
|
splashColor: Colors.transparent,
|
||||||
context,
|
focusColor: Colors.transparent,
|
||||||
child!,
|
hoverColor: Colors.transparent,
|
||||||
headerBackgroundColor:
|
highlightColor: Colors.transparent,
|
||||||
FlutterFlowTheme.of(context)
|
onTap: () async {
|
||||||
.primary,
|
final pickedDate = await showDatePicker(
|
||||||
headerForegroundColor:
|
context: context,
|
||||||
FlutterFlowTheme.of(context)
|
initialDate: getCurrentTimestamp,
|
||||||
.info,
|
firstDate: DateTime(1990),
|
||||||
headerTextStyle:
|
lastDate: DateTime.now(),
|
||||||
FlutterFlowTheme.of(context)
|
builder: (context, child) {
|
||||||
.headlineLarge
|
return wrapInMaterialDatePickerTheme(
|
||||||
.override(
|
context,
|
||||||
fontFamily: FlutterFlowTheme
|
child!,
|
||||||
.of(context)
|
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
.headlineLargeFamily,
|
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
fontSize: limitedInputFontSize,
|
headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
|
||||||
letterSpacing: 0.0,
|
fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
|
||||||
fontWeight:
|
fontSize: limitedInputFontSize,
|
||||||
FontWeight.w600,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts
|
fontWeight: FontWeight.w600,
|
||||||
.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||||
FlutterFlowTheme.of(
|
),
|
||||||
context)
|
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
.headlineLargeFamily),
|
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
pickerBackgroundColor:
|
selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
FlutterFlowTheme.of(context)
|
actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
.primaryBackground,
|
iconSize: 24.0,
|
||||||
pickerForegroundColor:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
selectedDateTimeBackgroundColor:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.primary,
|
|
||||||
selectedDateTimeForegroundColor:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.info,
|
|
||||||
actionButtonForegroundColor:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
iconSize: 24.0,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
if (pickedDate != null) {
|
if (pickedDate != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -399,170 +323,134 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
||||||
pickedDate.day,
|
pickedDate.day,
|
||||||
);
|
);
|
||||||
|
|
||||||
_model.textControllerData =
|
_model.textControllerData = TextEditingController(
|
||||||
TextEditingController(
|
text: dateTimeFormat(
|
||||||
text: dateTimeFormat(
|
'dd/MM/yyyy',
|
||||||
'dd/MM/yyyy',
|
_model.selectedDate,
|
||||||
_model.selectedDate,
|
locale: FFLocalizations.of(context).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,
|
},
|
||||||
);
|
child: Container(
|
||||||
});
|
width: double.infinity,
|
||||||
}
|
height: 80.0,
|
||||||
},
|
decoration: BoxDecoration(
|
||||||
child: Container(
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
width: double.infinity,
|
|
||||||
height: 80.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
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,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
fontSize: limitedSubHeaderFontSize,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
Padding(
|
),
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
),
|
||||||
child: CustomSelect(
|
Align(
|
||||||
options: const ['MAC', 'FEM'],
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
controller: _model.dropDownValueController1 ??=
|
child: Padding(
|
||||||
FormFieldController<String>(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0, 0.0, 15),
|
||||||
_model.dropDownValue1 ??= ''),
|
child: Text(
|
||||||
isRequired: true,
|
FFLocalizations.of(context).getVariableText(
|
||||||
changed: (val) => safeSetState(() {
|
ptText: 'Selecione as opções disponíveis',
|
||||||
_model.dropDownValue1 = val;
|
enText: 'Select the available options',
|
||||||
}),
|
|
||||||
dropDownValue: _model.dropDownValue1,
|
|
||||||
optionsLabel: [
|
|
||||||
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')
|
|
||||||
),
|
|
||||||
),
|
|
||||||
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 ??= ''),
|
|
||||||
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'),
|
|
||||||
],
|
|
||||||
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),
|
|
||||||
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?',
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
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),
|
|
||||||
fontSize: limitedInputFontSize,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
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),
|
||||||
|
fontSize: limitedSubHeaderFontSize,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
CustomInputUtil(
|
),
|
||||||
controller: _model.textControllerObservation,
|
),
|
||||||
validator: _model.textControllerObservationValidator
|
Padding(
|
||||||
.asValidator(context),
|
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||||
focusNode: _model.textFieldFocusObservation,
|
child: CustomSelect(
|
||||||
labelText: FFLocalizations.of(context).getVariableText(
|
options: const ['MAC', 'FEM'],
|
||||||
ptText: 'Escreva as suas observações aqui...',
|
controller: _model.dropDownValueController1 ??=
|
||||||
enText: 'Write your observations here...'),
|
FormFieldController<String>(_model.dropDownValue1 ??= ''),
|
||||||
hintText: FFLocalizations.of(context).getVariableText(
|
isRequired: true,
|
||||||
ptText: 'Escreva as suas observações aqui...',
|
changed: (val) => safeSetState(() {
|
||||||
enText: 'Write your observations here...'),
|
_model.dropDownValue1 = val;
|
||||||
suffixIcon: Icons.text_fields,
|
}),
|
||||||
haveMaxLength: true,
|
dropDownValue: _model.dropDownValue1,
|
||||||
onChanged: (value) => setState(() {}),
|
optionsLabel: [
|
||||||
maxLength: 250,
|
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')),
|
||||||
|
),
|
||||||
|
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 ??= ''),
|
||||||
|
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'),
|
||||||
|
],
|
||||||
|
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),
|
||||||
|
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?',
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
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),
|
||||||
|
fontSize: limitedInputFontSize,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
padding: const EdgeInsets.fromLTRB(70, 20, 70, 30),
|
),
|
||||||
child: SubmitButtonUtil(
|
CustomInputUtil(
|
||||||
labelText: FFLocalizations.of(context)
|
controller: _model.textControllerObservation,
|
||||||
.getVariableText(
|
validator: _model.textControllerObservationValidator.asValidator(context),
|
||||||
ptText: 'Cadastrar', enText: 'Register'),
|
focusNode: _model.textFieldFocusObservation,
|
||||||
onPressed: _model.isFormValid(context)
|
labelText: FFLocalizations.of(context).getVariableText(
|
||||||
? _model.registerPet
|
ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'),
|
||||||
: null),
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
),
|
ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'),
|
||||||
])),
|
suffixIcon: Icons.text_fields,
|
||||||
|
haveMaxLength: true,
|
||||||
|
onChanged: (value) => setState(() {}),
|
||||||
|
maxLength: 250,
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
])),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -23,8 +23,7 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
late bool isPanic = false;
|
late bool isPanic = false;
|
||||||
|
|
||||||
Future<void> _initialize() async {
|
Future<void> _initialize() async {
|
||||||
isFingerprint =
|
isFingerprint = await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
||||||
await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
|
||||||
isPerson = await StorageHelper().get(SQLiteStorageKey.person.value, Storage.SQLiteStorage) == 'true';
|
isPerson = await StorageHelper().get(SQLiteStorageKey.person.value, Storage.SQLiteStorage) == 'true';
|
||||||
isNotify = await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true';
|
isNotify = await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true';
|
||||||
isAccess = await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true';
|
isAccess = await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true';
|
||||||
|
@ -89,8 +88,8 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
);
|
);
|
||||||
SnackBarUtil.showSnackBar(context, content, isError: true);
|
SnackBarUtil.showSnackBar(context, content, isError: true);
|
||||||
})
|
})
|
||||||
.then((_) async => isNotify =
|
.then((_) async =>
|
||||||
await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true')
|
isNotify = await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true')
|
||||||
.whenComplete(() => notifyListeners());
|
.whenComplete(() => notifyListeners());
|
||||||
context.pop();
|
context.pop();
|
||||||
}
|
}
|
||||||
|
@ -168,8 +167,8 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
);
|
);
|
||||||
SnackBarUtil.showSnackBar(context, content, isError: true);
|
SnackBarUtil.showSnackBar(context, content, isError: true);
|
||||||
})
|
})
|
||||||
.then((_) async => isAccess =
|
.then((_) async =>
|
||||||
await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true')
|
isAccess = await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true')
|
||||||
.whenComplete(() => notifyListeners());
|
.whenComplete(() => notifyListeners());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,8 +227,7 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
.set(SQLiteStorageKey.fingerprint.value, isFingerprint ? 'true' : 'false', Storage.SQLiteStorage);
|
.set(SQLiteStorageKey.fingerprint.value, isFingerprint ? 'true' : 'false', Storage.SQLiteStorage);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
SnackBarUtil.showSnackBar(context, content);
|
SnackBarUtil.showSnackBar(context, content);
|
||||||
isFingerprint =
|
isFingerprint = await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
||||||
await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isFingerprint ? onChange(null) : _showPassKey(context, onChange);
|
isFingerprint ? onChange(null) : _showPassKey(context, onChange);
|
||||||
|
|
|
@ -22,7 +22,6 @@ class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ChangeNotifierProvider<PreferencesPageModel>(
|
return ChangeNotifierProvider<PreferencesPageModel>(
|
||||||
|
|
|
@ -29,8 +29,7 @@ class QrCodePageModel extends FlutterFlowModel<QrCodePageWidget> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> initVariable() async {
|
Future<void> initVariable() async {
|
||||||
isFingerprint =
|
isFingerprint = await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
||||||
await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
|
||||||
userDevUUID = await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage) ?? '';
|
userDevUUID = await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage) ?? '';
|
||||||
safeSetState?.call();
|
safeSetState?.call();
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
children: [
|
children: [
|
||||||
if (_model.isAccess == true && _model.key != null)
|
if (_model.isAccess == true && _model.key != null)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(0, 0, 0 , 20),
|
padding: const EdgeInsets.fromLTRB(0, 0, 0, 20),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Use esse QR Code para acesso',
|
ptText: 'Use esse QR Code para acesso',
|
||||||
|
@ -125,9 +125,8 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
fontSize: limitedHeaderTextSize,
|
fontSize: limitedHeaderTextSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -141,7 +140,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
safeSetState(() async {
|
safeSetState(() async {
|
||||||
_resetAnimationAndToggleAccess();
|
_resetAnimationAndToggleAccess();
|
||||||
});
|
});
|
||||||
|
|
||||||
_model.isFingerprint
|
_model.isFingerprint
|
||||||
? await _showBiometricsAuth(context)
|
? await _showBiometricsAuth(context)
|
||||||
: await _showQrCodeBottomSheet(context);
|
: await _showQrCodeBottomSheet(context);
|
||||||
|
@ -207,21 +206,15 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
height: 40.0,
|
height: 40.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
.titleSmall
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily,
|
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
.containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
.titleSmallFamily),
|
|
||||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 12, 12, 10),
|
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 12, 12, 10),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
|
@ -248,18 +241,16 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
visible: _model.isAccess == true,
|
visible: _model.isAccess == true,
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText:
|
ptText: 'Certifique-se de que o QRCode está visivel para o leitor',
|
||||||
'Certifique-se de que o QRCode está visivel para o leitor',
|
|
||||||
enText: 'Make sure the QRCode is visible to the reader',
|
enText: 'Make sure the QRCode is visible to the reader',
|
||||||
// '6z6kvmhl' /* Certifique-se de que o QRCode ... */,
|
// '6z6kvmhl' /* Certifique-se de que o QRCode ... */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
fontSize: limitedBodyFontSize,
|
fontSize: limitedBodyFontSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -283,8 +274,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 0.0),
|
||||||
10.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Expirando QR code em',
|
ptText: 'Expirando QR code em',
|
||||||
|
@ -293,13 +283,11 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -308,13 +296,11 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 20.0, 0.0),
|
||||||
0.0, 0.0, 20.0, 0.0),
|
|
||||||
child: StreamBuilder<double>(
|
child: StreamBuilder<double>(
|
||||||
stream: getProgressValue(),
|
stream: getProgressValue(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState ==
|
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||||
ConnectionState.waiting) {
|
|
||||||
return const CircularProgressIndicator();
|
return const CircularProgressIndicator();
|
||||||
} else if (snapshot.hasError) {
|
} else if (snapshot.hasError) {
|
||||||
return Text('Error: ${snapshot.error}');
|
return Text('Error: ${snapshot.error}');
|
||||||
|
@ -333,23 +319,16 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
onAnimationEnd: () {
|
onAnimationEnd: () {
|
||||||
_resetAnimationAndToggleAccess();
|
_resetAnimationAndToggleAccess();
|
||||||
},
|
},
|
||||||
progressColor:
|
progressColor: FlutterFlowTheme.of(context).primary,
|
||||||
FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
backgroundColor:
|
|
||||||
FlutterFlowTheme.of(context).primaryText,
|
|
||||||
center: Text(
|
center: Text(
|
||||||
'${(progress * totalTimeInSeconds / 5).toStringAsFixed(1)}s',
|
'${(progress * totalTimeInSeconds / 5).toStringAsFixed(1)}s',
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).headlineSmall.override(
|
||||||
.headlineSmall
|
fontFamily: FlutterFlowTheme.of(context).headlineSmallFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.headlineSmallFamily,
|
|
||||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).headlineSmallFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.headlineSmallFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
startAngle: 20.0,
|
startAngle: 20.0,
|
||||||
|
@ -373,7 +352,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
||||||
Future<void> _showBiometricsAuth(BuildContext context) async {
|
Future<void> _showBiometricsAuth(BuildContext context) async {
|
||||||
await BiometricHelper.checkBiometrics()
|
await BiometricHelper.checkBiometrics()
|
||||||
.then((value) async => await BiometricHelper.authenticateBiometric().then((value) async {
|
.then((value) async => await BiometricHelper.authenticateBiometric().then((value) async {
|
||||||
if (value == false) throw Exception('Biometric authentication failed');
|
if (value == false) throw Exception('Biometric authentication failed');
|
||||||
final key = await StorageHelper().get(SecureStorageKey.fingerprintPass.value, Storage.SecureStorage);
|
final key = await StorageHelper().get(SecureStorageKey.fingerprintPass.value, Storage.SecureStorage);
|
||||||
if (key == null || key.isEmpty) throw Exception('No key found');
|
if (key == null || key.isEmpty) throw Exception('No key found');
|
||||||
safeSetState(() {
|
safeSetState(() {
|
||||||
|
|
|
@ -123,8 +123,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
enText: 'My Identifier'),
|
enText: 'My Identifier'),
|
||||||
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
||||||
fontFamily: 'Nunito Sans',
|
fontFamily: 'Nunito Sans',
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
.secondaryText,
|
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
@ -136,12 +135,9 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
.getVariableText(ptText: 'Meu Identificador', enText: 'My Identifier'),
|
.getVariableText(ptText: 'Meu Identificador', enText: 'My Identifier'),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height:30,
|
height: 30,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Nunito Sans',
|
fontFamily: 'Nunito Sans',
|
||||||
|
@ -175,16 +171,10 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 30,
|
height: 30,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding:
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).customColor1,
|
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Nunito Sans',
|
fontFamily: 'Nunito Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
fontSize: limitedInputFontSize,
|
fontSize: limitedInputFontSize,
|
||||||
|
|
|
@ -419,7 +419,6 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
||||||
ptText: 'Cancelar',
|
ptText: 'Cancelar',
|
||||||
enText: 'Cancel',
|
enText: 'Cancel',
|
||||||
),
|
),
|
||||||
|
|
||||||
icon: const Icon(Icons.close),
|
icon: const Icon(Icons.close),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
showAlertDialog(
|
showAlertDialog(
|
||||||
|
@ -477,7 +476,7 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: MediaQuery.of(context).size.width * 0.3,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -130,7 +130,6 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
|
@ -144,14 +143,13 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(FFLocalizations.of(context)
|
child: Text(
|
||||||
.getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"),
|
FFLocalizations.of(context)
|
||||||
|
.getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: limitedHeaderFontSize,
|
fontSize: limitedHeaderFontSize,
|
||||||
fontWeight: FontWeight.bold
|
fontWeight: FontWeight.bold)),
|
||||||
)
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -249,12 +247,9 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
||||||
],
|
],
|
||||||
onTapCardItemAction: () async {
|
onTapCardItemAction: () async {
|
||||||
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final userUUID =
|
final userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
final cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
final cliUUID =
|
final cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
final cliName =
|
|
||||||
(await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
|
|
||||||
await showDialog(
|
await showDialog(
|
||||||
useSafeArea: true,
|
useSafeArea: true,
|
||||||
|
|
|
@ -18,8 +18,7 @@ class AtomTermsOfUse extends StatelessWidget {
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: LimitedFontSizeUtil.getInputFontSize(
|
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||||
context),
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
|
|
|
@ -15,7 +15,8 @@ class SQLiteStorage implements BaseStorage {
|
||||||
|
|
||||||
late final _database;
|
late final _database;
|
||||||
|
|
||||||
@override Future<void> init() async {
|
@override
|
||||||
|
Future<void> init() async {
|
||||||
_database = await openDatabase(
|
_database = await openDatabase(
|
||||||
join(await getDatabasesPath(), _dbName),
|
join(await getDatabasesPath(), _dbName),
|
||||||
version: _dbVersion,
|
version: _dbVersion,
|
||||||
|
@ -29,10 +30,10 @@ class SQLiteStorage implements BaseStorage {
|
||||||
_onCreate(Database database, int version) async {
|
_onCreate(Database database, int version) async {
|
||||||
await database.execute(_tableKeychain);
|
await database.execute(_tableKeychain);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onUpdate(Database database, int oldVersion, int newVersion) async {}
|
_onUpdate(Database database, int oldVersion, int newVersion) async {}
|
||||||
_onDowngrade(Database database, int oldVersion, int newVersion) async {}
|
_onDowngrade(Database database, int oldVersion, int newVersion) async {}
|
||||||
|
|
||||||
|
|
||||||
String get _tableKeychain => '''
|
String get _tableKeychain => '''
|
||||||
CREATE TABLE keychain (
|
CREATE TABLE keychain (
|
||||||
key TEXT UNIQUE,
|
key TEXT UNIQUE,
|
||||||
|
@ -66,7 +67,8 @@ class SQLiteStorage implements BaseStorage {
|
||||||
{'key': SQLiteStorageKey.petAmount.value, 'value': '', 'type': 'local'},
|
{'key': SQLiteStorageKey.petAmount.value, 'value': '', 'type': 'local'},
|
||||||
];
|
];
|
||||||
|
|
||||||
@override Future<String?> get(String key) async {
|
@override
|
||||||
|
Future<String?> get(String key) async {
|
||||||
var response = await _database.query('keychain', where: 'key = ?', whereArgs: [key]);
|
var response = await _database.query('keychain', where: 'key = ?', whereArgs: [key]);
|
||||||
if (response.isEmpty) {
|
if (response.isEmpty) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -74,7 +76,8 @@ class SQLiteStorage implements BaseStorage {
|
||||||
return response.first['value'];
|
return response.first['value'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@override Future<void> set(String key, String value) async {
|
@override
|
||||||
|
Future<void> set(String key, String value) async {
|
||||||
var date = DateTime.now().toIso8601String();
|
var date = DateTime.now().toIso8601String();
|
||||||
await _database.insert(
|
await _database.insert(
|
||||||
tableKeychain,
|
tableKeychain,
|
||||||
|
@ -86,15 +89,16 @@ class SQLiteStorage implements BaseStorage {
|
||||||
'resolvedAt': date,
|
'resolvedAt': date,
|
||||||
'createdAt': date,
|
'createdAt': date,
|
||||||
},
|
},
|
||||||
conflictAlgorithm: ConflictAlgorithm.replace
|
conflictAlgorithm: ConflictAlgorithm.replace);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override Future<void> delete(String key) async {
|
@override
|
||||||
|
Future<void> delete(String key) async {
|
||||||
await _database.delete('keychain', where: 'key = ?', whereArgs: [key]);
|
await _database.delete('keychain', where: 'key = ?', whereArgs: [key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override Future<void> clearAll() async {
|
@override
|
||||||
|
Future<void> clearAll() async {
|
||||||
await _database.delete('keychain');
|
await _database.delete('keychain');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,11 @@ import 'package:hub/shared/helpers/secure_storage.dart';
|
||||||
import 'package:hub/shared/helpers/shared_preferences_storage.dart';
|
import 'package:hub/shared/helpers/shared_preferences_storage.dart';
|
||||||
import 'package:hub/shared/helpers/sqlite_storage.dart';
|
import 'package:hub/shared/helpers/sqlite_storage.dart';
|
||||||
|
|
||||||
|
|
||||||
class StorageHelper {
|
class StorageHelper {
|
||||||
static final StorageHelper _instance = StorageHelper._internal();
|
static final StorageHelper _instance = StorageHelper._internal();
|
||||||
factory StorageHelper() => _instance;
|
factory StorageHelper() => _instance;
|
||||||
StorageHelper._internal();
|
StorageHelper._internal();
|
||||||
|
|
||||||
|
|
||||||
late BuildContext? _context;
|
late BuildContext? _context;
|
||||||
late bool _isRecovered = false;
|
late bool _isRecovered = false;
|
||||||
BuildContext? get context => _context;
|
BuildContext? get context => _context;
|
||||||
|
@ -75,6 +73,4 @@ class StorageHelper {
|
||||||
return SQLiteStorage.instance.clearAll();
|
return SQLiteStorage.instance.clearAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,8 @@ class AuthenticationService {
|
||||||
DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} return;
|
}
|
||||||
|
return;
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed('login.php', emailAdress.toString(), "Login", e, s);
|
LogUtil.requestAPIFailed('login.php', emailAdress.toString(), "Login", e, s);
|
||||||
|
@ -219,4 +220,4 @@ class AuthenticationService {
|
||||||
SnackBarUtil.showSnackBar(context, content, isError: true);
|
SnackBarUtil.showSnackBar(context, content, isError: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,7 +207,7 @@ class LocalizationService {
|
||||||
final String userUUID = await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage) ?? '';
|
final String userUUID = await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage) ?? '';
|
||||||
final bool isAuthenticated = userUUID.isNotEmpty && devUUID.isNotEmpty;
|
final bool isAuthenticated = userUUID.isNotEmpty && devUUID.isNotEmpty;
|
||||||
final bool isDevLinked = !errorMsg.contains('Esse dispositivo nao pertence a esse usuario');
|
final bool isDevLinked = !errorMsg.contains('Esse dispositivo nao pertence a esse usuario');
|
||||||
log('() => isLinked: $errorMsg');
|
log('() => isLinked: $errorMsg');
|
||||||
if (!isAuthenticated) {
|
if (!isAuthenticated) {
|
||||||
errorMsg = FFLocalizations.of(context).getVariableText(
|
errorMsg = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Erro ao obter credenciais de autenticação',
|
ptText: 'Erro ao obter credenciais de autenticação',
|
||||||
|
@ -226,7 +226,6 @@ class LocalizationService {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await DialogUtil.error(context, errorMsg).whenComplete(() async => await selectLocal(context));
|
await DialogUtil.error(context, errorMsg).whenComplete(() async => await selectLocal(context));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<bool> _handleUnavailable(BuildContext context, List<dynamic> locals) async {
|
static Future<bool> _handleUnavailable(BuildContext context, List<dynamic> locals) async {
|
||||||
|
@ -283,8 +282,7 @@ class LocalizationService {
|
||||||
static Future<bool> _isUnselected() async {
|
static Future<bool> _isUnselected() async {
|
||||||
String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
String cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
String cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
||||||
String ownerUUID =
|
String ownerUUID = (await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
(await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
|
|
||||||
return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty;
|
return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,10 +309,8 @@ class LocalizationService {
|
||||||
SQLiteStorageKey.petAmount.value,
|
SQLiteStorageKey.petAmount.value,
|
||||||
jsonBody['petAmountRegister'] != null && jsonBody['petAmountRegister'].toString().isEmpty
|
jsonBody['petAmountRegister'] != null && jsonBody['petAmountRegister'].toString().isEmpty
|
||||||
? '0'
|
? '0'
|
||||||
: jsonBody['petAmountRegister'].toString(),
|
: jsonBody['petAmountRegister'].toString(),
|
||||||
Storage.SQLiteStorage
|
Storage.SQLiteStorage);
|
||||||
);
|
await StorageHelper().set(SQLiteStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'], Storage.SQLiteStorage);
|
||||||
await StorageHelper()
|
|
||||||
.set(SQLiteStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'], Storage.SQLiteStorage);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class LimitedFontSizeUtil {
|
class LimitedFontSizeUtil {
|
||||||
static double getCalculateFontSize(BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) {
|
static double getCalculateFontSize(
|
||||||
|
BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) {
|
||||||
final textScaler = MediaQuery.textScalerOf(context);
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||||
return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize;
|
return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize;
|
||||||
|
@ -9,18 +10,19 @@ class LimitedFontSizeUtil {
|
||||||
|
|
||||||
static double getNoResizeFont(BuildContext context, double baseFontSize) {
|
static double getNoResizeFont(BuildContext context, double baseFontSize) {
|
||||||
final textScaler = MediaQuery.textScalerOf(context);
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
final double noscaledFontSize = baseFontSize / textScaler.scale(1);
|
final double noscaledFontSize = baseFontSize / textScaler.scale(1);
|
||||||
return noscaledFontSize;
|
return noscaledFontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
static double getScaledSizedBoxSize(BuildContext context, double baseFontSize, double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) {
|
static double getScaledSizedBoxSize(
|
||||||
|
BuildContext context, double baseFontSize, double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) {
|
||||||
final textScaler = MediaQuery.textScalerOf(context);
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||||
return scaledFontSize > maxFontSize ? sizeIfExceeded : sizeIfNotExceeded;
|
return scaledFontSize > maxFontSize ? sizeIfExceeded : sizeIfNotExceeded;
|
||||||
}
|
}
|
||||||
|
|
||||||
static double getBodyFontSize(BuildContext context) {
|
static double getBodyFontSize(BuildContext context) {
|
||||||
final textScaler = MediaQuery.textScalerOf(context);
|
final textScaler = MediaQuery.textScalerOf(context);
|
||||||
final double scaledFontSize = 12 * textScaler.scale(1);
|
final double scaledFontSize = 12 * textScaler.scale(1);
|
||||||
return scaledFontSize > 12 ? 10 : scaledFontSize;
|
return scaledFontSize > 12 ? 10 : scaledFontSize;
|
||||||
}
|
}
|
||||||
|
@ -42,4 +44,4 @@ class LimitedFontSizeUtil {
|
||||||
final double scaledFontSize = 14 * textScaler.scale(1);
|
final double scaledFontSize = 14 * textScaler.scale(1);
|
||||||
return scaledFontSize > 14 ? 12 : scaledFontSize;
|
return scaledFontSize > 14 ? 12 : scaledFontSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,8 @@ class TextUtil extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var textScale = MediaQuery.textScalerOf(context);
|
var textScale = MediaQuery.textScalerOf(context);
|
||||||
var scaledTextSize = textScale.scale(style?.fontSize ?? 14);
|
var scaledTextSize = textScale.scale(style?.fontSize ?? 14);
|
||||||
double limitedTextSize = scaledTextSize > (style?.fontSize ?? 14) * 2
|
double limitedTextSize =
|
||||||
? (style?.fontSize ?? 14) * 2
|
scaledTextSize > (style?.fontSize ?? 14) * 2 ? (style?.fontSize ?? 14) * 2 : scaledTextSize;
|
||||||
: scaledTextSize;
|
|
||||||
|
|
||||||
return Text(
|
return Text(
|
||||||
text,
|
text,
|
||||||
|
|
Loading…
Reference in New Issue