fix get secure android id

This commit is contained in:
J. A. Messias 2024-11-11 10:14:54 -03:00
parent e36df19108
commit fca35f919d
59 changed files with 1794 additions and 2655 deletions

View File

@ -1,7 +1,124 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.freaccess.hub">
<!-- Flutter needs it to communicate with the running application package="com.freaccess.hub"
to allow setting breakpoints, to provide hot reload, etc.
--> xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE" />
<application
android:label="FRE ACCESS HUB"
tools:replace="android:label"
android:icon="@mipmap/ic_launcher"
android:requestLegacyExternalStorage="true"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:showWhenLocked="true"
android:turnScreenOn="true">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="freaccess.com.br" android:pathPrefix="/freaccess/alterarSenha.php" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="freaccess" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="mensagem" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="frehub" android:host="frehub.com" />
</intent-filter>
<intent-filter>
<action android:name="visit_request" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="access" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="mensagem" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="enroll_cond" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/notification_icon" />
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<!-- <receiver android:exported="false"
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="false"
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver> -->
</application>
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest> </manifest>

View File

@ -1,118 +1,124 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.freaccess.hub"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application package="com.freaccess.hub"
android:label="FRE ACCESS HUB"
tools:replace="android:label"
android:icon="@mipmap/ic_launcher"
android:requestLegacyExternalStorage="true"
android:usesCleartextTraffic="true">
<activity xmlns:tools="http://schemas.android.com/tools">
android:name="io.flutter.embedding.android.FlutterFragmentActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:showWhenLocked="true"
android:turnScreenOn="true">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE" />
<meta-data <application
android:name="io.flutter.embedding.android.NormalTheme" android:label="FRE ACCESS HUB"
android:resource="@style/NormalTheme" tools:replace="android:label"
/> android:icon="@mipmap/ic_launcher"
<meta-data android:requestLegacyExternalStorage="true"
android:name="io.flutter.embedding.android.SplashScreenDrawable" android:usesCleartextTraffic="true">
android:resource="@drawable/launch_background"
/>
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"
android:showWhenLocked="true"
android:turnScreenOn="true">
<intent-filter> <meta-data
<action android:name="android.intent.action.MAIN" /> android:name="io.flutter.embedding.android.NormalTheme"
<category android:name="android.intent.category.LAUNCHER" /> android:resource="@style/NormalTheme"
</intent-filter> />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="freaccess.com.br" android:pathPrefix="/freaccess/alterarSenha.php" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="freaccess" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="mensagem" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="frehub" android:host="frehub.com" />
</intent-filter>
<intent-filter>
<action android:name="visit_request" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="access" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="mensagem" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="enroll_cond" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
</activity> <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data <intent-filter android:autoVerify="true">
android:name="com.google.firebase.messaging.default_notification_icon" <action android:name="android.intent.action.VIEW" />
android:resource="@drawable/notification_icon" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="freaccess.com.br" android:pathPrefix="/freaccess/alterarSenha.php" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="freaccess" />
</intent-filter>
<!-- Don't delete the meta-data below. <intent-filter android:autoVerify="true">
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <action android:name="mensagem" />
<meta-data <category android:name="android.intent.category.DEFAULT" />
android:name="flutterEmbedding" <category android:name="android.intent.category.BROWSABLE" />
android:value="2" /> <data android:scheme="frehub" android:host="frehub.com" />
</intent-filter>
<intent-filter>
<action android:name="visit_request" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!-- <receiver android:exported="false" <intent-filter>
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" /> <action android:name="access" />
<receiver android:exported="false" <category android:name="android.intent.category.DEFAULT" />
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"> </intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" /> <intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" /> <action android:name="mensagem" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" /> <category android:name="android.intent.category.DEFAULT" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" /> </intent-filter>
</intent-filter>
</receiver> --> <intent-filter>
<action android:name="enroll_cond" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/notification_icon" />
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<!-- <receiver android:exported="false"
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="false"
android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver> -->
</application>
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</application>
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest> </manifest>

View File

@ -1,5 +1,53 @@
package com.freaccess.hub package com.freaccess.hub
import android.os.Bundle
import android.provider.Settings
import io.flutter.embedding.android.FlutterFragmentActivity 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)
}
}

