diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
index 288304cb..f548d112 100644
--- a/android/app/src/debug/AndroidManifest.xml
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -1,7 +1,124 @@
-
-
-
+
+ package="com.freaccess.hub"
+
+ xmlns:tools="http://schemas.android.com/tools">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 46d26daf..f548d112 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,118 +1,124 @@
-
-
-
-
-
-
-
-
-
-
+ package="com.freaccess.hub"
-
+ xmlns:tools="http://schemas.android.com/tools">
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android/app/src/main/kotlin/com/freaccess/hub/MainActivity.kt b/android/app/src/main/kotlin/com/freaccess/hub/MainActivity.kt
index 10a40dac..2cf5fe44 100644
--- a/android/app/src/main/kotlin/com/freaccess/hub/MainActivity.kt
+++ b/android/app/src/main/kotlin/com/freaccess/hub/MainActivity.kt
@@ -1,5 +1,53 @@
package com.freaccess.hub
+import android.os.Bundle
+
+import android.provider.Settings
+
import io.flutter.embedding.android.FlutterFragmentActivity
-class MainActivity: FlutterFragmentActivity() {}
+import io.flutter.embedding.engine.FlutterEngine
+
+import io.flutter.plugin.common.MethodChannel
+
+class MainActivity: FlutterFragmentActivity() {
+
+ private val CHANNEL = "com.freaccess.hub/getAndroidId"
+
+ override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
+
+ super.configureFlutterEngine(flutterEngine)
+
+ MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler { call, result ->
+
+ if (call.method == "getAndroidId") {
+
+ val androidId = getAndroidId()
+
+ if (androidId != null) {
+
+ result.success(androidId)
+
+ } else {
+
+ result.error("UNAVAILABLE", "Android ID not available.", null)
+
+ }
+
+ } else {
+
+ result.notImplemented()
+
+ }
+
+ }
+
+ }
+
+ private fun getAndroidId(): String? {
+
+ return Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID)
+
+ }
+
+}
\ No newline at end of file
diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart
index 76beccc8..e9ffa21c 100644
--- a/integration_test/app_test.dart
+++ b/integration_test/app_test.dart
@@ -14,8 +14,8 @@ void main() {
group('Initialization', () {
group('Navigation', () {
- setUpAll(() async => await initializeApp().then(
- (_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
+ setUpAll(() async => await initializeApp()
+ .then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
testWidgets('Test Welcome', (WidgetTester tester) async {
widget = tester;
await _testWelcome();
@@ -26,16 +26,16 @@ void main() {
});
group('Authentication', () {
group('Sign in', () {
- setUpAll(() async => await initializeApp().then(
- (_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
+ setUpAll(() async => await initializeApp()
+ .then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
testWidgets('Test Sign In', (WidgetTester tester) async {
widget = tester;
await _testSignIn();
});
});
group('Sign up', () {
- setUpAll(() async => await initializeApp().then(
- (_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
+ setUpAll(() async => await initializeApp()
+ .then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
testWidgets('Test Sign Up', (WidgetTester tester) async {
widget = tester;
await _testSignUp();
diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart
index eb44686e..e1dac19a 100644
--- a/lib/backend/api_requests/api_calls.dart
+++ b/lib/backend/api_requests/api_calls.dart
@@ -61,10 +61,8 @@ class PhpGroup {
class UnregisterDevice {
Future call() async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall(
callName: 'unregisterDevice',
@@ -91,12 +89,9 @@ class UnregisterDevice {
class DeletePet {
Future call({final int? petID = 0}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'excluirPet';
return ApiManager.instance.makeApiCall(
@@ -139,12 +134,9 @@ class UpdatePet {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'atualizarPet';
return ApiManager.instance.makeApiCall(
@@ -188,12 +180,9 @@ class GetPets {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'consultaPets';
return ApiManager.instance.makeApiCall(
@@ -225,12 +214,9 @@ class GetPetPhoto {
Future call({final int? petId}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'consultaFotoPet';
return ApiManager.instance.makeApiCall(
@@ -271,12 +257,9 @@ class RegisterPet {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'cadastrarPet';
return ApiManager.instance.makeApiCall(
@@ -319,12 +302,9 @@ class BuscaEnconcomendas {
final String? adresseeType,
final String? status,
}) async {
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getEncomendas';
final String baseUrl = PhpGroup.getBaseUrl();
@@ -366,12 +346,9 @@ class CancelaVisita {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'cancelaVisita';
return ApiManager.instance.makeApiCall(
@@ -403,10 +380,8 @@ class CancelaVisita {
class DeleteAccount {
Future call() async {
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String baseUrl = PhpGroup.getBaseUrl();
return ApiManager.instance.makeApiCall(
@@ -437,12 +412,9 @@ class ChangePanic {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall(
@@ -476,12 +448,9 @@ class ChangePass {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall(
@@ -515,12 +484,9 @@ class RespondeVinculo {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall(
callName: 'respondeVinculo',
@@ -552,12 +518,9 @@ class ChangeNotifica {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall(
@@ -589,14 +552,10 @@ class UpdateIDE {
Future call() async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliUUID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
- final String newIde =
- (await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String newIde = (await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'updVisitado';
return ApiManager.instance.makeApiCall(
@@ -628,10 +587,8 @@ class UpdToken {
Future call() async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String token = (await StorageHelper().get(SecureStorageKey.token.value, Storage.SecureStorage)) ?? '';
return ApiManager.instance.makeApiCall(
@@ -659,23 +616,20 @@ class UpdToken {
class LoginCall {
Future call() async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String email = (await StorageHelper().get(SecureStorageKey.email.value, Storage.SecureStorage)) ?? '';
- final String password =
- (await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
- final String type =
- (await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
+ final String password = (await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
+ final String type = (await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
final String description =
(await StorageHelper().get(SecureStorageKey.deviceDescription.value, Storage.SecureStorage)) ?? '';
late final String token;
try {
token = await FirebaseMessagingService.getToken();
- if(token == null || token.isEmpty) throw Exception('Token is empty'); }
- catch (e, s) {
+ if (token == null || token.isEmpty) throw Exception('Token is empty');
+ } catch (e, s) {
token = '';
log('Error getting token', error: e, stackTrace: s);
- LogUtil.requestAPIFailed('login.php', email, "Login", e, s);
+ LogUtil.requestAPIFailed('login.php', email, "Login", e, s);
}
return ApiManager.instance.makeApiCall(
@@ -750,12 +704,9 @@ class ChangePasswordCall {
required final String psswd,
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall(
callName: 'changePassword',
@@ -854,12 +805,9 @@ class PostScheduleVisitorCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'putVisitante';
return ApiManager.instance.makeApiCall(
@@ -912,12 +860,9 @@ class PostScheduleVisitCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'putVisita';
return ApiManager.instance.makeApiCall(
@@ -969,12 +914,9 @@ class GetScheduleVisitCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliUUID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getVisitas';
return ApiManager.instance.makeApiCall(
@@ -1246,12 +1188,9 @@ class GetDadosCall {
Future call() async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliUUID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getDados';
return ApiManager.instance.makeApiCall(
@@ -1482,12 +1421,9 @@ class GetVisitorByDocCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getVisitante';
return ApiManager.instance.makeApiCall(
@@ -1539,12 +1475,9 @@ class GetFotoVisitanteCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getFotoVisitante';
return ApiManager.instance.makeApiCall(
@@ -1581,12 +1514,9 @@ class PostProvVisitSchedulingCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'putAgendamentoProv';
return ApiManager.instance.makeApiCall(
@@ -1633,12 +1563,9 @@ class GetVisitsCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getVisitas';
return ApiManager.instance.makeApiCall(
@@ -1899,12 +1826,9 @@ class DeleteVisitCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'cancelaVisita';
return ApiManager.instance.makeApiCall(
@@ -1945,14 +1869,10 @@ class GetPessoasLocalCall {
Future call() async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String ownerUUID =
- (await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliUUID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String ownerUUID = (await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
return ApiManager.instance.makeApiCall(
callName: 'getPessoasLocal',
@@ -2015,12 +1935,9 @@ class RespondeSolicitacaoCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliUUID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'respondeSolicitacao';
return ApiManager.instance.makeApiCall(
@@ -2068,12 +1985,9 @@ class GetAccessCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliUUID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getAcessos';
return ApiManager.instance.makeApiCall(
@@ -2320,10 +2234,8 @@ class GetLiberationsCall {
final StreamController controller = StreamController();
Future.microtask(() async {
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getSolicitacoes';
@@ -2515,12 +2427,9 @@ class GetMessagesCall {
}) async {
final String baseUrl = PhpGroup.getBaseUrl();
- final String devUUID =
- (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
- final String userUUID =
- (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
- final String cliUUID =
- (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
+ final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getMensagens';
return ApiManager.instance.makeApiCall(
diff --git a/lib/backend/notifications/notification_service.dart b/lib/backend/notifications/notification_service.dart
index 4254183d..53d7eaff 100644
--- a/lib/backend/notifications/notification_service.dart
+++ b/lib/backend/notifications/notification_service.dart
@@ -271,8 +271,7 @@ class NotificationService {
await AwesomeNotifications().isNotificationAllowed().then((isAllowed) async {
final bool requestOSnotification =
- (await StorageHelper().get(SQLiteStorageKey.requestOSNotification.value, Storage.SQLiteStorage)) ==
- 'true';
+ (await StorageHelper().get(SQLiteStorageKey.requestOSNotification.value, Storage.SQLiteStorage)) == 'true';
if (requestOSnotification == false) {
if (isAllowed == false) {
diff --git a/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
index 32471006..453e89be 100644
--- a/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
+++ b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
@@ -44,9 +44,13 @@ class _MenuButtonWidgetState extends State {
onTap: _isProcessing
? null
: () async {
- setState(() { _isProcessing = true; });
+ setState(() {
+ _isProcessing = true;
+ });
await widget.action.call();
- setState(() { _isProcessing = false; });
+ setState(() {
+ _isProcessing = false;
+ });
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
diff --git a/lib/components/atomic_components/menu_card_item/menu_card_item.dart b/lib/components/atomic_components/menu_card_item/menu_card_item.dart
index 83afb4d6..77d351d9 100644
--- a/lib/components/atomic_components/menu_card_item/menu_card_item.dart
+++ b/lib/components/atomic_components/menu_card_item/menu_card_item.dart
@@ -39,9 +39,13 @@ class _MenuCardItemState extends State {
onTap: _isProcessing
? null
: () async {
- setState(() { _isProcessing = true; });
+ setState(() {
+ _isProcessing = true;
+ });
await widget.action.call();
- setState(() { _isProcessing = false; });
+ setState(() {
+ _isProcessing = false;
+ });
},
child: Card(
elevation: 0,
diff --git a/lib/components/atomic_components/shared_components_atoms/custom_input.dart b/lib/components/atomic_components/shared_components_atoms/custom_input.dart
index 51d0fbad..cac159f4 100644
--- a/lib/components/atomic_components/shared_components_atoms/custom_input.dart
+++ b/lib/components/atomic_components/shared_components_atoms/custom_input.dart
@@ -99,7 +99,7 @@ class _CustomInputUtilState extends State {
helperStyle: TextStyle(
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
fontSize: limitedInputTextSize,
- ),
+ ),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: FlutterFlowTheme.of(context).customColor6,
diff --git a/lib/components/atomic_components/shared_components_atoms/custom_select.dart b/lib/components/atomic_components/shared_components_atoms/custom_select.dart
index e21a0d80..8898a47b 100644
--- a/lib/components/atomic_components/shared_components_atoms/custom_select.dart
+++ b/lib/components/atomic_components/shared_components_atoms/custom_select.dart
@@ -41,8 +41,7 @@ class _CustomSelectState extends State {
@override
Widget build(BuildContext context) {
-
- double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
+ double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
return Padding(
padding: const EdgeInsetsDirectional.fromSTEB(0, 0.0, 0, 10.0),
@@ -110,13 +109,12 @@ class _CustomSelectState extends State {
ptText: 'Este campo é obrigatório',
),
style: FlutterFlowTheme.of(context).bodySmall.override(
- fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
- color: FlutterFlowTheme.of(context).customColor6,
- letterSpacing: 0.0,
- useGoogleFonts:
- GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
- fontSize: limitedInputFontSize
- )),
+ fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
+ color: FlutterFlowTheme.of(context).customColor6,
+ letterSpacing: 0.0,
+ useGoogleFonts:
+ GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
+ fontSize: limitedInputFontSize)),
),
],
),
diff --git a/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart b/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart
index 4f44136d..7b712455 100644
--- a/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart
+++ b/lib/components/atomic_components/shared_components_atoms/media_upload_button.dart
@@ -38,8 +38,7 @@ class _MediaUploadButtonUtilState extends State {
return Builder(
builder: (context) {
- if (widget.uploadedFiles != null &&
- widget.uploadedFiles!.bytes!.isNotEmpty) {
+ if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) {
{
return InkWell(
splashColor: Colors.transparent,
@@ -49,8 +48,7 @@ class _MediaUploadButtonUtilState extends State {
onTap: () async {
setState(() {
widget.isUploading = false;
- widget.uploadedFiles =
- FFUploadedFile(bytes: Uint8List.fromList([]));
+ widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([]));
widget.onUploadComplete(widget.uploadedFiles!);
});
},
@@ -70,133 +68,117 @@ class _MediaUploadButtonUtilState extends State {
children: [
Align(
alignment: const AlignmentDirectional(0.0, 0.0),
- child: GestureDetector(
- onTap: () async {
- setState(() {
- _isLoading = true;
- });
- final selectedMedia = await selectMediaWithSourceBottomSheet(
- context: context,
- imageQuality: 100,
- allowPhoto: true,
- includeDimensions: true,
+ child: GestureDetector(
+ onTap: () async {
+ setState(() {
+ _isLoading = true;
+ });
+ final selectedMedia = await selectMediaWithSourceBottomSheet(
+ context: context,
+ imageQuality: 100,
+ allowPhoto: true,
+ includeDimensions: true,
+ );
+ if (selectedMedia != null) {
+ setState(() => widget.isUploading = true);
+ var selectedUploadedFiles = [];
+
+ try {
+ final message = FFLocalizations.of(context)
+ .getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...');
+ showUploadMessage(
+ context,
+ message,
+ showLoading: true,
);
- if (selectedMedia != null) {
- setState(() => widget.isUploading = true);
- var selectedUploadedFiles = [];
-
- try {
- final message = FFLocalizations.of(context)
- .getVariableText(
- enText: 'Uploading file...',
- ptText: 'Enviando arquivo...');
- showUploadMessage(
- context,
- message,
- showLoading: true,
- );
- selectedUploadedFiles = selectedMedia
- .map((m) => FFUploadedFile(
- name: m.storagePath.split('/').last,
- bytes: m.bytes,
- height: m.dimensions?.height,
- width: m.dimensions?.width,
- // blurHash: m.blurHash,
- ))
- .toList();
- } finally {
- ScaffoldMessenger.of(context).hideCurrentSnackBar();
- widget.isUploading = false;
- }
- if (selectedUploadedFiles.length ==
- selectedMedia.length) {
- setState(() {
- widget.uploadedFiles = selectedUploadedFiles.first;
- });
- widget.onUploadComplete(widget.uploadedFiles!);
- final message = FFLocalizations.of(context)
- .getVariableText(
- enText: 'Success!', ptText: 'Sucesso!');
- showUploadMessage(context, message);
- } else {
- setState(() {
- _isLoading = false;
- });
- final message = FFLocalizations.of(context)
- .getVariableText(
- enText: 'Failed to upload data',
- ptText: 'Falha ao enviar dados');
- 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(
- 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),
- ),
- ),
- )
- ],
- ),
- ),
+ selectedUploadedFiles = selectedMedia
+ .map((m) => FFUploadedFile(
+ name: m.storagePath.split('/').last,
+ bytes: m.bytes,
+ height: m.dimensions?.height,
+ width: m.dimensions?.width,
+ // blurHash: m.blurHash,
+ ))
+ .toList();
+ } finally {
+ ScaffoldMessenger.of(context).hideCurrentSnackBar();
+ widget.isUploading = false;
+ }
+ if (selectedUploadedFiles.length == selectedMedia.length) {
+ setState(() {
+ widget.uploadedFiles = selectedUploadedFiles.first;
+ });
+ widget.onUploadComplete(widget.uploadedFiles!);
+ final message =
+ FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!');
+ showUploadMessage(context, message);
+ } else {
+ setState(() {
+ _isLoading = false;
+ });
+ final message = FFLocalizations.of(context)
+ .getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados');
+ 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(
+ 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),
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
),
],
);
diff --git a/lib/components/molecular_components/menu_item/menu_item.dart b/lib/components/molecular_components/menu_item/menu_item.dart
index 790b3fb4..8030ad6d 100644
--- a/lib/components/molecular_components/menu_item/menu_item.dart
+++ b/lib/components/molecular_components/menu_item/menu_item.dart
@@ -11,4 +11,4 @@ abstract class MenuEntry extends StatefulWidget {
final Function() action;
final String title;
final IconData icon;
-}
\ No newline at end of file
+}
diff --git a/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart b/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart
index db8cd7e4..bba2ea01 100644
--- a/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart
+++ b/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart
@@ -78,8 +78,7 @@ class _OptModalWidgetState extends State {
context.pop(filterResult);
}
- Widget _buildCheckboxListTile(
- String key, List