fix get secure android id
This commit is contained in:
parent
e36df19108
commit
fca35f919d
|
@ -1,7 +1,124 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.freaccess.hub">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
|
||||
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" />
|
||||
<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>
|
|
@ -1,118 +1,124 @@
|
|||
<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
|
||||
android:label="FRE ACCESS HUB"
|
||||
tools:replace="android:label"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:usesCleartextTraffic="true">
|
||||
package="com.freaccess.hub"
|
||||
|
||||
<activity
|
||||
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">
|
||||
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" />
|
||||
<uses-permission android:name="android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE" />
|
||||
|
||||
<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" />
|
||||
<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">
|
||||
|
||||
<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>
|
||||
<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" />
|
||||
|
||||
</activity>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.firebase.messaging.default_notification_icon"
|
||||
android:resource="@drawable/notification_icon" />
|
||||
<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>
|
||||
|
||||
<!-- 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" />
|
||||
<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>
|
||||
|
||||
<!-- <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> -->
|
||||
<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>
|
||||
|
||||
</application>
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
|
@ -1,5 +1,53 @@
|
|||
package com.freaccess.hub
|
||||
|
||||
import android.os.Bundle
|
||||
|
||||
import android.provider.Settings
|
||||
|
||||
import io.flutter.embedding.android.FlutterFragmentActivity
|
||||
|
||||
class MainActivity: FlutterFragmentActivity() {}
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
|
||||
class MainActivity: FlutterFragmentActivity() {
|
||||
|
||||
private val CHANNEL = "com.freaccess.hub/getAndroidId"
|
||||
|
||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||
|
||||
super.configureFlutterEngine(flutterEngine)
|
||||
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CHANNEL).setMethodCallHandler { call, result ->
|
||||
|
||||
if (call.method == "getAndroidId") {
|
||||
|
||||
val androidId = getAndroidId()
|
||||
|
||||
if (androidId != null) {
|
||||
|
||||
result.success(androidId)
|
||||
|
||||
} else {
|
||||
|
||||
result.error("UNAVAILABLE", "Android ID not available.", null)
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
result.notImplemented()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun getAndroidId(): String? {
|
||||
|
||||
return Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID)
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -14,8 +14,8 @@ void main() {
|
|||
|
||||
group('Initialization', () {
|
||||
group('Navigation', () {
|
||||
setUpAll(() async => await initializeApp().then(
|
||||
(_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||
setUpAll(() async => await initializeApp()
|
||||
.then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||
testWidgets('Test Welcome', (WidgetTester tester) async {
|
||||
widget = tester;
|
||||
await _testWelcome();
|
||||
|
@ -26,16 +26,16 @@ void main() {
|
|||
});
|
||||
group('Authentication', () {
|
||||
group('Sign in', () {
|
||||
setUpAll(() async => await initializeApp().then(
|
||||
(_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||
setUpAll(() async => await initializeApp()
|
||||
.then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||
testWidgets('Test Sign In', (WidgetTester tester) async {
|
||||
widget = tester;
|
||||
await _testSignIn();
|
||||
});
|
||||
});
|
||||
group('Sign up', () {
|
||||
setUpAll(() async => await initializeApp().then(
|
||||
(_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||
setUpAll(() async => await initializeApp()
|
||||
.then((_) async => StorageHelper().set(SecureStorageKey.isLogged.value, 'false', Storage.SecureStorage)));
|
||||
testWidgets('Test Sign Up', (WidgetTester tester) async {
|
||||
widget = tester;
|
||||
await _testSignUp();
|
||||
|
|
|
@ -61,10 +61,8 @@ class PhpGroup {
|
|||
class UnregisterDevice {
|
||||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
callName: 'unregisterDevice',
|
||||
|
@ -91,12 +89,9 @@ class UnregisterDevice {
|
|||
class DeletePet {
|
||||
Future<ApiCallResponse> call({final int? petID = 0}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'excluirPet';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -139,12 +134,9 @@ class UpdatePet {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'atualizarPet';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -188,12 +180,9 @@ class GetPets {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'consultaPets';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -225,12 +214,9 @@ class GetPetPhoto {
|
|||
Future<ApiCallResponse> call({final int? petId}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'consultaFotoPet';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -271,12 +257,9 @@ class RegisterPet {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'cadastrarPet';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -319,12 +302,9 @@ class BuscaEnconcomendas {
|
|||
final String? adresseeType,
|
||||
final String? status,
|
||||
}) async {
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getEncomendas';
|
||||
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
@ -366,12 +346,9 @@ class CancelaVisita {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'cancelaVisita';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -403,10 +380,8 @@ class CancelaVisita {
|
|||
|
||||
class DeleteAccount {
|
||||
Future<ApiCallResponse> call() async {
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -437,12 +412,9 @@ class ChangePanic {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'updVisitado';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -476,12 +448,9 @@ class ChangePass {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'updVisitado';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -515,12 +484,9 @@ class RespondeVinculo {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
callName: 'respondeVinculo',
|
||||
|
@ -552,12 +518,9 @@ class ChangeNotifica {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'updVisitado';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -589,14 +552,10 @@ class UpdateIDE {
|
|||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String newIde =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String newIde = (await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'updVisitado';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -628,10 +587,8 @@ class UpdToken {
|
|||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String token = (await StorageHelper().get(SecureStorageKey.token.value, Storage.SecureStorage)) ?? '';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -659,23 +616,20 @@ class UpdToken {
|
|||
class LoginCall {
|
||||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String email = (await StorageHelper().get(SecureStorageKey.email.value, Storage.SecureStorage)) ?? '';
|
||||
final String password =
|
||||
(await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
|
||||
final String type =
|
||||
(await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
|
||||
final String password = (await StorageHelper().get(SecureStorageKey.password.value, Storage.SecureStorage)) ?? '';
|
||||
final String type = (await StorageHelper().get(SecureStorageKey.deviceType.value, Storage.SecureStorage)) ?? '';
|
||||
final String description =
|
||||
(await StorageHelper().get(SecureStorageKey.deviceDescription.value, Storage.SecureStorage)) ?? '';
|
||||
late final String token;
|
||||
try {
|
||||
token = await FirebaseMessagingService.getToken();
|
||||
if(token == null || token.isEmpty) throw Exception('Token is empty'); }
|
||||
catch (e, s) {
|
||||
if (token == null || token.isEmpty) throw Exception('Token is empty');
|
||||
} catch (e, s) {
|
||||
token = '';
|
||||
log('Error getting token', error: e, stackTrace: s);
|
||||
LogUtil.requestAPIFailed('login.php', email, "Login", e, s);
|
||||
LogUtil.requestAPIFailed('login.php', email, "Login", e, s);
|
||||
}
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -750,12 +704,9 @@ class ChangePasswordCall {
|
|||
required final String psswd,
|
||||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
callName: 'changePassword',
|
||||
|
@ -854,12 +805,9 @@ class PostScheduleVisitorCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'putVisitante';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -912,12 +860,9 @@ class PostScheduleVisitCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'putVisita';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -969,12 +914,9 @@ class GetScheduleVisitCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getVisitas';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -1246,12 +1188,9 @@ class GetDadosCall {
|
|||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getDados';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -1482,12 +1421,9 @@ class GetVisitorByDocCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getVisitante';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -1539,12 +1475,9 @@ class GetFotoVisitanteCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getFotoVisitante';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -1581,12 +1514,9 @@ class PostProvVisitSchedulingCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'putAgendamentoProv';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -1633,12 +1563,9 @@ class GetVisitsCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getVisitas';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -1899,12 +1826,9 @@ class DeleteVisitCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'cancelaVisita';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -1945,14 +1869,10 @@ class GetPessoasLocalCall {
|
|||
Future<ApiCallResponse> call() async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String ownerUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String ownerUUID = (await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
callName: 'getPessoasLocal',
|
||||
|
@ -2015,12 +1935,9 @@ class RespondeSolicitacaoCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'respondeSolicitacao';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -2068,12 +1985,9 @@ class GetAccessCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getAcessos';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
@ -2320,10 +2234,8 @@ class GetLiberationsCall {
|
|||
final StreamController<ApiCallResponse> controller = StreamController();
|
||||
|
||||
Future.microtask(() async {
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getSolicitacoes';
|
||||
|
@ -2515,12 +2427,9 @@ class GetMessagesCall {
|
|||
}) async {
|
||||
final String baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
final String devUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
const String atividade = 'getMensagens';
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
|
|
|
@ -271,8 +271,7 @@ class NotificationService {
|
|||
|
||||
await AwesomeNotifications().isNotificationAllowed().then((isAllowed) async {
|
||||
final bool requestOSnotification =
|
||||
(await StorageHelper().get(SQLiteStorageKey.requestOSNotification.value, Storage.SQLiteStorage)) ==
|
||||
'true';
|
||||
(await StorageHelper().get(SQLiteStorageKey.requestOSNotification.value, Storage.SQLiteStorage)) == 'true';
|
||||
|
||||
if (requestOSnotification == false) {
|
||||
if (isAllowed == false) {
|
||||
|
|
|
@ -44,9 +44,13 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
|||
onTap: _isProcessing
|
||||
? null
|
||||
: () async {
|
||||
setState(() { _isProcessing = true; });
|
||||
setState(() {
|
||||
_isProcessing = true;
|
||||
});
|
||||
await widget.action.call();
|
||||
setState(() { _isProcessing = false; });
|
||||
setState(() {
|
||||
_isProcessing = false;
|
||||
});
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
||||
|
|
|
@ -39,9 +39,13 @@ class _MenuCardItemState extends State<MenuCardItem> {
|
|||
onTap: _isProcessing
|
||||
? null
|
||||
: () async {
|
||||
setState(() { _isProcessing = true; });
|
||||
setState(() {
|
||||
_isProcessing = true;
|
||||
});
|
||||
await widget.action.call();
|
||||
setState(() { _isProcessing = false; });
|
||||
setState(() {
|
||||
_isProcessing = false;
|
||||
});
|
||||
},
|
||||
child: Card(
|
||||
elevation: 0,
|
||||
|
|
|
@ -99,7 +99,7 @@ class _CustomInputUtilState extends State<CustomInputUtil> {
|
|||
helperStyle: TextStyle(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: limitedInputTextSize,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
|
|
|
@ -41,8 +41,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0, 0.0, 0, 10.0),
|
||||
|
@ -110,13 +109,12 @@ class _CustomSelectState extends State<CustomSelect> {
|
|||
ptText: 'Este campo é obrigatório',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||
fontSize: limitedInputFontSize
|
||||
)),
|
||||
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||
fontSize: limitedInputFontSize)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -38,8 +38,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
|||
|
||||
return Builder(
|
||||
builder: (context) {
|
||||
if (widget.uploadedFiles != null &&
|
||||
widget.uploadedFiles!.bytes!.isNotEmpty) {
|
||||
if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) {
|
||||
{
|
||||
return InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
|
@ -49,8 +48,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
|||
onTap: () async {
|
||||
setState(() {
|
||||
widget.isUploading = false;
|
||||
widget.uploadedFiles =
|
||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||
widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||
widget.onUploadComplete(widget.uploadedFiles!);
|
||||
});
|
||||
},
|
||||
|
@ -70,133 +68,117 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
|||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
final selectedMedia = await selectMediaWithSourceBottomSheet(
|
||||
context: context,
|
||||
imageQuality: 100,
|
||||
allowPhoto: true,
|
||||
includeDimensions: true,
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
final selectedMedia = await selectMediaWithSourceBottomSheet(
|
||||
context: context,
|
||||
imageQuality: 100,
|
||||
allowPhoto: true,
|
||||
includeDimensions: true,
|
||||
);
|
||||
if (selectedMedia != null) {
|
||||
setState(() => widget.isUploading = true);
|
||||
var selectedUploadedFiles = <FFUploadedFile>[];
|
||||
|
||||
try {
|
||||
final message = FFLocalizations.of(context)
|
||||
.getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...');
|
||||
showUploadMessage(
|
||||
context,
|
||||
message,
|
||||
showLoading: true,
|
||||
);
|
||||
if (selectedMedia != null) {
|
||||
setState(() => widget.isUploading = true);
|
||||
var selectedUploadedFiles = <FFUploadedFile>[];
|
||||
|
||||
try {
|
||||
final message = FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'Uploading file...',
|
||||
ptText: 'Enviando arquivo...');
|
||||
showUploadMessage(
|
||||
context,
|
||||
message,
|
||||
showLoading: true,
|
||||
);
|
||||
selectedUploadedFiles = selectedMedia
|
||||
.map((m) => FFUploadedFile(
|
||||
name: m.storagePath.split('/').last,
|
||||
bytes: m.bytes,
|
||||
height: m.dimensions?.height,
|
||||
width: m.dimensions?.width,
|
||||
// blurHash: m.blurHash,
|
||||
))
|
||||
.toList();
|
||||
} finally {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
widget.isUploading = false;
|
||||
}
|
||||
if (selectedUploadedFiles.length ==
|
||||
selectedMedia.length) {
|
||||
setState(() {
|
||||
widget.uploadedFiles = selectedUploadedFiles.first;
|
||||
});
|
||||
widget.onUploadComplete(widget.uploadedFiles!);
|
||||
final message = FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'Success!', ptText: 'Sucesso!');
|
||||
showUploadMessage(context, message);
|
||||
} else {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
final message = FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
enText: 'Failed to upload data',
|
||||
ptText: 'Falha ao enviar dados');
|
||||
showUploadMessage(context, message);
|
||||
return;
|
||||
} }else{
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
height: 120,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_isLoading
|
||||
? SizedBox(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
child: CircularProgressIndicator(
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<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),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
selectedUploadedFiles = selectedMedia
|
||||
.map((m) => FFUploadedFile(
|
||||
name: m.storagePath.split('/').last,
|
||||
bytes: m.bytes,
|
||||
height: m.dimensions?.height,
|
||||
width: m.dimensions?.width,
|
||||
// blurHash: m.blurHash,
|
||||
))
|
||||
.toList();
|
||||
} finally {
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
widget.isUploading = false;
|
||||
}
|
||||
if (selectedUploadedFiles.length == selectedMedia.length) {
|
||||
setState(() {
|
||||
widget.uploadedFiles = selectedUploadedFiles.first;
|
||||
});
|
||||
widget.onUploadComplete(widget.uploadedFiles!);
|
||||
final message =
|
||||
FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!');
|
||||
showUploadMessage(context, message);
|
||||
} else {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
final message = FFLocalizations.of(context)
|
||||
.getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados');
|
||||
showUploadMessage(context, message);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.8,
|
||||
height: 120,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_isLoading
|
||||
? SizedBox(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
child: CircularProgressIndicator(
|
||||
valueColor: AlwaysStoppedAnimation<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),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -11,4 +11,4 @@ abstract class MenuEntry extends StatefulWidget {
|
|||
final Function() action;
|
||||
final String title;
|
||||
final IconData icon;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,8 +78,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
context.pop(filterResult);
|
||||
}
|
||||
|
||||
Widget _buildCheckboxListTile(
|
||||
String key, List<Map<String, String>> options, double fontsize) {
|
||||
Widget _buildCheckboxListTile(String key, List<Map<String, String>> options, double fontsize) {
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
return Column(
|
||||
children: [
|
||||
|
@ -169,7 +168,6 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
|
||||
|
||||
return Center(
|
||||
child: Container(
|
||||
width: screenWidth - (screenWidth * 0.35),
|
||||
|
@ -193,8 +191,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(
|
||||
context),
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts:
|
||||
|
@ -223,15 +220,16 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
)),
|
||||
child: Text(FFLocalizations.of(context).getText('88kshkph'),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -29,13 +29,11 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
late Map<String, dynamic> selected;
|
||||
final List<Map<String, String>> adresseeTypeOptions = [
|
||||
{
|
||||
'title':
|
||||
FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Resident', ptText: 'Morador'),
|
||||
'title': FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Resident', ptText: 'Morador'),
|
||||
'value': 'MOR'
|
||||
},
|
||||
{
|
||||
'title': FFLocalizations.of(StorageHelper().context!)
|
||||
.getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
||||
'title': FFLocalizations.of(StorageHelper().context!).getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
||||
'value': 'PRO'
|
||||
},
|
||||
];
|
||||
|
@ -46,8 +44,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
'value': 'notPickedUp'
|
||||
},
|
||||
{
|
||||
'title':
|
||||
FFLocalizations.of(StorageHelper().context!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
|
||||
'title': FFLocalizations.of(StorageHelper().context!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
|
||||
'value': 'pickedUp'
|
||||
},
|
||||
];
|
||||
|
@ -213,8 +210,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_buildCheckboxListTile(
|
||||
'adresseeType', adresseeTypeOptions, limitedBodyFontSize),
|
||||
_buildCheckboxListTile('adresseeType', adresseeTypeOptions, limitedBodyFontSize),
|
||||
_buildCheckboxListTile('status', statusOptions, limitedBodyFontSize),
|
||||
],
|
||||
),
|
||||
|
@ -227,7 +223,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
|||
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
child: Text(FFLocalizations.of(context).getText('88kshkph'), style: TextStyle(fontSize: limitedBodyFontSize)),
|
||||
child: Text(FFLocalizations.of(context).getText('88kshkph'),
|
||||
style: TextStyle(fontSize: limitedBodyFontSize)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -92,76 +92,80 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with Ticker
|
|||
|
||||
super.dispose();
|
||||
}
|
||||
@override Widget build(BuildContext context) {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
return InkWell(
|
||||
key: const ValueKey('ThrowExceptionWidget'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pop();
|
||||
},
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 20.0),
|
||||
Stack(
|
||||
children: <Widget>[
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Icon(
|
||||
_getIconByType(context),
|
||||
color: _getColorByType(context),
|
||||
size: 150.0,
|
||||
return InkWell(
|
||||
key: const ValueKey('ThrowExceptionWidget'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.pop();
|
||||
},
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: BorderRadius.circular(20.0), // Ajuste o valor conforme necessário
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 20.0),
|
||||
Stack(
|
||||
children: <Widget>[
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Icon(
|
||||
_getIconByType(context),
|
||||
color: _getColorByType(context),
|
||||
size: 150.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
|
||||
const SizedBox(height: 20.0),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
_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,
|
||||
],
|
||||
).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
|
||||
const SizedBox(height: 20.0),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
_getTitleByType(context),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
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(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,8 +53,14 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data.",),
|
||||
style: TextStyle(color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context),),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Não há mais dados.",
|
||||
enText: "No more data.",
|
||||
),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
),
|
||||
),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -100,8 +106,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
|
||||
await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage);
|
||||
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage);
|
||||
await StorageHelper()
|
||||
.set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
|
||||
await StorageHelper().set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
|
||||
|
||||
context.pop();
|
||||
return response;
|
||||
|
@ -192,8 +197,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLink
|
|||
if (local['CLU_STATUS'] == 'A') {
|
||||
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, local['CLI_ID'], Storage.SQLiteStorage);
|
||||
await StorageHelper().set(SQLiteStorageKey.clientName.value, local['CLI_NOME'], Storage.SQLiteStorage);
|
||||
await StorageHelper()
|
||||
.set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
|
||||
await StorageHelper().set(SQLiteStorageKey.ownerUUID.value, local['CLU_OWNER_ID'], Storage.SQLiteStorage);
|
||||
|
||||
context.pop();
|
||||
} else if (local['CLU_STATUS'] == 'B') {
|
||||
|
|
|
@ -90,8 +90,8 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
|||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await LocalizationService.selectLocal(context).then(
|
||||
(value) => value == true ? onUpdate() : null);
|
||||
await LocalizationService.selectLocal(context)
|
||||
.then((value) => value == true ? onUpdate() : null);
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(200.0),
|
||||
|
@ -143,8 +143,7 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
|||
fontSize: limitedFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -52,7 +52,11 @@ class _MenuStaggeredViewComponentWidgetState extends State<MenuStaggeredViewComp
|
|||
Widget build(BuildContext context) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = 14 * textScaler.scale(1);
|
||||
final int crossAxisCount = scaledFontSize >= 26 ? 1 : scaledFontSize >= 18 ? 2 : 3;
|
||||
final int crossAxisCount = scaledFontSize >= 26
|
||||
? 1
|
||||
: scaledFontSize >= 18
|
||||
? 2
|
||||
: 3;
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
|
|
|
@ -8,7 +8,6 @@ import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
|||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||
|
||||
|
||||
class DetailsComponentWidget extends StatefulWidget {
|
||||
const DetailsComponentWidget({
|
||||
Key? key,
|
||||
|
@ -176,7 +175,6 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
return TextFormField(
|
||||
readOnly: true,
|
||||
initialValue: '$value',
|
||||
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
|
@ -186,9 +184,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
|
||||
decoration: InputDecoration(
|
||||
|
||||
labelText: key,
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -205,14 +201,9 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
|
|
|
@ -83,8 +83,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 16.0, 8.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
key: const ValueKey<String>('BackButton'),
|
||||
splashColor: Colors.transparent,
|
||||
|
@ -98,8 +97,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
|
@ -107,20 +105,16 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
12.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -129,36 +123,30 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||
FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Outfit'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 4.0, 16.0, 4.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'wu2f7yzo' /* Não se preucupe nós vamos te a... */),
|
||||
FFLocalizations.of(context).getText('wu2f7yzo' /* Não se preucupe nós vamos te a... */),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -166,8 +154,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
key: _model.formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 12.0, 16.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
|
@ -184,18 +171,15 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.black,
|
||||
|
@ -224,8 +208,7 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 24.0, 20.0, 24.0),
|
||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
||||
suffixIcon: Icon(
|
||||
Icons.email,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -238,14 +221,12 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
validator: _model.emailAddressTextControllerValidator
|
||||
.asValidator(context),
|
||||
validator: _model.emailAddressTextControllerValidator.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -253,45 +234,37 @@ class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTe
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 24.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('SendButtonWidget'),
|
||||
onPressed: (_model.emailAddressTextController.text ==
|
||||
'' ||
|
||||
!ValidatorUtil.isValidEmail(
|
||||
_model.emailAddressTextController.text))
|
||||
onPressed: (_model.emailAddressTextController.text == '' ||
|
||||
!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
|
||||
? null
|
||||
: () async => AuthenticationService.forgotPassword(
|
||||
context, _model.emailAddressTextController.text),
|
||||
: () async =>
|
||||
AuthenticationService.forgotPassword(context, _model.emailAddressTextController.text),
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'74rnd5bu' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
disabledColor:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
),
|
||||
showLoadingIndicator: true,
|
||||
|
|
|
@ -70,11 +70,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
FFLocalizations.of(context).getText('uj8acuab'),
|
||||
textAlign: TextAlign.start,
|
||||
overflow: TextOverflow.clip,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
@ -103,9 +100,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
|
@ -154,29 +149,18 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
model.cliName,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(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,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
),
|
||||
),
|
||||
|
@ -242,7 +224,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
@ -250,8 +232,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -290,14 +271,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: null,
|
||||
|
@ -339,8 +315,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -380,8 +355,7 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: model.dateTimeTextControllerValidator.asValidator(context),
|
||||
|
@ -524,7 +498,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
child: TextFormField(
|
||||
controller: model.notesTextController,
|
||||
focusNode: model.notesFocusNode,
|
||||
|
||||
autofocus: false,
|
||||
showCursor: true,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -532,43 +505,20 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
counterStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyText1
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyText1Family,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
labelText:
|
||||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
counterStyle: FlutterFlowTheme.of(context).bodyText1.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyText1Family,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'cw8b3tbb' /* Observação da Visita */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
labelStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
|
@ -619,7 +569,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 3,
|
||||
|
@ -685,12 +634,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
showLoadingIndicator: true,
|
||||
text: FFLocalizations.of(context).getText('bv5fg9sv'),
|
||||
options: FFButtonOptions(
|
||||
|
||||
height: 30.0 * MediaQuery.textScalerOf(context).scale(1),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
|
@ -700,7 +646,6 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
|||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
|
|
|
@ -51,7 +51,6 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
|
@ -84,8 +83,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
|
@ -98,8 +96,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
|
@ -107,20 +104,17 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
12.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style:
|
||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 16, 16, 14),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -128,8 +122,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
||||
|
@ -145,8 +138,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
||||
|
@ -157,8 +149,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 14, 14, 12),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -166,8 +157,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
key: _model.formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.keyTextFieldTextController,
|
||||
focusNode: _model.keyTextFieldFocusNode,
|
||||
|
@ -186,30 +176,25 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
labelText: FFLocalizations.of(context).getText(
|
||||
'rfqrdet7' /* Senha */,
|
||||
),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'zz1haydj' /* digite a sua senha..... */,
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
|
@ -276,12 +261,10 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 15),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
if (_model.formKey.currentState == null ||
|
||||
!_model.formKey.currentState!.validate()) {
|
||||
if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
await widget.toggleActionStatus?.call(
|
||||
|
@ -295,10 +278,8 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: const Color(0xFF1AAB5F),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
|
@ -306,8 +287,7 @@ class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemp
|
|||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
|
|
|
@ -63,7 +63,7 @@ class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVi
|
|||
enText: 'This field is required',
|
||||
ptText: 'Este campo é obrigatório',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,6 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
|
@ -144,8 +143,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 15.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 15.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'zazj5d8b' /* Preencha o formulário com os d... */,
|
||||
|
@ -188,18 +186,15 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
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(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
|
@ -241,9 +236,9 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
onChanged: (value) {
|
||||
_model.debounce(() async {
|
||||
|
@ -313,7 +308,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
|
@ -321,7 +316,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -437,7 +432,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
)),
|
||||
),
|
||||
],
|
||||
|
@ -472,22 +467,20 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
),
|
||||
);
|
||||
} else {
|
||||
return Stack(
|
||||
children: [
|
||||
MediaUploadButtonUtil(
|
||||
onUploadComplete: (uploadedFile) {
|
||||
setState(() {
|
||||
_model.uploadedLocalFile = uploadedFile;
|
||||
});
|
||||
},
|
||||
isUploading: _model.isDataUploading,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'p4ftwxcy' /* Selecione uma foto */,
|
||||
return Stack(children: [
|
||||
MediaUploadButtonUtil(
|
||||
onUploadComplete: (uploadedFile) {
|
||||
setState(() {
|
||||
_model.uploadedLocalFile = uploadedFile;
|
||||
});
|
||||
},
|
||||
isUploading: _model.isDataUploading,
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'p4ftwxcy' /* Selecione uma foto */,
|
||||
),
|
||||
uploadedFiles: _model.uploadedLocalFile,
|
||||
),
|
||||
uploadedFiles: _model.uploadedLocalFile,
|
||||
),
|
||||
]
|
||||
);
|
||||
]);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
@ -630,7 +623,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
|
@ -718,11 +711,10 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visitante cadastrado com sucesso.',
|
||||
enText: 'Visitor successfully registered.'),
|
||||
style: TextStyle(color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: limitedInputFontSize,
|
||||
)
|
||||
),
|
||||
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: limitedInputFontSize,
|
||||
)),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
duration: const Duration(seconds: 3),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
|
@ -769,7 +761,7 @@ class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistor
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -19,15 +19,13 @@ import 'sign_up_template_component_model.dart';
|
|||
export 'sign_up_template_component_model.dart';
|
||||
|
||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||
const SignUpTemplateComponentWidget(
|
||||
{super.key, required this.toggleSignInPage});
|
||||
const SignUpTemplateComponentWidget({super.key, required this.toggleSignInPage});
|
||||
final Future Function()? toggleSignInPage;
|
||||
@override
|
||||
State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _SignUpTemplateComponentWidgetState
|
||||
extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
late SignUpTemplateComponentModel _model;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
late String _deviceType;
|
||||
|
@ -160,17 +158,13 @@ class _SignUpTemplateComponentWidgetState
|
|||
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -271,18 +265,13 @@ class _SignUpTemplateComponentWidgetState
|
|||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.25,
|
||||
|
@ -363,18 +352,13 @@ class _SignUpTemplateComponentWidgetState
|
|||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 0.25,
|
||||
|
@ -456,22 +440,15 @@ class _SignUpTemplateComponentWidgetState
|
|||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
errorStyle: TextStyle(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
fontSize: limitedInputFontSize,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.normal,
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color:
|
||||
Color(0xFFFF5963),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
width: 0.25,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
|
@ -479,9 +456,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
suffixIcon: InkWell(
|
||||
key: const ValueKey<
|
||||
String>(
|
||||
'passwordVisibilitySuffixIcon'),
|
||||
key: const ValueKey<String>('passwordVisibilitySuffixIcon'),
|
||||
onTap: () => setState(
|
||||
() => _model.passwordRegisterFormVisibility =
|
||||
!_model.passwordRegisterFormVisibility,
|
||||
|
@ -516,8 +491,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>(
|
||||
'SubmitButtonWidget'),
|
||||
key: const ValueKey<String>('SubmitButtonWidget'),
|
||||
onPressed: isFormInvalid()
|
||||
? null
|
||||
: () async {
|
||||
|
@ -531,17 +505,12 @@ class _SignUpTemplateComponentWidgetState
|
|||
);
|
||||
shouldSetState = true;
|
||||
if (_model.register == true)
|
||||
|
||||
await widget
|
||||
.toggleSignInPage
|
||||
?.call();
|
||||
await widget.toggleSignInPage?.call();
|
||||
else {
|
||||
if (shouldSetState)
|
||||
setState(() {});
|
||||
if (shouldSetState) setState(() {});
|
||||
return;
|
||||
}
|
||||
if (shouldSetState)
|
||||
setState(() {});
|
||||
if (shouldSetState) setState(() {});
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'rnvdwzei' /* Cadastrar-se */,
|
||||
|
@ -577,15 +546,12 @@ class _SignUpTemplateComponentWidgetState
|
|||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||
child: InkWell(
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async => await widget
|
||||
.toggleSignInPage
|
||||
?.call(),
|
||||
onTap: () async => await widget.toggleSignInPage?.call(),
|
||||
child: RichText(
|
||||
textScaler: MediaQuery.of(context).textScaler,
|
||||
text: TextSpan(
|
||||
|
|
|
@ -46,4 +46,4 @@ class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel<VisitorS
|
|||
textFieldFocusNode?.dispose();
|
||||
textController?.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,9 +75,9 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
Column(children: [
|
||||
|
||||
],),
|
||||
Column(
|
||||
children: [],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
||||
child: TextFormField(
|
||||
|
@ -165,7 +165,7 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
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(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyLargeFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyLargeFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -312,17 +312,14 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.4,
|
||||
height: 40,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
elevation: 3.0,
|
||||
|
@ -373,8 +370,7 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
.getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'),
|
||||
gravity: ToastGravity.TOP,
|
||||
backgroundColor: Colors.red,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context)
|
||||
);
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context));
|
||||
}
|
||||
} else {
|
||||
await showAdaptiveDialog(
|
||||
|
@ -392,4 +388,4 @@ class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearc
|
|||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,9 +26,7 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
|
|||
State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _WelcomeTemplateComponentWidgetState
|
||||
extends State<WelcomeTemplateComponentWidget>
|
||||
with TickerProviderStateMixin {
|
||||
class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
late WelcomeTemplateComponentModel _model;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
|
@ -89,7 +87,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
||||
|
@ -106,8 +104,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context)
|
||||
.getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||
FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
|
@ -115,15 +112,13 @@ class _WelcomeTemplateComponentWidgetState
|
|||
fontSize: limitedHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||
FFLocalizations.of(context).getText('5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
|
@ -131,8 +126,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
fontSize: limitedSubHeaderFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -147,8 +141,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
decoration: const BoxDecoration(),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: const AtomImageSvgTheme(
|
||||
filename: 'welcome', width: 600, height: double.infinity),
|
||||
child: const AtomImageSvgTheme(filename: 'welcome', width: 600, height: double.infinity),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -182,20 +175,14 @@ class _WelcomeTemplateComponentWidgetState
|
|||
children: [
|
||||
Builder(
|
||||
builder: (context) {
|
||||
if (MediaQuery.sizeOf(context).width <
|
||||
kBreakpointSmall
|
||||
? true
|
||||
: false) {
|
||||
if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignInPage?.call();
|
||||
},
|
||||
|
@ -203,17 +190,10 @@ class _WelcomeTemplateComponentWidgetState
|
|||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: limitedInputFontSize,
|
||||
|
@ -254,7 +234,6 @@ class _WelcomeTemplateComponentWidgetState
|
|||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
|
@ -277,11 +256,9 @@ class _WelcomeTemplateComponentWidgetState
|
|||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignInPage
|
||||
?.call();
|
||||
await widget.toggleSignInPage?.call();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'zvtay8ee' /* Entrar */,
|
||||
|
@ -315,8 +292,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignUpPage'),
|
||||
key: const ValueKey<String>('toggleSignUpPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignUpPage?.call();
|
||||
},
|
||||
|
|
|
@ -539,8 +539,7 @@ void showSnackbar(
|
|||
);
|
||||
}
|
||||
|
||||
void showAlertDialog(BuildContext context, String title, String content,
|
||||
Future<void> Function() action) {
|
||||
void showAlertDialog(BuildContext context, String title, String content, Future<void> Function() action) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
double limitedInputFontSize = LimitedFontSizeUtil.getInputFontSize(context);
|
||||
|
@ -550,10 +549,13 @@ void showAlertDialog(BuildContext context, String title, String content,
|
|||
builder: (context) {
|
||||
return AlertDialog(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
title: Text(title, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize), textAlign: TextAlign.center),
|
||||
title: Text(title,
|
||||
style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedHeaderFontSize),
|
||||
textAlign: TextAlign.center),
|
||||
content: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(content, style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize)),
|
||||
child: Text(content,
|
||||
style: TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedBodyFontSize)),
|
||||
),
|
||||
actions: [
|
||||
Row(
|
||||
|
@ -566,10 +568,8 @@ void showAlertDialog(BuildContext context, String title, String content,
|
|||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: 50,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize
|
||||
),
|
||||
textStyle:
|
||||
TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedInputFontSize),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
width: 1,
|
||||
|
@ -592,10 +592,8 @@ void showAlertDialog(BuildContext context, String title, String content,
|
|||
height: 50,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
textStyle: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedInputFontSize
|
||||
),
|
||||
textStyle:
|
||||
TextStyle(color: FlutterFlowTheme.of(context).primaryText, fontSize: limitedInputFontSize),
|
||||
splashColor: const Color.fromARGB(255, 129, 129, 129),
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
|
|
@ -99,7 +99,6 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
|||
textAlign: widget.options.textAlign,
|
||||
maxLines: maxLines,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
);
|
||||
|
||||
final onPressed = widget.onPressed != null
|
||||
|
|
|
@ -80,10 +80,16 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
|
|||
builder: (context, _) {
|
||||
return FutureBuilder<Widget>(
|
||||
future: () async {
|
||||
final bool isLogged = await StorageHelper().get(SecureStorageKey.isLogged.value, Storage.SecureStorage) == 'true';
|
||||
final bool haveLocal = await StorageHelper().get(SecureStorageKey.haveLocal.value, Storage.SecureStorage) == 'true';
|
||||
final bool haveUserUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage))?.isNotEmpty ?? false;
|
||||
final bool haveDevUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage))?.isNotEmpty ?? false;
|
||||
final bool isLogged =
|
||||
await StorageHelper().get(SecureStorageKey.isLogged.value, Storage.SecureStorage) == 'true';
|
||||
final bool haveLocal =
|
||||
await StorageHelper().get(SecureStorageKey.haveLocal.value, Storage.SecureStorage) == 'true';
|
||||
final bool haveUserUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage))?.isNotEmpty ??
|
||||
false;
|
||||
final bool haveDevUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage))?.isNotEmpty ??
|
||||
false;
|
||||
|
||||
if (isLogged && haveDevUUID && haveUserUUID) {
|
||||
return haveLocal ? const HomePageWidget() : const ReceptionPageWidget();
|
||||
|
|
|
@ -558,11 +558,11 @@ void showUploadMessage(
|
|||
: null,
|
||||
),
|
||||
),
|
||||
|
||||
Text(
|
||||
message, style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context), )),
|
||||
Text(message,
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
)),
|
||||
],
|
||||
),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
|
|
@ -49,9 +49,11 @@ Future<void> initializeApp() async {
|
|||
Future<void> _initializeTracking() async {
|
||||
await AppTrackingTransparency.requestTrackingAuthorization();
|
||||
}
|
||||
|
||||
Future<void> _initializeFirebase() async {
|
||||
await Firebase.initializeApp();
|
||||
}
|
||||
|
||||
Future<void> _initializeNotificationService() async {
|
||||
await NotificationService.initialize();
|
||||
}
|
||||
|
@ -59,6 +61,7 @@ Future<void> _initializeNotificationService() async {
|
|||
void _initializeUrlStrategy() {
|
||||
setUrlStrategy(PathUrlStrategy());
|
||||
}
|
||||
|
||||
void _initializeSystemSettings() {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
if (kDebugMode) {
|
||||
|
@ -77,6 +80,7 @@ Future<void> _initializeFlutterFlow() async {
|
|||
GoRouter.optionURLReflectsImperativeAPIs = true;
|
||||
usePathUrlStrategy();
|
||||
}
|
||||
|
||||
Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
|
||||
if (message.data['click_action'] == 'enroll_cond') {
|
||||
await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage);
|
||||
|
@ -90,6 +94,7 @@ Future<void> _foregroundHandlerMessage(RemoteMessage message) async {
|
|||
payload: Map<String, String>.from(message.data));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _backgroundHandlerMessage(RemoteMessage message) async {
|
||||
if (message.data['click_action'] == 'enroll_cond') {
|
||||
await StorageHelper().set(SecureStorageKey.haveLocal.value, 'true', Storage.SecureStorage);
|
||||
|
@ -105,6 +110,7 @@ class App extends StatefulWidget {
|
|||
|
||||
static _AppState of(BuildContext context) => context.findAncestorStateOfType<_AppState>()!;
|
||||
}
|
||||
|
||||
class _AppState extends State<App> with WidgetsBindingObserver {
|
||||
Locale? _locale = FFLocalizations.getStoredLocale();
|
||||
ThemeMode _themeMode = FlutterFlowTheme.themeMode;
|
||||
|
@ -253,7 +259,6 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
|||
super.initState();
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
||||
|
||||
FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
|
||||
_appStateNotifier = AppStateNotifier.instance;
|
||||
_router = createRouter(_appStateNotifier);
|
||||
|
@ -273,7 +278,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
|||
|
||||
@override
|
||||
void didChangeAppLifecycleState(AppLifecycleState state) async {
|
||||
if(state == AppLifecycleState.detached) {
|
||||
if (state == AppLifecycleState.detached) {
|
||||
await LocalizationService.processLocals(context);
|
||||
FirebaseMessagingService().updateDeviceToken();
|
||||
}
|
||||
|
@ -295,4 +300,3 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,10 @@ class _AccessHistoryState extends State<AccessHistoryScreen> {
|
|||
SnackBar(
|
||||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
style: TextStyle(color: Colors.white, fontSize: LimitedFontSizeUtil.getBodyFontSize(context),),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
),
|
||||
),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
|
|
|
@ -24,14 +24,10 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
|||
|
||||
Future<Map<String, String>> initVariables() async {
|
||||
final email = (await StorageHelper().get(hub.SecureStorageKey.email.value, hub.Storage.SecureStorage)) ?? '';
|
||||
final name =
|
||||
(await StorageHelper().get(hub.SQLiteStorageKey.userName.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final devUUID =
|
||||
(await StorageHelper().get(hub.SQLiteStorageKey.devUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final userUUID =
|
||||
(await StorageHelper().get(hub.SQLiteStorageKey.userUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final cliUUID =
|
||||
(await StorageHelper().get(hub.SQLiteStorageKey.clientUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final name = (await StorageHelper().get(hub.SQLiteStorageKey.userName.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final devUUID = (await StorageHelper().get(hub.SQLiteStorageKey.devUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final userUUID = (await StorageHelper().get(hub.SQLiteStorageKey.userUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final cliUUID = (await StorageHelper().get(hub.SQLiteStorageKey.clientUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
const createdAt = '0000-00-00 00:00:00';
|
||||
final url = 'https://hub.freaccess.com.br/hub/fast-pass/$cliUUID';
|
||||
final freUserData =
|
||||
|
|
|
@ -20,7 +20,7 @@ class HomePageWidget extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _HomePageWidgetState extends State<HomePageWidget> {
|
||||
late HomePageModel _model;
|
||||
late HomePageModel _model;
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
late LocalProfileComponentWidget _localProfileComponentWidget;
|
||||
|
@ -42,13 +42,10 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
_model = createModel(context, () => HomePageModel());
|
||||
_model.updateOnChange = true;
|
||||
|
||||
|
||||
|
||||
_model.textController ??= TextEditingController();
|
||||
_model.textFieldFocusNode ??= FocusNode();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
StorageHelper().context = context;
|
||||
|
@ -137,7 +134,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget buildBody() {
|
||||
return Container(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
|
|
@ -226,13 +226,13 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Nenhuma mensagem encontrada!",
|
||||
enText: "No message found"),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Nenhuma mensagem encontrada!", enText: "No message found"),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedSubHeaderFontSize,)
|
||||
),
|
||||
fontSize: limitedSubHeaderFontSize,
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -287,7 +287,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
}
|
||||
|
||||
Widget _item(BuildContext context, dynamic jsonBody) {
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedBodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context);
|
||||
double limitedSubHeaderFontSize = LimitedFontSizeUtil.getSubHeaderFontSize(context);
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
|
@ -349,8 +349,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: limitedBodyFontSize,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor6,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
@ -374,8 +373,7 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget> wit
|
|||
jsonBody['MSG_TEXTO'].toString(),
|
||||
style: TextStyle(
|
||||
fontSize: limitedBodyFontSize,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor6,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -163,31 +163,25 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
|||
child: IconButton(
|
||||
icon: const Icon(Icons.filter_list),
|
||||
onPressed: () async {
|
||||
final Map<String, String>? selectedFilter =
|
||||
await showModalBottomSheet<Map<String, String>>(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: OrderFilterModalWidget(
|
||||
defaultAdresseeType: _selectedTypeSubject
|
||||
.value['adresseeType'] ??
|
||||
'.*',
|
||||
defaultStatus:
|
||||
_selectedTypeSubject.value['status'] ??
|
||||
'.*',
|
||||
|
||||
),
|
||||
),
|
||||
final Map<String, String>? selectedFilter = await showModalBottomSheet<Map<String, String>>(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: OrderFilterModalWidget(
|
||||
defaultAdresseeType: _selectedTypeSubject.value['adresseeType'] ?? '.*',
|
||||
defaultStatus: _selectedTypeSubject.value['status'] ?? '.*',
|
||||
),
|
||||
);
|
||||
});
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
if (selectedFilter != null) {
|
||||
_updateFilterAction(selectedFilter);
|
||||
|
@ -261,9 +255,8 @@ class _PackageOrderPage extends State<PackageOrderPage> {
|
|||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Nenhuma encomenda encontrada!",
|
||||
enText: "No orders found!"),
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Nenhuma encomenda encontrada!", enText: "No orders found!"),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getHeaderFontSize(context),
|
||||
|
|
|
@ -106,7 +106,7 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
|||
content: Text(
|
||||
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||
style: TextStyle(
|
||||
color :Colors.white,
|
||||
color: Colors.white,
|
||||
fontSize: LimitedFontSizeUtil.getBodyFontSize(context),
|
||||
),
|
||||
),
|
||||
|
@ -132,13 +132,13 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Nenhum Pet encontrado!",
|
||||
enText: "No pets found"),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Nenhum Pet encontrado!", enText: "No pets found"),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Nunito',
|
||||
fontSize: limitedHeaderTextSize,)
|
||||
),
|
||||
fontSize: limitedHeaderTextSize,
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -250,12 +250,9 @@ class _PetsHistoryScreenState extends State<PetsHistoryScreen> with TickerProvid
|
|||
],
|
||||
onTapCardItemAction: () async {
|
||||
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final cliName =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
||||
final userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
||||
await showDialog(
|
||||
useSafeArea: true,
|
||||
context: context,
|
||||
|
|
|
@ -106,8 +106,7 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
petAmountRegister =
|
||||
(await StorageHelper().get(SQLiteStorageKey.petAmount.value, Storage.SQLiteStorage)) ?? '';
|
||||
petAmountRegister = (await StorageHelper().get(SQLiteStorageKey.petAmount.value, Storage.SQLiteStorage)) ?? '';
|
||||
|
||||
safeSetState?.call();
|
||||
}
|
||||
|
|
|
@ -125,271 +125,195 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
|||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedHeaderFontSize,
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
),
|
||||
Form(
|
||||
key: _model.registerFormKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 10, 0, 20),
|
||||
child: MediaUploadButtonUtil(
|
||||
onUploadComplete: _model.handleUploadComplete,
|
||||
isUploading: _model.isDataUploading,
|
||||
uploadedFiles: _model.uploadedLocalFile,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Clique para adicionar a foto de seu Pet',
|
||||
enText: 'Click to add your Pet\'s photo'),
|
||||
),
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerName,
|
||||
validator: _model.textControllerNameValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusName,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||
hintText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||
suffixIcon: Symbols.format_color_text,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerSpecies,
|
||||
validator: _model.textControllerSpeciesValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusSpecies,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Espécie', enText: 'Species'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ex: Cachorro, Gato, Papagaio',
|
||||
enText: 'e.g. Dog, Cat, Parrot'),
|
||||
suffixIcon: Symbols.sound_detection_dog_barking,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerRace,
|
||||
validator: _model.textControllerRaceValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusRace,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Raça', enText: 'Race'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ex: Labrador, Poodle, Siamês, Persa',
|
||||
enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
|
||||
suffixIcon: Icons.pets_outlined,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerColor,
|
||||
validator: _model.textControllerColorValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusColor,
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Cor', enText: 'Color'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ex: Preto, Amarelo, Branco',
|
||||
enText: 'e.g. Black, Yellow, White'),
|
||||
suffixIcon: Symbols.palette,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 60.0,
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textControllerData,
|
||||
focusNode: _model.textFieldFocusData,
|
||||
cursorColor:
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
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',
|
||||
child:
|
||||
Column(mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 10, 0, 20),
|
||||
child: MediaUploadButtonUtil(
|
||||
onUploadComplete: _model.handleUploadComplete,
|
||||
isUploading: _model.isDataUploading,
|
||||
uploadedFiles: _model.uploadedLocalFile,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Clique para adicionar a foto de seu Pet', enText: 'Click to add your Pet\'s photo'),
|
||||
),
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerName,
|
||||
validator: _model.textControllerNameValidator.asValidator(context),
|
||||
focusNode: _model.textFieldFocusName,
|
||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(ptText: 'Nome', enText: 'Name'),
|
||||
suffixIcon: Symbols.format_color_text,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerSpecies,
|
||||
validator: _model.textControllerSpeciesValidator.asValidator(context),
|
||||
focusNode: _model.textFieldFocusSpecies,
|
||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Espécie', enText: 'Species'),
|
||||
hintText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Ex: Cachorro, Gato, Papagaio', enText: 'e.g. Dog, Cat, Parrot'),
|
||||
suffixIcon: Symbols.sound_detection_dog_barking,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerRace,
|
||||
validator: _model.textControllerRaceValidator.asValidator(context),
|
||||
focusNode: _model.textFieldFocusRace,
|
||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Raça', enText: 'Race'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Ex: Labrador, Poodle, Siamês, Persa', enText: 'e.g. Labrador, Poodle, Siamese, Persian'),
|
||||
suffixIcon: Icons.pets_outlined,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerColor,
|
||||
validator: _model.textControllerColorValidator.asValidator(context),
|
||||
focusNode: _model.textFieldFocusColor,
|
||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cor', enText: 'Color'),
|
||||
hintText: FFLocalizations.of(context)
|
||||
.getVariableText(ptText: 'Ex: Preto, Amarelo, Branco', enText: 'e.g. Black, Yellow, White'),
|
||||
suffixIcon: Symbols.palette,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 80,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 60.0,
|
||||
child: Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
child: TextFormField(
|
||||
controller: _model.textControllerData,
|
||||
focusNode: _model.textFieldFocusData,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
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,
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context)
|
||||
.labelMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.labelMediumFamily),
|
||||
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,
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Data de Nascimento',
|
||||
enText: 'Date of Birth',
|
||||
),
|
||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||
lineHeight: 1.0,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
width: 0.5,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
lineHeight: 1.8,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: _model
|
||||
.textControllerDataValidator
|
||||
.asValidator(context),
|
||||
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,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
final pickedDate = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: getCurrentTimestamp,
|
||||
firstDate: DateTime(1990),
|
||||
lastDate: DateTime.now(),
|
||||
builder: (context, child) {
|
||||
return wrapInMaterialDatePickerTheme(
|
||||
context,
|
||||
child!,
|
||||
headerBackgroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
headerForegroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.info,
|
||||
headerTextStyle:
|
||||
FlutterFlowTheme.of(context)
|
||||
.headlineLarge
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme
|
||||
.of(context)
|
||||
.headlineLargeFamily,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.headlineLargeFamily),
|
||||
),
|
||||
pickerBackgroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
pickerForegroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
selectedDateTimeBackgroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
selectedDateTimeForegroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.info,
|
||||
actionButtonForegroundColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
iconSize: 24.0,
|
||||
);
|
||||
},
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
lineHeight: 1.8,
|
||||
fontSize: limitedInputFontSize,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
validator: _model.textControllerDataValidator.asValidator(context),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
final pickedDate = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: getCurrentTimestamp,
|
||||
firstDate: DateTime(1990),
|
||||
lastDate: DateTime.now(),
|
||||
builder: (context, child) {
|
||||
return wrapInMaterialDatePickerTheme(
|
||||
context,
|
||||
child!,
|
||||
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||
headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||
),
|
||||
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||
selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
|
||||
actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||
iconSize: 24.0,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
if (pickedDate != null) {
|
||||
setState(() {
|
||||
|
@ -399,170 +323,134 @@ class _PetsPageWidgetState extends State<PetsPageWidget> with SingleTickerProvid
|
|||
pickedDate.day,
|
||||
);
|
||||
|
||||
_model.textControllerData =
|
||||
TextEditingController(
|
||||
text: dateTimeFormat(
|
||||
'dd/MM/yyyy',
|
||||
_model.selectedDate,
|
||||
locale: FFLocalizations.of(context)
|
||||
.languageCode,
|
||||
));
|
||||
_model.textControllerData?.selection =
|
||||
TextSelection.collapsed(
|
||||
offset: _model.textControllerData!
|
||||
.text.length,
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 80.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(10.0),
|
||||
),
|
||||
),
|
||||
_model.textControllerData = TextEditingController(
|
||||
text: dateTimeFormat(
|
||||
'dd/MM/yyyy',
|
||||
_model.selectedDate,
|
||||
locale: FFLocalizations.of(context).languageCode,
|
||||
));
|
||||
_model.textControllerData?.selection = TextSelection.collapsed(
|
||||
offset: _model.textControllerData!.text.length,
|
||||
);
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
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(
|
||||
options: const ['MAC', 'FEM'],
|
||||
controller: _model.dropDownValueController1 ??=
|
||||
FormFieldController<String>(
|
||||
_model.dropDownValue1 ??= ''),
|
||||
isRequired: true,
|
||||
changed: (val) => safeSetState(() {
|
||||
_model.dropDownValue1 = val;
|
||||
}),
|
||||
dropDownValue: _model.dropDownValue1,
|
||||
optionsLabel: [
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Macho', enText: 'Male'),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Fêmea', enText: 'Female')
|
||||
],
|
||||
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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
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,
|
||||
),
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerObservation,
|
||||
validator: _model.textControllerObservationValidator
|
||||
.asValidator(context),
|
||||
focusNode: _model.textFieldFocusObservation,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Escreva as suas observações aqui...',
|
||||
enText: 'Write your observations here...'),
|
||||
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(0, 0, 0, 15),
|
||||
child: CustomSelect(
|
||||
options: const ['MAC', 'FEM'],
|
||||
controller: _model.dropDownValueController1 ??=
|
||||
FormFieldController<String>(_model.dropDownValue1 ??= ''),
|
||||
isRequired: true,
|
||||
changed: (val) => safeSetState(() {
|
||||
_model.dropDownValue1 = val;
|
||||
}),
|
||||
dropDownValue: _model.dropDownValue1,
|
||||
optionsLabel: [
|
||||
FFLocalizations.of(context).getVariableText(ptText: 'Macho', enText: 'Male'),
|
||||
FFLocalizations.of(context).getVariableText(ptText: 'Fêmea', enText: 'Female')
|
||||
],
|
||||
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(
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getVariableText(
|
||||
ptText: 'Cadastrar', enText: 'Register'),
|
||||
onPressed: _model.isFormValid(context)
|
||||
? _model.registerPet
|
||||
: null),
|
||||
),
|
||||
])),
|
||||
),
|
||||
),
|
||||
CustomInputUtil(
|
||||
controller: _model.textControllerObservation,
|
||||
validator: _model.textControllerObservationValidator.asValidator(context),
|
||||
focusNode: _model.textFieldFocusObservation,
|
||||
labelText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'),
|
||||
hintText: FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Escreva as suas observações aqui...', enText: 'Write your observations here...'),
|
||||
suffixIcon: Icons.text_fields,
|
||||
haveMaxLength: true,
|
||||
onChanged: (value) => setState(() {}),
|
||||
maxLength: 250,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(70, 20, 70, 30),
|
||||
child: SubmitButtonUtil(
|
||||
labelText: FFLocalizations.of(context).getVariableText(ptText: 'Cadastrar', enText: 'Register'),
|
||||
onPressed: _model.isFormValid(context) ? _model.registerPet : null),
|
||||
),
|
||||
])),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
@ -23,8 +23,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
late bool isPanic = false;
|
||||
|
||||
Future<void> _initialize() async {
|
||||
isFingerprint =
|
||||
await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
||||
isFingerprint = await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
||||
isPerson = await StorageHelper().get(SQLiteStorageKey.person.value, Storage.SQLiteStorage) == 'true';
|
||||
isNotify = await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true';
|
||||
isAccess = await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true';
|
||||
|
@ -89,8 +88,8 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
);
|
||||
SnackBarUtil.showSnackBar(context, content, isError: true);
|
||||
})
|
||||
.then((_) async => isNotify =
|
||||
await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true')
|
||||
.then((_) async =>
|
||||
isNotify = await StorageHelper().get(SQLiteStorageKey.notify.value, Storage.SQLiteStorage) == 'true')
|
||||
.whenComplete(() => notifyListeners());
|
||||
context.pop();
|
||||
}
|
||||
|
@ -168,8 +167,8 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
);
|
||||
SnackBarUtil.showSnackBar(context, content, isError: true);
|
||||
})
|
||||
.then((_) async => isAccess =
|
||||
await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true')
|
||||
.then((_) async =>
|
||||
isAccess = await StorageHelper().get(SQLiteStorageKey.access.value, Storage.SQLiteStorage) == 'true')
|
||||
.whenComplete(() => notifyListeners());
|
||||
}
|
||||
|
||||
|
@ -228,8 +227,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
.set(SQLiteStorageKey.fingerprint.value, isFingerprint ? 'true' : 'false', Storage.SQLiteStorage);
|
||||
notifyListeners();
|
||||
SnackBarUtil.showSnackBar(context, content);
|
||||
isFingerprint =
|
||||
await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
||||
isFingerprint = await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
||||
}
|
||||
|
||||
isFingerprint ? onChange(null) : _showPassKey(context, onChange);
|
||||
|
|
|
@ -22,7 +22,6 @@ class _PreferencesPageWidgetState extends State<PreferencesPageWidget> {
|
|||
super.initState();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ChangeNotifierProvider<PreferencesPageModel>(
|
||||
|
|
|
@ -29,8 +29,7 @@ class QrCodePageModel extends FlutterFlowModel<QrCodePageWidget> {
|
|||
}
|
||||
|
||||
Future<void> initVariable() async {
|
||||
isFingerprint =
|
||||
await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
||||
isFingerprint = await StorageHelper().get(SQLiteStorageKey.fingerprint.value, Storage.SQLiteStorage) == 'true';
|
||||
userDevUUID = await StorageHelper().get(SQLiteStorageKey.userDevUUID.value, Storage.SQLiteStorage) ?? '';
|
||||
safeSetState?.call();
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
children: [
|
||||
if (_model.isAccess == true && _model.key != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0 , 20),
|
||||
padding: const EdgeInsets.fromLTRB(0, 0, 0, 20),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Use esse QR Code para acesso',
|
||||
|
@ -125,9 +125,8 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
fontSize: limitedHeaderTextSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -141,7 +140,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
safeSetState(() async {
|
||||
_resetAnimationAndToggleAccess();
|
||||
});
|
||||
|
||||
|
||||
_model.isFingerprint
|
||||
? await _showBiometricsAuth(context)
|
||||
: await _showQrCodeBottomSheet(context);
|
||||
|
@ -207,21 +206,15 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
),
|
||||
options: FFButtonOptions(
|
||||
height: 40.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||
color: Colors.white,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
.containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||
fontSize: LimitedFontSizeUtil.getCalculateFontSize(context, 12, 12, 10),
|
||||
),
|
||||
elevation: 3.0,
|
||||
|
@ -248,18 +241,16 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
visible: _model.isAccess == true,
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText:
|
||||
'Certifique-se de que o QRCode está visivel para o leitor',
|
||||
ptText: 'Certifique-se de que o QRCode está visivel para o leitor',
|
||||
enText: 'Make sure the QRCode is visible to the reader',
|
||||
// '6z6kvmhl' /* Certifique-se de que o QRCode ... */,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: limitedBodyFontSize,
|
||||
),
|
||||
),
|
||||
|
@ -283,8 +274,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
10.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Expirando QR code em',
|
||||
|
@ -293,13 +283,11 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
),
|
||||
),
|
||||
|
@ -308,13 +296,11 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 20.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 20.0, 0.0),
|
||||
child: StreamBuilder<double>(
|
||||
stream: getProgressValue(),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const CircularProgressIndicator();
|
||||
} else if (snapshot.hasError) {
|
||||
return Text('Error: ${snapshot.error}');
|
||||
|
@ -333,23 +319,16 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
onAnimationEnd: () {
|
||||
_resetAnimationAndToggleAccess();
|
||||
},
|
||||
progressColor:
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
backgroundColor:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
progressColor: FlutterFlowTheme.of(context).primary,
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||
center: Text(
|
||||
'${(progress * totalTimeInSeconds / 5).toStringAsFixed(1)}s',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.headlineSmall
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context)
|
||||
.headlineSmallFamily,
|
||||
style: FlutterFlowTheme.of(context).headlineSmall.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineSmallFamily,
|
||||
fontSize: LimitedFontSizeUtil.getNoResizeFont(context, 14),
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.headlineSmallFamily),
|
||||
.containsKey(FlutterFlowTheme.of(context).headlineSmallFamily),
|
||||
),
|
||||
),
|
||||
startAngle: 20.0,
|
||||
|
@ -373,7 +352,7 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget> with TickerProvider
|
|||
Future<void> _showBiometricsAuth(BuildContext context) async {
|
||||
await BiometricHelper.checkBiometrics()
|
||||
.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);
|
||||
if (key == null || key.isEmpty) throw Exception('No key found');
|
||||
safeSetState(() {
|
||||
|
|
|
@ -122,8 +122,7 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
enText: 'My Identifier'),
|
||||
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.secondaryText,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: limitedInputFontSize,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
@ -135,12 +134,9 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
.getVariableText(ptText: 'Meu Identificador', enText: 'My Identifier'),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height:30,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
height: 30,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
|
@ -187,16 +183,10 @@ class _ReceptionPageWidgetState extends State<ReceptionPageWidget> with WidgetsB
|
|||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 30,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor1,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Nunito Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
fontSize: limitedInputFontSize,
|
||||
|
|
|
@ -23,12 +23,9 @@ class _ReservationPageWidgetState extends State<ReservationPageWidget> {
|
|||
|
||||
Future<Map<String, String>> initVariables() async {
|
||||
final email = (await StorageHelper().get(hub.SecureStorageKey.email.value, hub.Storage.SecureStorage)) ?? '';
|
||||
final name =
|
||||
(await StorageHelper().get(hub.SQLiteStorageKey.userName.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final devUUID =
|
||||
(await StorageHelper().get(hub.SQLiteStorageKey.devUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final userUUID =
|
||||
(await StorageHelper().get(hub.SQLiteStorageKey.userUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final name = (await StorageHelper().get(hub.SQLiteStorageKey.userName.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final devUUID = (await StorageHelper().get(hub.SQLiteStorageKey.devUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final userUUID = (await StorageHelper().get(hub.SQLiteStorageKey.userUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
final clientId =
|
||||
(await StorageHelper().get(hub.SQLiteStorageKey.clientUUID.value, hub.Storage.SQLiteStorage)) ?? '';
|
||||
const createdAt = '0000-00-00 00:00:00';
|
||||
|
|
|
@ -417,7 +417,6 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
|||
ptText: 'Cancelar',
|
||||
enText: 'Cancel',
|
||||
),
|
||||
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: () async {
|
||||
showAlertDialog(
|
||||
|
@ -475,7 +474,7 @@ class ScheduleCompleteVisitPageModel extends FlutterFlowModel<ScheduleComplete>
|
|||
});
|
||||
},
|
||||
options: FFButtonOptions(
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
width: MediaQuery.of(context).size.width * 0.3,
|
||||
height: 40,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
elevation: 0,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -129,7 +129,6 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double limitedHeaderFontSize = LimitedFontSizeUtil.getHeaderFontSize(context);
|
||||
|
||||
return Column(
|
||||
|
@ -143,14 +142,13 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"),
|
||||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getVariableText(ptText: "Nenhuma visita encontrada!", enText: "No visit found"),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
fontWeight: FontWeight.bold
|
||||
)
|
||||
),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: limitedHeaderFontSize,
|
||||
fontWeight: FontWeight.bold)),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -248,12 +246,9 @@ class _VisitHistoryWidgetState extends State<VisitHistoryWidget> with TickerProv
|
|||
],
|
||||
onTapCardItemAction: () async {
|
||||
final devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final userUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final cliUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final cliName =
|
||||
(await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
||||
final userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
final cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
||||
|
||||
await showDialog(
|
||||
useSafeArea: true,
|
||||
|
|
|
@ -18,8 +18,7 @@ class AtomTermsOfUse extends StatelessWidget {
|
|||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(
|
||||
context),
|
||||
fontSize: LimitedFontSizeUtil.getInputFontSize(context),
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
|
|
|
@ -15,7 +15,8 @@ class SQLiteStorage implements BaseStorage {
|
|||
|
||||
late final _database;
|
||||
|
||||
@override Future<void> init() async {
|
||||
@override
|
||||
Future<void> init() async {
|
||||
_database = await openDatabase(
|
||||
join(await getDatabasesPath(), _dbName),
|
||||
version: _dbVersion,
|
||||
|
@ -29,10 +30,10 @@ class SQLiteStorage implements BaseStorage {
|
|||
_onCreate(Database database, int version) async {
|
||||
await database.execute(_tableKeychain);
|
||||
}
|
||||
|
||||
_onUpdate(Database database, int oldVersion, int newVersion) async {}
|
||||
_onDowngrade(Database database, int oldVersion, int newVersion) async {}
|
||||
|
||||
|
||||
String get _tableKeychain => '''
|
||||
CREATE TABLE keychain (
|
||||
key TEXT UNIQUE,
|
||||
|
@ -66,7 +67,8 @@ class SQLiteStorage implements BaseStorage {
|
|||
{'key': SQLiteStorageKey.petAmount.value, 'value': '', 'type': 'local'},
|
||||
];
|
||||
|
||||
@override Future<String?> get(String key) async {
|
||||
@override
|
||||
Future<String?> get(String key) async {
|
||||
var response = await _database.query('keychain', where: 'key = ?', whereArgs: [key]);
|
||||
if (response.isEmpty) {
|
||||
return null;
|
||||
|
@ -74,7 +76,8 @@ class SQLiteStorage implements BaseStorage {
|
|||
return response.first['value'];
|
||||
}
|
||||
|
||||
@override Future<void> set(String key, String value) async {
|
||||
@override
|
||||
Future<void> set(String key, String value) async {
|
||||
var date = DateTime.now().toIso8601String();
|
||||
await _database.insert(
|
||||
tableKeychain,
|
||||
|
@ -86,15 +89,16 @@ class SQLiteStorage implements BaseStorage {
|
|||
'resolvedAt': date,
|
||||
'createdAt': date,
|
||||
},
|
||||
conflictAlgorithm: ConflictAlgorithm.replace
|
||||
);
|
||||
conflictAlgorithm: ConflictAlgorithm.replace);
|
||||
}
|
||||
|
||||
@override Future<void> delete(String key) async {
|
||||
@override
|
||||
Future<void> delete(String key) async {
|
||||
await _database.delete('keychain', where: 'key = ?', whereArgs: [key]);
|
||||
}
|
||||
|
||||
@override Future<void> clearAll() async {
|
||||
@override
|
||||
Future<void> clearAll() async {
|
||||
await _database.delete('keychain');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,13 +4,11 @@ import 'package:hub/shared/helpers/secure_storage.dart';
|
|||
import 'package:hub/shared/helpers/shared_preferences_storage.dart';
|
||||
import 'package:hub/shared/helpers/sqlite_storage.dart';
|
||||
|
||||
|
||||
class StorageHelper {
|
||||
static final StorageHelper _instance = StorageHelper._internal();
|
||||
factory StorageHelper() => _instance;
|
||||
StorageHelper._internal();
|
||||
|
||||
|
||||
late BuildContext? _context;
|
||||
late bool _isRecovered = false;
|
||||
BuildContext? get context => _context;
|
||||
|
@ -75,6 +73,4 @@ class StorageHelper {
|
|||
return SQLiteStorage.instance.clearAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -84,7 +84,8 @@ class AuthenticationService {
|
|||
DialogUtil.error(context, response.jsonBody['error_msg'].toString());
|
||||
}
|
||||
}
|
||||
} return;
|
||||
}
|
||||
return;
|
||||
} catch (e, s) {
|
||||
DialogUtil.errorDefault(context);
|
||||
LogUtil.requestAPIFailed('login.php', emailAdress.toString(), "Login", e, s);
|
||||
|
@ -219,4 +220,4 @@ class AuthenticationService {
|
|||
SnackBarUtil.showSnackBar(context, content, isError: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/shared/helpers/base_storage.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 '../../../backend/api_requests/api_calls.dart';
|
||||
|
@ -203,7 +204,7 @@ class LocalizationService {
|
|||
final String userUUID = await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage) ?? '';
|
||||
final bool isAuthenticated = userUUID.isNotEmpty && devUUID.isNotEmpty;
|
||||
final bool isDevLinked = !errorMsg.contains('Esse dispositivo nao pertence a esse usuario');
|
||||
log('() => isLinked: $errorMsg');
|
||||
log('() => isLinked: $errorMsg');
|
||||
if (!isAuthenticated) {
|
||||
errorMsg = FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Erro ao obter credenciais de autenticação',
|
||||
|
@ -222,7 +223,6 @@ class LocalizationService {
|
|||
return;
|
||||
}
|
||||
await DialogUtil.error(context, errorMsg).whenComplete(() async => await selectLocal(context));
|
||||
|
||||
}
|
||||
|
||||
static Future<bool> _handleUnavailable(BuildContext context, List<dynamic> locals) async {
|
||||
|
@ -279,8 +279,7 @@ class LocalizationService {
|
|||
static Future<bool> _isUnselected() async {
|
||||
String cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
String cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
||||
String ownerUUID =
|
||||
(await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
String ownerUUID = (await StorageHelper().get(SQLiteStorageKey.ownerUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
return cliUUID.isEmpty && cliName.isEmpty && ownerUUID.isEmpty;
|
||||
}
|
||||
|
||||
|
@ -307,10 +306,8 @@ class LocalizationService {
|
|||
SQLiteStorageKey.petAmount.value,
|
||||
jsonBody['petAmountRegister'] != null && jsonBody['petAmountRegister'].toString().isEmpty
|
||||
? '0'
|
||||
: jsonBody['petAmountRegister'].toString(),
|
||||
Storage.SQLiteStorage
|
||||
);
|
||||
await StorageHelper()
|
||||
.set(SQLiteStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'], Storage.SQLiteStorage);
|
||||
: jsonBody['petAmountRegister'].toString(),
|
||||
Storage.SQLiteStorage);
|
||||
await StorageHelper().set(SQLiteStorageKey.userName.value, jsonBody['visitado']['VDO_NOME'], Storage.SQLiteStorage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,42 +2,73 @@ import 'dart:io';
|
|||
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
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 {
|
||||
var deviceInfo = DeviceInfoPlugin();
|
||||
|
||||
if (Platform.isIOS) {
|
||||
// import 'dart:io'
|
||||
var iosDeviceInfo = await deviceInfo.iosInfo;
|
||||
return iosDeviceInfo.identifierForVendor; // unique ID on iOS
|
||||
return iosDeviceInfo.identifierForVendor;
|
||||
} else if (Platform.isAndroid) {
|
||||
var androidDeviceInfo = await deviceInfo.androidInfo;
|
||||
return androidDeviceInfo.id; // unique ID on Android
|
||||
try {
|
||||
final String? secureAndroidId = await getAndroidId();
|
||||
return secureAndroidId;
|
||||
} catch (e) {
|
||||
final build = await deviceInfo.androidInfo;
|
||||
return build.id;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
static Future<String?> getSerialNumber() async {
|
||||
var deviceInfo = DeviceInfoPlugin();
|
||||
|
||||
if (Platform.isIOS) {
|
||||
// import 'dart:io'
|
||||
|
||||
var iosDeviceInfo = await deviceInfo.iosInfo;
|
||||
|
||||
return iosDeviceInfo.identifierForVendor; // unique ID on iOS
|
||||
} else if (Platform.isAndroid) {
|
||||
var androidDeviceInfo = await deviceInfo.androidInfo;
|
||||
|
||||
return androidDeviceInfo.serialNumber; // unique ID on Android
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
static Future<String?> getDeviceOSVersion() async {
|
||||
var deviceInfo = DeviceInfoPlugin();
|
||||
|
||||
if (Platform.isIOS) {
|
||||
var iosDeviceInfo = await deviceInfo.iosInfo;
|
||||
|
||||
return iosDeviceInfo.systemVersion; // unique ID on iOS. e.g. 14.5
|
||||
} else if (Platform.isAndroid) {
|
||||
var androidDeviceInfo = await deviceInfo.androidInfo;
|
||||
|
||||
return androidDeviceInfo.version.release; // unique ID on Android. e.g . 11
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class LimitedFontSizeUtil {
|
||||
static double getCalculateFontSize(BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) {
|
||||
static double getCalculateFontSize(
|
||||
BuildContext context, double baseFontSize, double maxFontSize, double limitedFontSize) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||
return scaledFontSize > maxFontSize ? limitedFontSize : scaledFontSize;
|
||||
|
@ -9,18 +10,19 @@ class LimitedFontSizeUtil {
|
|||
|
||||
static double getNoResizeFont(BuildContext context, double baseFontSize) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double noscaledFontSize = baseFontSize / textScaler.scale(1);
|
||||
final double noscaledFontSize = baseFontSize / textScaler.scale(1);
|
||||
return noscaledFontSize;
|
||||
}
|
||||
|
||||
static double getScaledSizedBoxSize(BuildContext context, double baseFontSize, double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) {
|
||||
|
||||
static double getScaledSizedBoxSize(
|
||||
BuildContext context, double baseFontSize, double maxFontSize, double sizeIfExceeded, double sizeIfNotExceeded) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = baseFontSize * textScaler.scale(1);
|
||||
return scaledFontSize > maxFontSize ? sizeIfExceeded : sizeIfNotExceeded;
|
||||
}
|
||||
|
||||
static double getBodyFontSize(BuildContext context) {
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final textScaler = MediaQuery.textScalerOf(context);
|
||||
final double scaledFontSize = 12 * textScaler.scale(1);
|
||||
return scaledFontSize > 12 ? 10 : scaledFontSize;
|
||||
}
|
||||
|
@ -42,4 +44,4 @@ class LimitedFontSizeUtil {
|
|||
final double scaledFontSize = 14 * textScaler.scale(1);
|
||||
return scaledFontSize > 14 ? 12 : scaledFontSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,9 +16,8 @@ class TextUtil extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
var textScale = MediaQuery.textScalerOf(context);
|
||||
var scaledTextSize = textScale.scale(style?.fontSize ?? 14);
|
||||
double limitedTextSize = scaledTextSize > (style?.fontSize ?? 14) * 2
|
||||
? (style?.fontSize ?? 14) * 2
|
||||
: scaledTextSize;
|
||||
double limitedTextSize =
|
||||
scaledTextSize > (style?.fontSize ?? 14) * 2 ? (style?.fontSize ?? 14) * 2 : scaledTextSize;
|
||||
|
||||
return Text(
|
||||
text,
|
||||
|
|
Loading…
Reference in New Issue