View File

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

View File

@ -61,10 +61,8 @@ class PhpGroup {
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',
@ -91,12 +89,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(
@ -139,12 +134,9 @@ class UpdatePet {
}) 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 = 'atualizarPet'; const String atividade = 'atualizarPet';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(
@ -188,12 +180,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(
@ -225,12 +214,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(
@ -271,12 +257,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(
@ -319,12 +302,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();
@ -366,12 +346,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(
@ -403,10 +380,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(
@ -437,12 +412,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(
@ -476,12 +448,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(
@ -515,12 +484,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',
@ -552,12 +518,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(
@ -589,14 +552,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(
@ -628,10 +587,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(
@ -659,20 +616,17 @@ class UpdToken {
class LoginCall { class LoginCall {
Future<ApiCallResponse> call() async { Future<ApiCallResponse> call() async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final String email = (await StorageHelper().get(SecureStorageKey.email.value, Storage.SecureStorage)) ?? ''; final String email = (await StorageHelper().get(SecureStorageKey.email.value, Storage.SecureStorage)) ?? '';
final String password = final String password = (await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
(await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? ''; final String type = (await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
final String type =
(await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
final String description = final String description =
(await StorageHelper().get(SecureStorageKey.deviceDescription.value, Storage.SecureStorage)) ?? ''; (await StorageHelper().get(SecureStorageKey.deviceDescription.value, Storage.SecureStorage)) ?? '';
late final String token; late final String token;
try { try {
token = await FirebaseMessagingService.getToken(); token = await FirebaseMessagingService.getToken();
if(token == null || token.isEmpty) throw Exception('Token is empty'); } if (token == null || token.isEmpty) throw Exception('Token is empty');
catch (e, s) { } catch (e, s) {
token = ''; token = '';
log('Error getting token', error: e, stackTrace: s); log('Error getting token', error: e, stackTrace: s);
LogUtil.requestAPIFailed('login.php', email, "Login", e, s); LogUtil.requestAPIFailed('login.php', email, "Login", e, s);
@ -750,12 +704,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',
@ -854,12 +805,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(
@ -912,12 +860,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(
@ -969,12 +914,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(
@ -1246,12 +1188,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(
@ -1482,12 +1421,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(
@ -1539,12 +1475,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(
@ -1581,12 +1514,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(
@ -1633,12 +1563,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(
@ -1899,12 +1826,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(
@ -1945,14 +1869,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',
@ -2015,12 +1935,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(
@ -2068,12 +1985,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(
@ -2320,10 +2234,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';
@ -2515,12 +2427,9 @@ class GetMessagesCall {
}) async { }) async {
final String baseUrl = PhpGroup.getBaseUrl(); final String baseUrl = PhpGroup.getBaseUrl();
final String devUUID = final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String userUUID = final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
final String cliUUID =
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
const String atividade = 'getMensagens'; const String atividade = 'getMensagens';
return ApiManager.instance.makeApiCall( return ApiManager.instance.makeApiCall(

View File

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

View File

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

View File

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

View File

@ -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,

View File

@ -41,7 +41,6 @@ class _CustomSelectState extends State<CustomSelect> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
return Padding( return Padding(
@ -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)),
)),
), ),
], ],
), ),

View File

@ -38,8 +38,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
return Builder( return Builder(
builder: (context) { builder: (context) {
if (widget.uploadedFiles != null && if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) {
widget.uploadedFiles!.bytes!.isNotEmpty) {
{ {
return InkWell( return InkWell(
splashColor: Colors.transparent, splashColor: Colors.transparent,
@ -49,8 +48,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
onTap: () async { onTap: () async {
setState(() { setState(() {
widget.isUploading = false; widget.isUploading = false;
widget.uploadedFiles = widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([]));
FFUploadedFile(bytes: Uint8List.fromList([]));
widget.onUploadComplete(widget.uploadedFiles!); widget.onUploadComplete(widget.uploadedFiles!);
}); });
}, },
@ -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) { if (selectedMedia != null) {
setState(() => widget.isUploading = true); setState(() => widget.isUploading = true);
var selectedUploadedFiles = <FFUploadedFile>[]; var selectedUploadedFiles = <FFUploadedFile>[];
try { try {
final message = FFLocalizations.of(context) final message = FFLocalizations.of(context)
.getVariableText( .getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...');
enText: 'Uploading file...', showUploadMessage(
ptText: 'Enviando arquivo...'); context,
showUploadMessage( message,
context, showLoading: true,
message, );
showLoading: true, selectedUploadedFiles = selectedMedia
); .map((m) => FFUploadedFile(
selectedUploadedFiles = selectedMedia name: m.storagePath.split('/').last,
.map((m) => FFUploadedFile( bytes: m.bytes,
name: m.storagePath.split('/').last, height: m.dimensions?.height,
bytes: m.bytes, width: m.dimensions?.width,
height: m.dimensions?.height, // blurHash: m.blurHash,
width: m.dimensions?.width, ))
// blurHash: m.blurHash, .toList();
)) } finally {
.toList(); ScaffoldMessenger.of(context).hideCurrentSnackBar();
} finally { widget.isUploading = false;
ScaffoldMessenger.of(context).hideCurrentSnackBar(); }
widget.isUploading = false; if (selectedUploadedFiles.length == selectedMedia.length) {
} setState(() {
if (selectedUploadedFiles.length == widget.uploadedFiles = selectedUploadedFiles.first;
selectedMedia.length) { });
setState(() { widget.onUploadComplete(widget.uploadedFiles!);
widget.uploadedFiles = selectedUploadedFiles.first; final message =
}); FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!');
widget.onUploadComplete(widget.uploadedFiles!); showUploadMessage(context, message);
final message = FFLocalizations.of(context) } else {
.getVariableText( setState(() {
enText: 'Success!', ptText: 'Sucesso!'); _isLoading = false;
showUploadMessage(context, message); });
} else { final message = FFLocalizations.of(context)
setState(() { .getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados');
_isLoading = false; showUploadMessage(context, message);
}); return;
final message = FFLocalizations.of(context) }
.getVariableText( } else {
enText: 'Failed to upload data', setState(() {
ptText: 'Falha ao enviar dados'); _isLoading = false;
showUploadMessage(context, message); });
return; }
} }else{ },
setState(() { child: Center(
_isLoading = false; child: Container(
}); width: MediaQuery.of(context).size.width * 0.8,
} height: 120,
}, decoration: BoxDecoration(
child: Center( borderRadius: BorderRadius.circular(8.0),
child: Container( border: Border.all(
width: MediaQuery.of(context).size.width * 0.8, color: FlutterFlowTheme.of(context).customColor6,
height: 120, width: 1.0,
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),
),
),
)
],
),
),
),
),
), ),
], ],
); );

View File

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

View File

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

View File

@ -92,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,
),
),
),
],
),
],
),
), ),
), ),
), );
); }
}
} }

View File

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

View File

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

View File

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

View File

@ -8,7 +8,6 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
import 'package:hub/flutter_flow/flutter_flow_util.dart'; import 'package:hub/flutter_flow/flutter_flow_util.dart';
import 'package:hub/shared/utils/limited_text_size.dart'; import 'package:hub/shared/utils/limited_text_size.dart';
class DetailsComponentWidget extends StatefulWidget { class DetailsComponentWidget extends StatefulWidget {
const DetailsComponentWidget({ const DetailsComponentWidget({
Key? key, Key? key,
@ -176,7 +175,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,
@ -186,9 +184,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,
@ -205,14 +201,9 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context).labelMediumFamily, FlutterFlowTheme.of(context).labelMediumFamily,
), ),
), ),
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
hintStyle: FlutterFlowTheme.of(context) fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
.labelMedium
.override(
fontFamily:
FlutterFlowTheme.of(context).labelMediumFamily,
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
letterSpacing: 0.0, letterSpacing: 0.0,
useGoogleFonts: GoogleFonts.asMap().containsKey( useGoogleFonts: GoogleFonts.asMap().containsKey(

View File

@ -83,8 +83,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
tablet: false, tablet: false,
)) ))
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
16.0, 0.0, 16.0, 8.0),
child: InkWell( child: InkWell(
key: const ValueKey<String>('BackButton'), key: const ValueKey<String>('BackButton'),
splashColor: Colors.transparent, splashColor: Colors.transparent,
@ -98,8 +97,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
const Padding( const Padding(
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
0.0, 12.0, 0.0, 12.0),
child: Icon( child: Icon(
Icons.arrow_back_rounded, Icons.arrow_back_rounded,
color: Color(0xFF15161E), color: Color(0xFF15161E),
@ -107,20 +105,16 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
12.0, 0.0, 0.0, 0.0),
child: Text( child: Text(
'', '',
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).bodyMedium.override(
.bodyMedium
.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: const Color(0xFF15161E), color: const Color(0xFF15161E),
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -129,36 +123,30 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
), ),
), ),
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
child: Text( child: Text(
FFLocalizations.of(context) FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
.getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
style: FlutterFlowTheme.of(context).headlineMedium.override( style: FlutterFlowTheme.of(context).headlineMedium.override(
fontFamily: 'Outfit', fontFamily: 'Outfit',
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
GoogleFonts.asMap().containsKey('Outfit'),
), ),
), ),
), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
16.0, 4.0, 16.0, 4.0),
child: Text( child: Text(
FFLocalizations.of(context).getText( FFLocalizations.of(context).getText('wu2f7yzo' /* Não se preucupe nós vamos te a... */),
'wu2f7yzo' /* Não se preucupe nós vamos te a... */),
style: FlutterFlowTheme.of(context).labelMedium.override( style: FlutterFlowTheme.of(context).labelMedium.override(
fontFamily: 'Plus Jakarta Sans', fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedSubHeaderFontSize, fontSize: limitedSubHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap() useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
.containsKey('Plus Jakarta Sans'),
), ),
), ),
), ),
@ -166,8 +154,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
key: _model.formKey, key: _model.formKey,
autovalidateMode: AutovalidateMode.onUserInteraction, autovalidateMode: AutovalidateMode.onUserInteraction,
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
16.0, 12.0, 16.0, 0.0),
child: SizedBox( child: SizedBox(
width: double.infinity, width: double.infinity,
child: TextFormField( child: TextFormField(
@ -184,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,

View File

@ -70,11 +70,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
FFLocalizations.of(context).getText('uj8acuab'), FFLocalizations.of(context).getText('uj8acuab'),
textAlign: TextAlign.start, textAlign: TextAlign.start,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: FlutterFlowTheme.of(context) style: FlutterFlowTheme.of(context).bodyMedium.override(
.bodyMedium fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
.override(
fontFamily: FlutterFlowTheme.of(context)
.bodyMediumFamily,
fontSize: limitedHeaderFontSize, fontSize: limitedHeaderFontSize,
letterSpacing: 0.0, letterSpacing: 0.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -103,9 +100,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,
), ),
), ),
@ -154,29 +149,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,
),
), ),
), ),
), ),
@ -205,9 +189,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,
), ),
), ),
@ -242,7 +224,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,
@ -250,8 +232,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(
@ -290,14 +271,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,
@ -339,8 +315,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(
@ -380,8 +355,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),
@ -524,7 +498,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,
@ -532,43 +505,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(
@ -619,7 +569,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,
@ -685,12 +634,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
showLoadingIndicator: true, showLoadingIndicator: true,
text: FFLocalizations.of(context).getText('bv5fg9sv'), text: FFLocalizations.of(context).getText('bv5fg9sv'),
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,
@ -700,7 +646,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily), GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
fontSize: limitedInputFontSize, fontSize: limitedInputFontSize,
), ),
elevation: 3.0, elevation: 3.0,
borderSide: const BorderSide(color: Colors.transparent, width: 1.0), borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
borderRadius: BorderRadius.circular(8.0), borderRadius: BorderRadius.circular(8.0),

View File

@ -51,7 +51,6 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Align( return Align(
alignment: const AlignmentDirectional(0.0, 1.0), alignment: const AlignmentDirectional(0.0, 1.0),
child: Container( child: Container(
@ -84,8 +83,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
tablet: false, tablet: false,
)) ))
Padding( Padding(
padding: padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
child: InkWell( child: InkWell(
splashColor: Colors.transparent, splashColor: Colors.transparent,
focusColor: Colors.transparent, focusColor: Colors.transparent,
@ -98,8 +96,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
const Padding( const Padding(
padding: EdgeInsetsDirectional.fromSTEB( padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
0.0, 12.0, 0.0, 12.0),
child: Icon( child: Icon(
Icons.arrow_back_rounded, Icons.arrow_back_rounded,
color: Color(0xFF15161E), color: Color(0xFF15161E),
@ -107,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(

View File

@ -114,7 +114,6 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context); double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context); double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context); double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
@ -144,8 +143,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
Align( Align(
alignment: const AlignmentDirectional(-1.0, 0.0), alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB( padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 15.0),
24.0, 0.0, 24.0, 15.0),
child: Text( child: Text(
FFLocalizations.of(context).getText( FFLocalizations.of(context).getText(
'zazj5d8b' /* Preencha o formulário com os d... */, 'zazj5d8b' /* Preencha o formulário com os d... */,
@ -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, ]);
),
]
);
} }
}, },
), ),
@ -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,

View File

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

View File

@ -75,9 +75,9 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
), ),
Column(children: [ Column(
children: [],
],), ),
Padding( Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0), padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
child: TextFormField( child: TextFormField(
@ -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(

View File

@ -26,9 +26,7 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState(); State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState();
} }
class _WelcomeTemplateComponentWidgetState class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponentWidget> with TickerProviderStateMixin {
extends State<WelcomeTemplateComponentWidget>
with TickerProviderStateMixin {
late WelcomeTemplateComponentModel _model; late WelcomeTemplateComponentModel _model;
final animationsMap = <String, AnimationInfo>{}; final animationsMap = <String, AnimationInfo>{};
@ -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();
}, },

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -226,13 +226,13 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: [ children: [
Center( Center(
child: Text(FFLocalizations.of(context).getVariableText( child: Text(
ptText: "Nenhuma mensagem encontrada!", FFLocalizations.of(context)
enText: "No message found"), .getVariableText(ptText: "Nenhuma mensagem encontrada!", enText: "No message found"),
style: TextStyle( style: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
fontSize: limitedSubHeaderFontSize,) fontSize: limitedSubHeaderFontSize,
), )),
) )
], ],
), ),
@ -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,
), ),
), ),
), ),

View File

@ -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),

View File

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

View File

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

View File

@ -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),
),
])),
], ],
), ),
); );

View File

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

View File

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

View File

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

View File

@ -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),
), ),
), ),
), ),
@ -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(() {

View File

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

View File

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

View File

@ -417,7 +417,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(
@ -475,7 +474,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,

View File

@ -129,7 +129,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(
@ -143,14 +142,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)),
)
),
) )
], ],
), ),
@ -248,12 +246,9 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
], ],
onTapCardItemAction: () async { onTapCardItemAction: () async {
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? ''; final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
final userUUID = final userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? ''; final cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final cliUUID = final cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
final cliName =
(await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
await showDialog( await showDialog(
useSafeArea: true, useSafeArea: true,

View File

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

View File

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

View File

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

View File

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

View File

@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
import 'package:hub/flutter_flow/nav/nav.dart'; import 'package:hub/flutter_flow/nav/nav.dart';
import 'package:hub/shared/helpers/base_storage.dart'; import 'package:hub/shared/helpers/base_storage.dart';
import 'package:hub/shared/helpers/storage_helper.dart'; import 'package:hub/shared/helpers/storage_helper.dart';
import 'package:hub/shared/utils/device_util.dart';
import 'package:hub/shared/utils/dialog_util.dart'; import 'package:hub/shared/utils/dialog_util.dart';
import '../../../backend/api_requests/api_calls.dart'; import '../../../backend/api_requests/api_calls.dart';
@ -222,7 +223,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 {
@ -279,8 +279,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;
} }
@ -308,9 +307,7 @@ class LocalizationService {
jsonBody['petAmountRegister'] != null && jsonBody['petAmountRegister'].toString().isEmpty jsonBody['petAmountRegister'] != null && jsonBody['petAmountRegister'].toString().isEmpty
? '0' ? '0'
: jsonBody['petAmountRegister'].toString(), : jsonBody['petAmountRegister'].toString(),
Storage.SQLiteStorage Storage.SQLiteStorage);
); await StorageHelper().set(SQLiteStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'], Storage.SQLiteStorage);
await StorageHelper()
.set(SQLiteStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'], Storage.SQLiteStorage);
} }
} }

View File

@ -2,42 +2,73 @@ import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart'; import 'package:device_info_plus/device_info_plus.dart';
import 'package:flutter/services.dart';
class DeviceUtil { class DeviceUtil {
static const MethodChannel _channel = MethodChannel("com.freaccess.hub/getAndroidId");
static Future<String?> getAndroidId() async {
try {
final String? androidId = await _channel.invokeMethod('getAndroidId');
return androidId;
} on PlatformException catch (e) {
print("Failed to get Android ID: '${e.message}'.");
return null;
}
}
static Future<String?> getDevUUID() async { static Future<String?> getDevUUID() async {
var deviceInfo = DeviceInfoPlugin(); var deviceInfo = DeviceInfoPlugin();
if (Platform.isIOS) { if (Platform.isIOS) {
// import 'dart:io'
var iosDeviceInfo = await deviceInfo.iosInfo; var iosDeviceInfo = await deviceInfo.iosInfo;
return iosDeviceInfo.identifierForVendor; // unique ID on iOS return iosDeviceInfo.identifierForVendor;
} else if (Platform.isAndroid) { } else if (Platform.isAndroid) {
var androidDeviceInfo = await deviceInfo.androidInfo; try {
return androidDeviceInfo.id; // unique ID on Android final String? secureAndroidId = await getAndroidId();
return secureAndroidId;
} catch (e) {
final build = await deviceInfo.androidInfo;
return build.id;
}
} }
return null; return null;
} }
static Future<String?> getSerialNumber() async { static Future<String?> getSerialNumber() async {
var deviceInfo = DeviceInfoPlugin(); var deviceInfo = DeviceInfoPlugin();
if (Platform.isIOS) { if (Platform.isIOS) {
// import 'dart:io' // import 'dart:io'
var iosDeviceInfo = await deviceInfo.iosInfo; var iosDeviceInfo = await deviceInfo.iosInfo;
return iosDeviceInfo.identifierForVendor; // unique ID on iOS return iosDeviceInfo.identifierForVendor; // unique ID on iOS
} else if (Platform.isAndroid) { } else if (Platform.isAndroid) {
var androidDeviceInfo = await deviceInfo.androidInfo; var androidDeviceInfo = await deviceInfo.androidInfo;
return androidDeviceInfo.serialNumber; // unique ID on Android return androidDeviceInfo.serialNumber; // unique ID on Android
} }
return null; return null;
} }
static Future<String?> getDeviceOSVersion() async { static Future<String?> getDeviceOSVersion() async {
var deviceInfo = DeviceInfoPlugin(); var deviceInfo = DeviceInfoPlugin();
if (Platform.isIOS) { if (Platform.isIOS) {
var iosDeviceInfo = await deviceInfo.iosInfo; var iosDeviceInfo = await deviceInfo.iosInfo;
return iosDeviceInfo.systemVersion; // unique ID on iOS. e.g. 14.5 return iosDeviceInfo.systemVersion; // unique ID on iOS. e.g. 14.5
} else if (Platform.isAndroid) { } else if (Platform.isAndroid) {
var androidDeviceInfo = await deviceInfo.androidInfo; var androidDeviceInfo = await deviceInfo.androidInfo;
return androidDeviceInfo.version.release; // unique ID on Android. e.g . 11 return androidDeviceInfo.version.release; // unique ID on Android. e.g . 11
} }
return null; return null;
} }
} }

View File

@ -1,7 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class LimitedFontSizeUtil { class LimitedFontSizeUtil {
static double getCalculateFontSize(BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) { static double getCalculateFontSize(
BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) {
final textScaler = MediaQuery.textScalerOf(context); final textScaler = MediaQuery.textScalerOf(context);
final double scaledFontSize = baseFontSize * textScaler.scale(1); final double scaledFontSize = baseFontSize * textScaler.scale(1);
return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize; return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize;
@ -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;
} }

View File

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