FIX
This commit is contained in:
parent
3dadb48fe8
commit
957d3c8ef5
|
@ -13,8 +13,7 @@ void main() {
|
||||||
|
|
||||||
group('Initialization', () {
|
group('Initialization', () {
|
||||||
group('Navigation', () {
|
group('Navigation', () {
|
||||||
setUpAll(() async =>
|
setUpAll(() async => await initializeApp().then((_) => StorageUtil().isLogged = false));
|
||||||
await initializeApp().then((_) => StorageUtil().isLogged = false));
|
|
||||||
testWidgets('Test Welcome', (WidgetTester tester) async {
|
testWidgets('Test Welcome', (WidgetTester tester) async {
|
||||||
widget = tester;
|
widget = tester;
|
||||||
await _testWelcome();
|
await _testWelcome();
|
||||||
|
@ -25,16 +24,14 @@ void main() {
|
||||||
});
|
});
|
||||||
group('Authentication', () {
|
group('Authentication', () {
|
||||||
group('Sign in', () {
|
group('Sign in', () {
|
||||||
setUpAll(() async =>
|
setUpAll(() async => await initializeApp().then((_) => StorageUtil().isLogged = false));
|
||||||
await initializeApp().then((_) => StorageUtil().isLogged = false));
|
|
||||||
testWidgets('Test Sign In', (WidgetTester tester) async {
|
testWidgets('Test Sign In', (WidgetTester tester) async {
|
||||||
widget = tester;
|
widget = tester;
|
||||||
await _testSignIn();
|
await _testSignIn();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
group('Sign up', () {
|
group('Sign up', () {
|
||||||
setUpAll(() async =>
|
setUpAll(() async => await initializeApp().then((_) => StorageUtil().isLogged = false));
|
||||||
await initializeApp().then((_) => StorageUtil().isLogged = false));
|
|
||||||
testWidgets('Test Sign Up', (WidgetTester tester) async {
|
testWidgets('Test Sign Up', (WidgetTester tester) async {
|
||||||
widget = tester;
|
widget = tester;
|
||||||
await _testSignUp();
|
await _testSignUp();
|
||||||
|
@ -96,14 +93,8 @@ Future<void> _testWelcome() async {
|
||||||
Future<void> _testSignIn() async {
|
Future<void> _testSignIn() async {
|
||||||
await widget.pumpWidget(const App());
|
await widget.pumpWidget(const App());
|
||||||
await _navigateToSignIn();
|
await _navigateToSignIn();
|
||||||
await _auth({
|
await _auth({'emailTextFormField': 'erro@exemplo.com', 'passwordTextFormField': '12345678'});
|
||||||
'emailTextFormField': 'erro@exemplo.com',
|
await _auth({'emailTextFormField': 'email_app@exemplo.com', 'passwordTextFormField': '12345678'});
|
||||||
'passwordTextFormField': '12345678'
|
|
||||||
});
|
|
||||||
await _auth({
|
|
||||||
'emailTextFormField': 'email_app@exemplo.com',
|
|
||||||
'passwordTextFormField': '12345678'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _testSignUp() async {
|
Future<void> _testSignUp() async {
|
||||||
|
@ -120,17 +111,10 @@ Future<void> _testSignUp() async {
|
||||||
var name = randomString(7, 7, true, true, true);
|
var name = randomString(7, 7, true, true, true);
|
||||||
var email = '$name@example.com';
|
var email = '$name@example.com';
|
||||||
var password = '12345678';
|
var password = '12345678';
|
||||||
credentials = {
|
credentials = {'nameTextFormField': name, 'emailTextFormField': email, 'passwordTextFormField': password};
|
||||||
'nameTextFormField': name,
|
|
||||||
'emailTextFormField': email,
|
|
||||||
'passwordTextFormField': password
|
|
||||||
};
|
|
||||||
await _navigateToSignUp();
|
await _navigateToSignUp();
|
||||||
await _auth(credentials);
|
await _auth(credentials);
|
||||||
credentials = {
|
credentials = {'emailTextFormField': email, 'passwordTextFormField': password};
|
||||||
'emailTextFormField': email,
|
|
||||||
'passwordTextFormField': password
|
|
||||||
};
|
|
||||||
await _auth(credentials);
|
await _auth(credentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,20 +136,17 @@ Future<void> _testForgotPassword() async {
|
||||||
|
|
||||||
Future<void> _recoveryPassword() async {
|
Future<void> _recoveryPassword() async {
|
||||||
await widget.pumpAndSettle();
|
await widget.pumpAndSettle();
|
||||||
final Finder forgotPassword =
|
final Finder forgotPassword = find.byKey(const ValueKey<String>('ForgotPassword'));
|
||||||
find.byKey(const ValueKey<String>('ForgotPassword'));
|
|
||||||
if (forgotPassword.evaluate().isNotEmpty) await widget.tap(forgotPassword);
|
if (forgotPassword.evaluate().isNotEmpty) await widget.tap(forgotPassword);
|
||||||
await widget.ensureVisible(forgotPassword);
|
await widget.ensureVisible(forgotPassword);
|
||||||
await widget.pumpAndSettle();
|
await widget.pumpAndSettle();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _navigateBackUsingSystemGesture() async =>
|
Future<void> _navigateBackUsingSystemGesture() async =>
|
||||||
IntegrationTestWidgetsFlutterBinding.instance.keyboard
|
IntegrationTestWidgetsFlutterBinding.instance.keyboard.isLogicalKeyPressed(LogicalKeyboardKey.escape);
|
||||||
.isLogicalKeyPressed(LogicalKeyboardKey.escape);
|
|
||||||
Future<void> _navigateToSignUp() async {
|
Future<void> _navigateToSignUp() async {
|
||||||
await widget.pumpAndSettle();
|
await widget.pumpAndSettle();
|
||||||
final Finder navToSignUp =
|
final Finder navToSignUp = find.byKey(const ValueKey<String>('toggleSignUpPage'));
|
||||||
find.byKey(const ValueKey<String>('toggleSignUpPage'));
|
|
||||||
if (navToSignUp.evaluate().isNotEmpty) {
|
if (navToSignUp.evaluate().isNotEmpty) {
|
||||||
await widget.tap(navToSignUp);
|
await widget.tap(navToSignUp);
|
||||||
await widget.pumpAndSettle();
|
await widget.pumpAndSettle();
|
||||||
|
@ -174,8 +155,7 @@ Future<void> _navigateToSignUp() async {
|
||||||
|
|
||||||
Future<void> _navigateToSignIn() async {
|
Future<void> _navigateToSignIn() async {
|
||||||
await widget.pumpAndSettle();
|
await widget.pumpAndSettle();
|
||||||
final Finder navToSignIn =
|
final Finder navToSignIn = find.byKey(const ValueKey<String>('toggleSignInPage'));
|
||||||
find.byKey(const ValueKey<String>('toggleSignInPage'));
|
|
||||||
expect(navToSignIn, findsOneWidget);
|
expect(navToSignIn, findsOneWidget);
|
||||||
if (navToSignIn.evaluate().isNotEmpty) {
|
if (navToSignIn.evaluate().isNotEmpty) {
|
||||||
await widget.tap(navToSignIn);
|
await widget.tap(navToSignIn);
|
||||||
|
@ -214,8 +194,7 @@ Future<void> _submit(String key) async {
|
||||||
await widget.pumpAndSettle();
|
await widget.pumpAndSettle();
|
||||||
}
|
}
|
||||||
|
|
||||||
final Finder throwExceptionWidget =
|
final Finder throwExceptionWidget = find.byKey(const ValueKey<String>('ThrowExceptionWidget'));
|
||||||
find.byKey(const ValueKey<String>('ThrowExceptionWidget'));
|
|
||||||
await widget.pumpAndSettle();
|
await widget.pumpAndSettle();
|
||||||
if (throwExceptionWidget.evaluate().isNotEmpty) {
|
if (throwExceptionWidget.evaluate().isNotEmpty) {
|
||||||
await widget.ensureVisible(throwExceptionWidget);
|
await widget.ensureVisible(throwExceptionWidget);
|
||||||
|
|
|
@ -24,20 +24,17 @@ class PhpGroup {
|
||||||
static ForgotPasswordCall forgotPasswordCall = ForgotPasswordCall();
|
static ForgotPasswordCall forgotPasswordCall = ForgotPasswordCall();
|
||||||
static ChangePasswordCall changePasswordCall = ChangePasswordCall();
|
static ChangePasswordCall changePasswordCall = ChangePasswordCall();
|
||||||
static GetLocalsCall getLocalsCall = GetLocalsCall();
|
static GetLocalsCall getLocalsCall = GetLocalsCall();
|
||||||
static PostScheduleVisitorCall postScheduleVisitorCall =
|
static PostScheduleVisitorCall postScheduleVisitorCall = PostScheduleVisitorCall();
|
||||||
PostScheduleVisitorCall();
|
|
||||||
static PostScheduleVisitCall postScheduleVisitCall = PostScheduleVisitCall();
|
static PostScheduleVisitCall postScheduleVisitCall = PostScheduleVisitCall();
|
||||||
static GetScheduleVisitCall getScheduleVisitCall = GetScheduleVisitCall();
|
static GetScheduleVisitCall getScheduleVisitCall = GetScheduleVisitCall();
|
||||||
static GetDadosCall getDadosCall = GetDadosCall();
|
static GetDadosCall getDadosCall = GetDadosCall();
|
||||||
static GetVisitorByDocCall getVisitorByDocCall = GetVisitorByDocCall();
|
static GetVisitorByDocCall getVisitorByDocCall = GetVisitorByDocCall();
|
||||||
static GetFotoVisitanteCall getFotoVisitanteCall = GetFotoVisitanteCall();
|
static GetFotoVisitanteCall getFotoVisitanteCall = GetFotoVisitanteCall();
|
||||||
static PostProvVisitSchedulingCall postProvVisitSchedulingCall =
|
static PostProvVisitSchedulingCall postProvVisitSchedulingCall = PostProvVisitSchedulingCall();
|
||||||
PostProvVisitSchedulingCall();
|
|
||||||
static GetVisitsCall getVisitsCall = GetVisitsCall();
|
static GetVisitsCall getVisitsCall = GetVisitsCall();
|
||||||
static DeleteVisitCall deleteVisitCall = DeleteVisitCall();
|
static DeleteVisitCall deleteVisitCall = DeleteVisitCall();
|
||||||
static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall();
|
static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall();
|
||||||
static RespondeSolicitacaoCall respondeSolicitacaoCall =
|
static RespondeSolicitacaoCall respondeSolicitacaoCall = RespondeSolicitacaoCall();
|
||||||
RespondeSolicitacaoCall();
|
|
||||||
static GetAccessCall getAccessCall = GetAccessCall();
|
static GetAccessCall getAccessCall = GetAccessCall();
|
||||||
static GetLiberationsCall getLiberationsCall = GetLiberationsCall();
|
static GetLiberationsCall getLiberationsCall = GetLiberationsCall();
|
||||||
static GetMessagesCall getMessagesCall = GetMessagesCall();
|
static GetMessagesCall getMessagesCall = GetMessagesCall();
|
||||||
|
@ -155,9 +152,7 @@ class UpdatePet {
|
||||||
'species': species,
|
'species': species,
|
||||||
'breed': breed,
|
'breed': breed,
|
||||||
if (color != '') 'color': color,
|
if (color != '') 'color': color,
|
||||||
if (birthdayDate != '')
|
if (birthdayDate != '') 'birthdayDate': ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
||||||
'birthdayDate':
|
|
||||||
ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
|
||||||
'gender': gender,
|
'gender': gender,
|
||||||
'size': size,
|
'size': size,
|
||||||
if (notes != '') 'notes': notes,
|
if (notes != '') 'notes': notes,
|
||||||
|
@ -174,7 +169,10 @@ class UpdatePet {
|
||||||
}
|
}
|
||||||
|
|
||||||
class GetPets {
|
class GetPets {
|
||||||
Future<ApiCallResponse> call({final int? page, final int? pageSize,}) async {
|
Future<ApiCallResponse> call({
|
||||||
|
final int? page,
|
||||||
|
final int? pageSize,
|
||||||
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
final String devUUID = StorageUtil().devUUID;
|
final String devUUID = StorageUtil().devUUID;
|
||||||
|
@ -276,9 +274,7 @@ class RegisterPet {
|
||||||
'species': species,
|
'species': species,
|
||||||
'breed': breed,
|
'breed': breed,
|
||||||
if (color != '') 'color': color,
|
if (color != '') 'color': color,
|
||||||
if (birthdayDate != '')
|
if (birthdayDate != '') 'birthdayDate': ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
||||||
'birthdayDate':
|
|
||||||
ValidatorUtil.toISO8601USA('dd/MM/yyyy', birthdayDate!),
|
|
||||||
'gender': gender,
|
'gender': gender,
|
||||||
'size': size,
|
'size': size,
|
||||||
if (notes != '') 'notes': notes,
|
if (notes != '') 'notes': notes,
|
||||||
|
@ -652,7 +648,6 @@ class RegisterCall {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class ChangePasswordCall {
|
class ChangePasswordCall {
|
||||||
Future<ApiCallResponse> call({
|
Future<ApiCallResponse> call({
|
||||||
required final String email,
|
required final String email,
|
||||||
|
@ -696,7 +691,6 @@ class ForgotPasswordCall {
|
||||||
}) async {
|
}) async {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
|
||||||
|
|
||||||
return ApiManager.instance.makeApiCall(
|
return ApiManager.instance.makeApiCall(
|
||||||
callName: 'forgotPassword',
|
callName: 'forgotPassword',
|
||||||
apiUrl: '$baseUrl/iforgot.php',
|
apiUrl: '$baseUrl/iforgot.php',
|
||||||
|
@ -1181,8 +1175,7 @@ class GetDadosCall {
|
||||||
response,
|
response,
|
||||||
r'''$.error_msg''',
|
r'''$.error_msg''',
|
||||||
));
|
));
|
||||||
String? visitedDesNomeStr(dynamic response) =>
|
String? visitedDesNomeStr(dynamic response) => castToType<String>(getJsonField(
|
||||||
castToType<String>(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.DES_NOME''',
|
r'''$.visitado.DES_NOME''',
|
||||||
));
|
));
|
||||||
|
@ -1190,33 +1183,27 @@ class GetDadosCall {
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_ID''',
|
r'''$.visitado.VDO_ID''',
|
||||||
));
|
));
|
||||||
String? visitedVDOTNomeStr(dynamic response) =>
|
String? visitedVDOTNomeStr(dynamic response) => castToType<String>(getJsonField(
|
||||||
castToType<String>(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_NOME''',
|
r'''$.visitado.VDO_NOME''',
|
||||||
));
|
));
|
||||||
String? visitedVDOTipoStr(dynamic response) =>
|
String? visitedVDOTipoStr(dynamic response) => castToType<String>(getJsonField(
|
||||||
castToType<String>(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_TIPO''',
|
r'''$.visitado.VDO_TIPO''',
|
||||||
));
|
));
|
||||||
String? visitedVDOImeiStr(dynamic response) =>
|
String? visitedVDOImeiStr(dynamic response) => castToType<String>(getJsonField(
|
||||||
castToType<String>(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_IMEI''',
|
r'''$.visitado.VDO_IMEI''',
|
||||||
));
|
));
|
||||||
String? visitedVDODocumentoStr(dynamic response) =>
|
String? visitedVDODocumentoStr(dynamic response) => castToType<String>(getJsonField(
|
||||||
castToType<String>(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_DOCUMENTO''',
|
r'''$.visitado.VDO_DOCUMENTO''',
|
||||||
));
|
));
|
||||||
String? visitedVDOEmailStr(dynamic response) =>
|
String? visitedVDOEmailStr(dynamic response) => castToType<String>(getJsonField(
|
||||||
castToType<String>(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_EMAIL''',
|
r'''$.visitado.VDO_EMAIL''',
|
||||||
));
|
));
|
||||||
String? visitedVDOStatusWebStr(dynamic response) =>
|
String? visitedVDOStatusWebStr(dynamic response) => castToType<String>(getJsonField(
|
||||||
castToType<String>(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_STATUSWEB''',
|
r'''$.visitado.VDO_STATUSWEB''',
|
||||||
));
|
));
|
||||||
|
@ -1264,8 +1251,7 @@ class GetDadosCall {
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.DES_ID''',
|
r'''$.visitado.DES_ID''',
|
||||||
));
|
));
|
||||||
String? visitedVDoNotTerceirosStr(dynamic response) =>
|
String? visitedVDoNotTerceirosStr(dynamic response) => castToType<String>(getJsonField(
|
||||||
castToType<String>(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.visitado.VDO_NOTTERCEIROS''',
|
r'''$.visitado.VDO_NOTTERCEIROS''',
|
||||||
));
|
));
|
||||||
|
@ -1334,8 +1320,7 @@ class GetDadosCall {
|
||||||
.map((x) => castToType<String>(x))
|
.map((x) => castToType<String>(x))
|
||||||
.withoutNulls
|
.withoutNulls
|
||||||
.toList();
|
.toList();
|
||||||
List<String>? levelNACIndPermiteReentradaStrList(dynamic response) =>
|
List<String>? levelNACIndPermiteReentradaStrList(dynamic response) => (getJsonField(
|
||||||
(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.niveis[:].NAC_INDPERMITEREENTRADA''',
|
r'''$.niveis[:].NAC_INDPERMITEREENTRADA''',
|
||||||
true,
|
true,
|
||||||
|
@ -1353,8 +1338,7 @@ class GetDadosCall {
|
||||||
.map((x) => castToType<String>(x))
|
.map((x) => castToType<String>(x))
|
||||||
.withoutNulls
|
.withoutNulls
|
||||||
.toList();
|
.toList();
|
||||||
List<String>? levelNACTempoAntiCaronaStrList(dynamic response) =>
|
List<String>? levelNACTempoAntiCaronaStrList(dynamic response) => (getJsonField(
|
||||||
(getJsonField(
|
|
||||||
response,
|
response,
|
||||||
r'''$.niveis[:].NAC_TEMPOANTICARONA''',
|
r'''$.niveis[:].NAC_TEMPOANTICARONA''',
|
||||||
true,
|
true,
|
||||||
|
@ -1944,7 +1928,6 @@ class RespondeSolicitacaoCall {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class GetAccessCall {
|
class GetAccessCall {
|
||||||
Future<ApiCallResponse> call({
|
Future<ApiCallResponse> call({
|
||||||
final String? pageSize,
|
final String? pageSize,
|
||||||
|
@ -2195,6 +2178,7 @@ class GetAccessCall {
|
||||||
.withoutNulls
|
.withoutNulls
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
class GetLiberationsCall {
|
class GetLiberationsCall {
|
||||||
Stream<ApiCallResponse> call() {
|
Stream<ApiCallResponse> call() {
|
||||||
final String baseUrl = PhpGroup.getBaseUrl();
|
final String baseUrl = PhpGroup.getBaseUrl();
|
||||||
|
@ -2384,6 +2368,7 @@ class GetLiberationsCall {
|
||||||
.withoutNulls
|
.withoutNulls
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
class GetMessagesCall {
|
class GetMessagesCall {
|
||||||
Future<ApiCallResponse> call({
|
Future<ApiCallResponse> call({
|
||||||
final String? pageSize,
|
final String? pageSize,
|
||||||
|
|
|
@ -107,9 +107,7 @@ class ApiCallResponse {
|
||||||
final Object? exception;
|
final Object? exception;
|
||||||
bool get succeeded => statusCode >= 200 && statusCode < 300;
|
bool get succeeded => statusCode >= 200 && statusCode < 300;
|
||||||
String getHeader(String headerName) => headers[headerName] ?? '';
|
String getHeader(String headerName) => headers[headerName] ?? '';
|
||||||
String get bodyText =>
|
String get bodyText => response?.body ?? (jsonBody is String ? jsonBody as String : jsonEncode(jsonBody));
|
||||||
response?.body ??
|
|
||||||
(jsonBody is String ? jsonBody as String : jsonEncode(jsonBody));
|
|
||||||
String get exceptionMessage => exception.toString();
|
String get exceptionMessage => exception.toString();
|
||||||
|
|
||||||
static ApiCallResponse fromHttpResponse(
|
static ApiCallResponse fromHttpResponse(
|
||||||
|
@ -123,9 +121,7 @@ class ApiCallResponse {
|
||||||
if (bodyType == BodyType.BLOB) {
|
if (bodyType == BodyType.BLOB) {
|
||||||
jsonBody = response.bodyBytes;
|
jsonBody = response.bodyBytes;
|
||||||
} else {
|
} else {
|
||||||
final responseBody = decodeUtf8 && returnBody
|
final responseBody = decodeUtf8 && returnBody ? const Utf8Decoder().convert(response.bodyBytes) : response.body;
|
||||||
? const Utf8Decoder().convert(response.bodyBytes)
|
|
||||||
: response.body;
|
|
||||||
jsonBody = returnBody ? json.decode(responseBody) : null;
|
jsonBody = returnBody ? json.decode(responseBody) : null;
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
@ -137,8 +133,7 @@ class ApiCallResponse {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ApiCallResponse fromCloudCallResponse(Map<String, dynamic> response) =>
|
static ApiCallResponse fromCloudCallResponse(Map<String, dynamic> response) => ApiCallResponse(
|
||||||
ApiCallResponse(
|
|
||||||
response['body'],
|
response['body'],
|
||||||
ApiManager.toStringMap(response['headers'] ?? {}),
|
ApiManager.toStringMap(response['headers'] ?? {}),
|
||||||
response['statusCode'] ?? 400,
|
response['statusCode'] ?? 400,
|
||||||
|
@ -155,17 +150,14 @@ class ApiManager {
|
||||||
|
|
||||||
static String? _accessToken;
|
static String? _accessToken;
|
||||||
|
|
||||||
static void clearCache(String callName) => _apiCache.keys
|
static void clearCache(String callName) =>
|
||||||
.toSet()
|
_apiCache.keys.toSet().forEach((k) => k.callName == callName ? _apiCache.remove(k) : null);
|
||||||
.forEach((k) => k.callName == callName ? _apiCache.remove(k) : null);
|
|
||||||
|
|
||||||
static Map<String, String> toStringMap(Map map) =>
|
static Map<String, String> toStringMap(Map map) =>
|
||||||
map.map((key, value) => MapEntry(key.toString(), value.toString()));
|
map.map((key, value) => MapEntry(key.toString(), value.toString()));
|
||||||
|
|
||||||
static String asQueryParams(Map<String, dynamic> map) => map.entries
|
static String asQueryParams(Map<String, dynamic> map) =>
|
||||||
.map((e) =>
|
map.entries.map((e) => "${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value.toString())}").join('&');
|
||||||
"${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value.toString())}")
|
|
||||||
.join('&');
|
|
||||||
|
|
||||||
static Future<ApiCallResponse> urlRequest(
|
static Future<ApiCallResponse> urlRequest(
|
||||||
ApiCallType callType,
|
ApiCallType callType,
|
||||||
|
@ -179,14 +171,12 @@ class ApiManager {
|
||||||
BodyType? bodyType,
|
BodyType? bodyType,
|
||||||
}) async {
|
}) async {
|
||||||
if (params.isNotEmpty) {
|
if (params.isNotEmpty) {
|
||||||
final specifier =
|
final specifier = Uri.parse(apiUrl).queryParameters.isNotEmpty ? '&' : '?';
|
||||||
Uri.parse(apiUrl).queryParameters.isNotEmpty ? '&' : '?';
|
|
||||||
apiUrl = '$apiUrl$specifier${asQueryParams(params)}';
|
apiUrl = '$apiUrl$specifier${asQueryParams(params)}';
|
||||||
}
|
}
|
||||||
if (isStreamingApi) {
|
if (isStreamingApi) {
|
||||||
client ??= http.Client();
|
client ??= http.Client();
|
||||||
final request =
|
final request = http.Request(callType.toString().split('.').last, Uri.parse(apiUrl))
|
||||||
http.Request(callType.toString().split('.').last, Uri.parse(apiUrl))
|
|
||||||
..headers.addAll(toStringMap(headers));
|
..headers.addAll(toStringMap(headers));
|
||||||
final streamedResponse = await getStreamedResponse(request);
|
final streamedResponse = await getStreamedResponse(request);
|
||||||
return ApiCallResponse(
|
return ApiCallResponse(
|
||||||
|
@ -199,10 +189,8 @@ class ApiManager {
|
||||||
final makeRequest = callType == ApiCallType.GET
|
final makeRequest = callType == ApiCallType.GET
|
||||||
? (client != null ? client.get : http.get)
|
? (client != null ? client.get : http.get)
|
||||||
: (client != null ? client.delete : http.delete);
|
: (client != null ? client.delete : http.delete);
|
||||||
final response =
|
final response = await makeRequest(Uri.parse(apiUrl), headers: toStringMap(headers));
|
||||||
await makeRequest(Uri.parse(apiUrl), headers: toStringMap(headers));
|
return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType);
|
||||||
return ApiCallResponse.fromHttpResponse(
|
|
||||||
response, returnBody, decodeUtf8, bodyType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<ApiCallResponse> requestWithBody(
|
static Future<ApiCallResponse> requestWithBody(
|
||||||
|
@ -224,12 +212,10 @@ class ApiManager {
|
||||||
(alwaysAllowBody && type == ApiCallType.DELETE),
|
(alwaysAllowBody && type == ApiCallType.DELETE),
|
||||||
'Invalid ApiCallType $type for request with body',
|
'Invalid ApiCallType $type for request with body',
|
||||||
);
|
);
|
||||||
final postBody =
|
final postBody = createBody(headers, params, body, bodyType, encodeBodyUtf8);
|
||||||
createBody(headers, params, body, bodyType, encodeBodyUtf8);
|
|
||||||
if (isStreamingApi) {
|
if (isStreamingApi) {
|
||||||
client ??= http.Client();
|
client ??= http.Client();
|
||||||
final request =
|
final request = http.Request(type.toString().split('.').last, Uri.parse(apiUrl))
|
||||||
http.Request(type.toString().split('.').last, Uri.parse(apiUrl))
|
|
||||||
..headers.addAll(toStringMap(headers));
|
..headers.addAll(toStringMap(headers));
|
||||||
request.body = postBody;
|
request.body = postBody;
|
||||||
final streamedResponse = await getStreamedResponse(request);
|
final streamedResponse = await getStreamedResponse(request);
|
||||||
|
@ -242,8 +228,7 @@ class ApiManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bodyType == BodyType.MULTIPART) {
|
if (bodyType == BodyType.MULTIPART) {
|
||||||
return multipartRequest(type, apiUrl, headers, params, returnBody,
|
return multipartRequest(type, apiUrl, headers, params, returnBody, decodeUtf8, alwaysAllowBody, bodyType);
|
||||||
decodeUtf8, alwaysAllowBody, bodyType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final requestFn = {
|
final requestFn = {
|
||||||
|
@ -252,10 +237,8 @@ class ApiManager {
|
||||||
ApiCallType.PATCH: client != null ? client.patch : http.patch,
|
ApiCallType.PATCH: client != null ? client.patch : http.patch,
|
||||||
ApiCallType.DELETE: client != null ? client.delete : http.delete,
|
ApiCallType.DELETE: client != null ? client.delete : http.delete,
|
||||||
}[type]!;
|
}[type]!;
|
||||||
final response = await requestFn(Uri.parse(apiUrl),
|
final response = await requestFn(Uri.parse(apiUrl), headers: toStringMap(headers), body: postBody);
|
||||||
headers: toStringMap(headers), body: postBody);
|
return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType);
|
||||||
return ApiCallResponse.fromHttpResponse(
|
|
||||||
response, returnBody, decodeUtf8, bodyType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<ApiCallResponse> multipartRequest(
|
static Future<ApiCallResponse> multipartRequest(
|
||||||
|
@ -275,19 +258,14 @@ class ApiManager {
|
||||||
);
|
);
|
||||||
|
|
||||||
bool isFile(dynamic e) =>
|
bool isFile(dynamic e) =>
|
||||||
e is FFUploadedFile ||
|
e is FFUploadedFile || e is List<FFUploadedFile> || (e is List && e.firstOrNull is FFUploadedFile);
|
||||||
e is List<FFUploadedFile> ||
|
|
||||||
(e is List && e.firstOrNull is FFUploadedFile);
|
|
||||||
|
|
||||||
final nonFileParams = toStringMap(
|
final nonFileParams = toStringMap(Map.fromEntries(params.entries.where((e) => !isFile(e.value))));
|
||||||
Map.fromEntries(params.entries.where((e) => !isFile(e.value))));
|
|
||||||
|
|
||||||
List<http.MultipartFile> files = [];
|
List<http.MultipartFile> files = [];
|
||||||
params.entries.where((e) => isFile(e.value)).forEach((e) {
|
params.entries.where((e) => isFile(e.value)).forEach((e) {
|
||||||
final param = e.value;
|
final param = e.value;
|
||||||
final uploadedFiles = param is List
|
final uploadedFiles = param is List ? param as List<FFUploadedFile> : [param as FFUploadedFile];
|
||||||
? param as List<FFUploadedFile>
|
|
||||||
: [param as FFUploadedFile];
|
|
||||||
for (var uploadedFile in uploadedFiles) {
|
for (var uploadedFile in uploadedFiles) {
|
||||||
files.add(
|
files.add(
|
||||||
http.MultipartFile.fromBytes(
|
http.MultipartFile.fromBytes(
|
||||||
|
@ -300,15 +278,13 @@ class ApiManager {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final request = http.MultipartRequest(
|
final request = http.MultipartRequest(type.toString().split('.').last, Uri.parse(apiUrl))
|
||||||
type.toString().split('.').last, Uri.parse(apiUrl))
|
|
||||||
..headers.addAll(toStringMap(headers))
|
..headers.addAll(toStringMap(headers))
|
||||||
..files.addAll(files);
|
..files.addAll(files);
|
||||||
nonFileParams.forEach((key, value) => request.fields[key] = value);
|
nonFileParams.forEach((key, value) => request.fields[key] = value);
|
||||||
|
|
||||||
final response = await http.Response.fromStream(await request.send());
|
final response = await http.Response.fromStream(await request.send());
|
||||||
return ApiCallResponse.fromHttpResponse(
|
return ApiCallResponse.fromHttpResponse(response, returnBody, decodeUtf8, bodyType);
|
||||||
response, returnBody, decodeUtf8, bodyType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static MediaType? _getMediaType(String? filename) {
|
static MediaType? _getMediaType(String? filename) {
|
||||||
|
@ -357,13 +333,10 @@ class ApiManager {
|
||||||
case null:
|
case null:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (contentType != null &&
|
if (contentType != null && !headers.keys.any((h) => h.toLowerCase() == 'content-type')) {
|
||||||
!headers.keys.any((h) => h.toLowerCase() == 'content-type')) {
|
|
||||||
headers['Content-Type'] = contentType;
|
headers['Content-Type'] = contentType;
|
||||||
}
|
}
|
||||||
return encodeBodyUtf8 && postBody is String
|
return encodeBodyUtf8 && postBody is String ? utf8.encode(postBody) : postBody;
|
||||||
? utf8.encode(postBody)
|
|
||||||
: postBody;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<ApiCallResponse> call(ApiCallOptions options) => makeApiCall(
|
Future<ApiCallResponse> call(ApiCallOptions options) => makeApiCall(
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:http/http.dart';
|
import 'package:http/http.dart';
|
||||||
|
|
||||||
Future<StreamedResponse> getStreamedResponse(Request request) =>
|
Future<StreamedResponse> getStreamedResponse(Request request) => Client().send(request);
|
||||||
Client().send(request);
|
|
||||||
|
|
|
@ -16,8 +16,7 @@ Future<void> handleMessage(RemoteMessage message) async {
|
||||||
|
|
||||||
class FirebaseMessagingService {
|
class FirebaseMessagingService {
|
||||||
// Singleton instance
|
// Singleton instance
|
||||||
static final FirebaseMessagingService _instance =
|
static final FirebaseMessagingService _instance = FirebaseMessagingService._internal();
|
||||||
FirebaseMessagingService._internal();
|
|
||||||
|
|
||||||
// Factory constructor
|
// Factory constructor
|
||||||
factory FirebaseMessagingService() => _instance;
|
factory FirebaseMessagingService() => _instance;
|
||||||
|
@ -36,8 +35,7 @@ class FirebaseMessagingService {
|
||||||
_firebaseMessaging.pluginConstants;
|
_firebaseMessaging.pluginConstants;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<String> getToken() async =>
|
static Future<String> getToken() async => await FirebaseMessaging.instance.getToken() ?? '';
|
||||||
await FirebaseMessaging.instance.getToken() ?? '';
|
|
||||||
|
|
||||||
Future<void> updateDeviceToken() async {
|
Future<void> updateDeviceToken() async {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -15,7 +15,12 @@ Future<void> onMessageReceived(Map<String, dynamic> payload, String? extra, Stri
|
||||||
final localId = jsonDecode(payload['local']!)['CLI_ID'];
|
final localId = jsonDecode(payload['local']!)['CLI_ID'];
|
||||||
|
|
||||||
final cliUUID = StorageUtil().cliUUID;
|
final cliUUID = StorageUtil().cliUUID;
|
||||||
answersRequest({required BuildContext context, required String? ref, required String? task, required String? response, required String? id}) async {
|
answersRequest(
|
||||||
|
{required BuildContext context,
|
||||||
|
required String? ref,
|
||||||
|
required String? task,
|
||||||
|
required String? response,
|
||||||
|
required String? id}) async {
|
||||||
final ApiCallResponse? respondeSolicitacaoCall;
|
final ApiCallResponse? respondeSolicitacaoCall;
|
||||||
final RespondeSolicitacaoCall callback = PhpGroup.respondeSolicitacaoCall;
|
final RespondeSolicitacaoCall callback = PhpGroup.respondeSolicitacaoCall;
|
||||||
|
|
||||||
|
@ -137,7 +142,8 @@ Future<void> onMessageReceived(Map<String, dynamic> payload, String? extra, Stri
|
||||||
ptText: 'Mensagem',
|
ptText: 'Mensagem',
|
||||||
): payload['mensagem'],
|
): payload['mensagem'],
|
||||||
}),
|
}),
|
||||||
imagePath: 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${payload['documento'] ?? ''}&tipo=E',
|
imagePath:
|
||||||
|
'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=${payload['documento'] ?? ''}&tipo=E',
|
||||||
statusHashMap: [
|
statusHashMap: [
|
||||||
{
|
{
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
@ -169,7 +175,8 @@ Future<void> onMessageReceived(Map<String, dynamic> payload, String? extra, Stri
|
||||||
return Dialog(
|
return Dialog(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
child: DetailsComponentWidget(
|
child: DetailsComponentWidget(
|
||||||
imagePath: 'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=$id&tipo=$type',
|
imagePath:
|
||||||
|
'https://freaccess.com.br/freaccess/getImage.php?cliID=$cliUUID&atividade=getFoto&Documento=$id&tipo=$type',
|
||||||
labelsHashMap: Map<String, String>.from({
|
labelsHashMap: Map<String, String>.from({
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Name',
|
enText: 'Name',
|
||||||
|
@ -272,7 +279,11 @@ class NotificationService {
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
await AwesomeNotifications().setListeners(onActionReceivedMethod: onActionReceivedMethod, onNotificationCreatedMethod: onNotificationCreatedMethod, onNotificationDisplayedMethod: onNotificationDisplayedMethod, onDismissActionReceivedMethod: onDismissActionReceivedMethod);
|
await AwesomeNotifications().setListeners(
|
||||||
|
onActionReceivedMethod: onActionReceivedMethod,
|
||||||
|
onNotificationCreatedMethod: onNotificationCreatedMethod,
|
||||||
|
onNotificationDisplayedMethod: onNotificationDisplayedMethod,
|
||||||
|
onDismissActionReceivedMethod: onDismissActionReceivedMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> onActionReceivedMethod(ReceivedAction receivedAction) async {
|
static Future<void> onActionReceivedMethod(ReceivedAction receivedAction) async {
|
||||||
|
@ -317,6 +328,11 @@ class NotificationService {
|
||||||
badge: 0,
|
badge: 0,
|
||||||
),
|
),
|
||||||
actionButtons: actionButtons,
|
actionButtons: actionButtons,
|
||||||
schedule: scheduled ? NotificationInterval(interval: Duration(seconds: interval!), timeZone: await AwesomeNotifications().getLocalTimeZoneIdentifier(), preciseAlarm: true) : null);
|
schedule: scheduled
|
||||||
|
? NotificationInterval(
|
||||||
|
interval: Duration(seconds: interval!),
|
||||||
|
timeZone: await AwesomeNotifications().getLocalTimeZoneIdentifier(),
|
||||||
|
preciseAlarm: true)
|
||||||
|
: null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,7 @@ extension FFEnumExtensions<T extends Enum> on T {
|
||||||
}
|
}
|
||||||
|
|
||||||
extension FFEnumListExtensions<T extends Enum> on Iterable<T> {
|
extension FFEnumListExtensions<T extends Enum> on Iterable<T> {
|
||||||
T? deserialize(String? value) =>
|
T? deserialize(String? value) => firstWhereOrNull((e) => e.serialize() == value);
|
||||||
firstWhereOrNull((e) => e.serialize() == value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
T? deserializeEnum<T>(String? value) {
|
T? deserializeEnum<T>(String? value) {
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
// ignore_for_file: unnecessary_getters_setters
|
// ignore_for_file: unnecessary_getters_setters
|
||||||
|
|
||||||
|
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
|
||||||
import 'index.dart';
|
import 'index.dart';
|
||||||
|
|
||||||
|
|
||||||
class DeviceStruct extends BaseStruct {
|
class DeviceStruct extends BaseStruct {
|
||||||
DeviceStruct({
|
DeviceStruct({
|
||||||
String? devUUID,
|
String? devUUID,
|
||||||
|
@ -67,8 +65,7 @@ class DeviceStruct extends BaseStruct {
|
||||||
),
|
),
|
||||||
}.withoutNulls;
|
}.withoutNulls;
|
||||||
|
|
||||||
static DeviceStruct fromSerializableMap(Map<String, dynamic> data) =>
|
static DeviceStruct fromSerializableMap(Map<String, dynamic> data) => DeviceStruct(
|
||||||
DeviceStruct(
|
|
||||||
devUUID: deserializeParam(
|
devUUID: deserializeParam(
|
||||||
data['devUUID'],
|
data['devUUID'],
|
||||||
ParamType.String,
|
ParamType.String,
|
||||||
|
@ -98,8 +95,7 @@ class DeviceStruct extends BaseStruct {
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode => const ListEquality().hash([devUUID, version, description]);
|
||||||
const ListEquality().hash([devUUID, version, description]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceStruct createDeviceStruct({
|
DeviceStruct createDeviceStruct({
|
||||||
|
|
|
@ -6,13 +6,10 @@ import 'package:hub/backend/schema/enums/enums.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/flutter_flow/nav/serialization_util.dart';
|
import 'package:hub/flutter_flow/nav/serialization_util.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export 'package:collection/collection.dart' show ListEquality;
|
export 'package:collection/collection.dart' show ListEquality;
|
||||||
export 'package:flutter/material.dart' show Color, Colors;
|
export 'package:flutter/material.dart' show Color, Colors;
|
||||||
export 'package:from_css_color/from_css_color.dart';
|
export 'package:from_css_color/from_css_color.dart';
|
||||||
|
|
||||||
|
|
||||||
typedef StructBuilder<T> = T Function(Map<String, dynamic> data);
|
typedef StructBuilder<T> = T Function(Map<String, dynamic> data);
|
||||||
|
|
||||||
abstract class BaseStruct {
|
abstract class BaseStruct {
|
||||||
|
@ -39,8 +36,7 @@ dynamic deserializeStructParam<T>(
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return paramValues
|
return paramValues
|
||||||
.map<T>((e) => deserializeStructParam<T>(e, paramType, false,
|
.map<T>((e) => deserializeStructParam<T>(e, paramType, false, structBuilder: structBuilder))
|
||||||
structBuilder: structBuilder))
|
|
||||||
.toList();
|
.toList();
|
||||||
} else if (param is Map<String, dynamic>) {
|
} else if (param is Map<String, dynamic>) {
|
||||||
return structBuilder(param);
|
return structBuilder(param);
|
||||||
|
@ -58,16 +54,9 @@ List<T>? getStructList<T>(
|
||||||
dynamic value,
|
dynamic value,
|
||||||
StructBuilder<T> structBuilder,
|
StructBuilder<T> structBuilder,
|
||||||
) =>
|
) =>
|
||||||
value is! List
|
value is! List ? null : value.whereType<Map<String, dynamic>>().map((e) => structBuilder(e)).toList();
|
||||||
? null
|
|
||||||
: value
|
|
||||||
.whereType<Map<String, dynamic>>()
|
|
||||||
.map((e) => structBuilder(e))
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
List<T>? getEnumList<T>(dynamic value) => value is! List
|
List<T>? getEnumList<T>(dynamic value) => value is! List ? null : value.map((e) => deserializeEnum<T>(e)).withoutNulls;
|
||||||
? null
|
|
||||||
: value.map((e) => deserializeEnum<T>(e)).withoutNulls;
|
|
||||||
|
|
||||||
Color? getSchemaColor(dynamic value) => value is String
|
Color? getSchemaColor(dynamic value) => value is String
|
||||||
? fromCssColor(value)
|
? fromCssColor(value)
|
||||||
|
@ -75,8 +64,6 @@ Color? getSchemaColor(dynamic value) => value is String
|
||||||
? value
|
? value
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
List<Color>? getColorsList(dynamic value) =>
|
List<Color>? getColorsList(dynamic value) => value is! List ? null : value.map(getSchemaColor).withoutNulls;
|
||||||
value is! List ? null : value.map(getSchemaColor).withoutNulls;
|
|
||||||
|
|
||||||
List<T>? getDataList<T>(dynamic value) =>
|
List<T>? getDataList<T>(dynamic value) => value is! List ? null : value.map((e) => castToType<T>(e)!).toList();
|
||||||
value is! List ? null : value.map((e) => castToType<T>(e)!).toList();
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ import 'package:hub/shared/utils/storage_util.dart';
|
||||||
import '../../../shared/extensions/dialog_extensions.dart';
|
import '../../../shared/extensions/dialog_extensions.dart';
|
||||||
import '../../../shared/services/localization/localization_service.dart';
|
import '../../../shared/services/localization/localization_service.dart';
|
||||||
|
|
||||||
|
|
||||||
class MenuButtonWidget extends MenuEntry {
|
class MenuButtonWidget extends MenuEntry {
|
||||||
const MenuButtonWidget({
|
const MenuButtonWidget({
|
||||||
super.key,
|
super.key,
|
||||||
|
@ -32,7 +31,6 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
get action => action;
|
get action => action;
|
||||||
bool _isProcessing = false;
|
bool _isProcessing = false;
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
|
@ -40,7 +38,9 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: _isProcessing ? null : () async {
|
onTap: _isProcessing
|
||||||
|
? null
|
||||||
|
: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isProcessing = true;
|
_isProcessing = true;
|
||||||
});
|
});
|
||||||
|
@ -110,8 +110,7 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
GoogleFonts.asMap().containsKey('Nunito'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -36,7 +36,9 @@ class _MenuCardItemState extends State<MenuCardItem> {
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: _isProcessing ? null : () async {
|
onTap: _isProcessing
|
||||||
|
? null
|
||||||
|
: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isProcessing = true;
|
_isProcessing = true;
|
||||||
});
|
});
|
||||||
|
@ -61,8 +63,7 @@ class _MenuCardItemState extends State<MenuCardItem> {
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 10.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 10.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
|
|
|
@ -6,12 +6,7 @@ class AtomImageSvgTheme extends StatelessWidget {
|
||||||
final double width;
|
final double width;
|
||||||
final double height;
|
final double height;
|
||||||
|
|
||||||
const AtomImageSvgTheme({
|
const AtomImageSvgTheme({super.key, required this.filename, required this.width, required this.height});
|
||||||
super.key,
|
|
||||||
required this.filename,
|
|
||||||
required this.width,
|
|
||||||
required this.height
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -21,5 +16,4 @@ class AtomImageSvgTheme extends StatelessWidget {
|
||||||
|
|
||||||
return SvgPicture.asset(path, width: width, height: height);
|
return SvgPicture.asset(path, width: width, height: height);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
@ -66,8 +65,7 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
fontSize: 32.0,
|
fontSize: 32.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||||
FlutterFlowTheme.of(context).headlineLargeFamily),
|
|
||||||
),
|
),
|
||||||
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
@ -90,27 +88,19 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
child!,
|
child!,
|
||||||
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
headerTextStyle:
|
headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
|
||||||
FlutterFlowTheme.of(context).headlineLarge.override(
|
fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).headlineLargeFamily,
|
|
||||||
fontSize: 32.0,
|
fontSize: 32.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||||
FlutterFlowTheme.of(context).headlineLargeFamily),
|
|
||||||
),
|
),
|
||||||
pickerBackgroundColor:
|
pickerBackgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
pickerForegroundColor: FlutterFlowTheme.of(context).info,
|
pickerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
selectedDateTimeBackgroundColor:
|
selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
FlutterFlowTheme.of(context).primary,
|
selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
selectedDateTimeForegroundColor:
|
pickerDialForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
FlutterFlowTheme.of(context).info,
|
actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
pickerDialForegroundColor:
|
|
||||||
FlutterFlowTheme.of(context).primaryText,
|
|
||||||
actionButtonForegroundColor:
|
|
||||||
FlutterFlowTheme.of(context).primaryText,
|
|
||||||
iconSize: 24.0,
|
iconSize: 24.0,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -167,8 +157,7 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: widget.controller,
|
controller: widget.controller,
|
||||||
focusNode: widget.focusNode,
|
focusNode: widget.focusNode,
|
||||||
|
@ -178,26 +167,20 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintText: widget.hintText,
|
hintText: widget.hintText,
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
lineHeight: 1.0,
|
lineHeight: 1.0,
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
|
@ -234,11 +217,9 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
lineHeight: 1.8,
|
lineHeight: 1.8,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
|
@ -246,8 +227,7 @@ class _CustomDatePickerState extends State<CustomDatePickerUtil> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_drop_down.dart';
|
import 'package:hub/flutter_flow/flutter_flow_drop_down.dart';
|
||||||
|
@ -50,8 +49,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: 48.0,
|
height: 48.0,
|
||||||
|
@ -65,14 +63,11 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
isMultiSelect: false,
|
isMultiSelect: false,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
textStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
hintText: widget.hintText,
|
hintText: widget.hintText,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
@ -84,8 +79,7 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
borderColor: FlutterFlowTheme.of(context).customColor6,
|
borderColor: FlutterFlowTheme.of(context).customColor6,
|
||||||
borderWidth: 0.5,
|
borderWidth: 0.5,
|
||||||
borderRadius: 10.0,
|
borderRadius: 10.0,
|
||||||
margin: const EdgeInsetsDirectional.fromSTEB(
|
margin: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 16.0, 0.0),
|
||||||
12.0, 0.0, 16.0, 0.0),
|
|
||||||
hidesUnderline: true,
|
hidesUnderline: true,
|
||||||
isOverButton: true,
|
isOverButton: true,
|
||||||
isSearchable: false,
|
isSearchable: false,
|
||||||
|
@ -98,31 +92,24 @@ class _CustomSelectState extends State<CustomSelect> {
|
||||||
if (widget.isRequired)
|
if (widget.isRequired)
|
||||||
if (widget.dropDownValue == null || widget.dropDownValue == '')
|
if (widget.dropDownValue == null || widget.dropDownValue == '')
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.only(top: 5, start: 15),
|
||||||
const EdgeInsetsDirectional.only(top: 5, start: 15),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'This field is required',
|
enText: 'This field is required',
|
||||||
ptText: 'Este campo é obrigatório',
|
ptText: 'Este campo é obrigatório',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||||
.bodySmall
|
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodySmallFamily,
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).customColor6,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||||
.bodySmallFamily),
|
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -36,8 +36,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (widget.uploadedFiles != null &&
|
if (widget.uploadedFiles != null && widget.uploadedFiles!.bytes!.isNotEmpty) {
|
||||||
widget.uploadedFiles!.bytes!.isNotEmpty) {
|
|
||||||
{
|
{
|
||||||
return InkWell(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
@ -47,8 +46,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.isUploading = false;
|
widget.isUploading = false;
|
||||||
widget.uploadedFiles =
|
widget.uploadedFiles = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
|
||||||
widget.onUploadComplete(widget.uploadedFiles!);
|
widget.onUploadComplete(widget.uploadedFiles!);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -70,8 +68,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final selectedMedia =
|
final selectedMedia = await selectMediaWithSourceBottomSheet(
|
||||||
await selectMediaWithSourceBottomSheet(
|
|
||||||
context: context,
|
context: context,
|
||||||
imageQuality: 100,
|
imageQuality: 100,
|
||||||
allowPhoto: true,
|
allowPhoto: true,
|
||||||
|
@ -83,9 +80,7 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final message = FFLocalizations.of(context)
|
final message = FFLocalizations.of(context)
|
||||||
.getVariableText(
|
.getVariableText(enText: 'Uploading file...', ptText: 'Enviando arquivo...');
|
||||||
enText: 'Uploading file...',
|
|
||||||
ptText: 'Enviando arquivo...');
|
|
||||||
showUploadMessage(
|
showUploadMessage(
|
||||||
context,
|
context,
|
||||||
message,
|
message,
|
||||||
|
@ -104,22 +99,18 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
widget.isUploading = false;
|
widget.isUploading = false;
|
||||||
}
|
}
|
||||||
if (selectedUploadedFiles.length ==
|
if (selectedUploadedFiles.length == selectedMedia.length) {
|
||||||
selectedMedia.length) {
|
|
||||||
setState(() {
|
setState(() {
|
||||||
widget.uploadedFiles = selectedUploadedFiles.first;
|
widget.uploadedFiles = selectedUploadedFiles.first;
|
||||||
});
|
});
|
||||||
widget.onUploadComplete(widget.uploadedFiles!);
|
widget.onUploadComplete(widget.uploadedFiles!);
|
||||||
final message = FFLocalizations.of(context)
|
final message =
|
||||||
.getVariableText(
|
FFLocalizations.of(context).getVariableText(enText: 'Success!', ptText: 'Sucesso!');
|
||||||
enText: 'Success!', ptText: 'Sucesso!');
|
|
||||||
showUploadMessage(context, message);
|
showUploadMessage(context, message);
|
||||||
} else {
|
} else {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
final message = FFLocalizations.of(context)
|
final message = FFLocalizations.of(context)
|
||||||
.getVariableText(
|
.getVariableText(enText: 'Failed to upload data', ptText: 'Falha ao enviar dados');
|
||||||
enText: 'Failed to upload data',
|
|
||||||
ptText: 'Falha ao enviar dados');
|
|
||||||
showUploadMessage(context, message);
|
showUploadMessage(context, message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -134,21 +125,16 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 120.0,
|
height: 120.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 20.0),
|
||||||
0.0, 0.0, 0.0, 20.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(14.0, 0.0, 0.0, 20.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
14.0, 0.0, 0.0, 20.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
.titleSmall
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
@ -161,17 +147,15 @@ class _MediaUploadButtonUtilState extends State<MediaUploadButtonUtil> {
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 65.0, 10.0, 0.0),
|
||||||
10.0, 65.0, 10.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.labelText,
|
widget.labelText,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -8,7 +8,8 @@ class SubmitButtonUtil extends StatelessWidget {
|
||||||
final String labelText;
|
final String labelText;
|
||||||
Future Function()? onPressed;
|
Future Function()? onPressed;
|
||||||
|
|
||||||
SubmitButtonUtil({super.key,
|
SubmitButtonUtil({
|
||||||
|
super.key,
|
||||||
required this.labelText,
|
required this.labelText,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
});
|
});
|
||||||
|
@ -29,8 +30,7 @@ class SubmitButtonUtil extends StatelessWidget {
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
.containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
|
||||||
),
|
),
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
@ -41,8 +40,7 @@ class TabViewUtil extends StatelessWidget {
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleMediumFamily,
|
||||||
fontSize: 13.0,
|
fontSize: 13.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleMediumFamily),
|
||||||
FlutterFlowTheme.of(context).titleMediumFamily),
|
|
||||||
),
|
),
|
||||||
unselectedLabelStyle: const TextStyle(),
|
unselectedLabelStyle: const TextStyle(),
|
||||||
indicatorColor: FlutterFlowTheme.of(context).primary,
|
indicatorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
|
|
@ -2,9 +2,7 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'text_field_component_widget.dart' show TextFieldComponentWidget;
|
import 'text_field_component_widget.dart' show TextFieldComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class TextFieldComponentModel extends FlutterFlowModel<TextFieldComponentWidget> {
|
||||||
class TextFieldComponentModel
|
|
||||||
extends FlutterFlowModel<TextFieldComponentWidget> {
|
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
// State field(s) for TextField widget.
|
// State field(s) for TextField widget.
|
||||||
|
|
|
@ -7,7 +7,6 @@ export 'text_field_component_model.dart';
|
||||||
|
|
||||||
////
|
////
|
||||||
|
|
||||||
|
|
||||||
class TextFieldComponentWidget extends StatefulWidget {
|
class TextFieldComponentWidget extends StatefulWidget {
|
||||||
const TextFieldComponentWidget({
|
const TextFieldComponentWidget({
|
||||||
super.key,
|
super.key,
|
||||||
|
@ -21,8 +20,7 @@ class TextFieldComponentWidget extends StatefulWidget {
|
||||||
final String? hintTextStrParam;
|
final String? hintTextStrParam;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<TextFieldComponentWidget> createState() =>
|
State<TextFieldComponentWidget> createState() => _TextFieldComponentWidgetState();
|
||||||
_TextFieldComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
||||||
|
@ -39,8 +37,7 @@ class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => TextFieldComponentModel());
|
_model = createModel(context, () => TextFieldComponentModel());
|
||||||
|
|
||||||
_model.textController ??=
|
_model.textController ??= TextEditingController(text: widget.initialValueStrParam);
|
||||||
TextEditingController(text: widget.initialValueStrParam);
|
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,16 +63,14 @@ class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintText: widget.hintTextStrParam,
|
hintText: widget.hintTextStrParam,
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -110,8 +105,7 @@ class _TextFieldComponentWidgetState extends State<TextFieldComponentWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
validator: _model.textControllerValidator.asValidator(context),
|
validator: _model.textControllerValidator.asValidator(context),
|
||||||
),
|
),
|
||||||
|
|
|
@ -18,8 +18,7 @@ class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
||||||
// State field(s) for CheckboxGroup widget.
|
// State field(s) for CheckboxGroup widget.
|
||||||
FormFieldController<List<String>>? checkboxGroupValueController;
|
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||||
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||||
set checkboxGroupValues(List<String>? v) =>
|
set checkboxGroupValues(List<String>? v) => checkboxGroupValueController?.value = v;
|
||||||
checkboxGroupValueController?.value = v;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
|
@ -44,12 +44,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
|
|
||||||
selected = {
|
selected = {
|
||||||
'personType': widget.defaultPersonType == '.*'
|
'personType': widget.defaultPersonType == '.*' ? ['E', 'O'] : [widget.defaultPersonType],
|
||||||
? ['E', 'O']
|
'accessType': widget.defaultAccessType == '.*' ? ['0', '1'] : [widget.defaultAccessType],
|
||||||
: [widget.defaultPersonType],
|
|
||||||
'accessType': widget.defaultAccessType == '.*'
|
|
||||||
? ['0', '1']
|
|
||||||
: [widget.defaultAccessType],
|
|
||||||
'search': '.*',
|
'search': '.*',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -58,9 +54,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
Map<String, String> filterResult = {
|
Map<String, String> filterResult = {
|
||||||
'personType': '',
|
'personType': '',
|
||||||
'accessType': '',
|
'accessType': '',
|
||||||
'search': _model.textController?.text == ''
|
'search': _model.textController?.text == '' ? '.*' : _model.textController!.text.toLowerCase(),
|
||||||
? '.*'
|
|
||||||
: _model.textController!.text.toLowerCase(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (selected['personType']!.isEmpty) {
|
if (selected['personType']!.isEmpty) {
|
||||||
|
@ -83,8 +77,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
context.pop(filterResult);
|
context.pop(filterResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCheckboxListTile(
|
Widget _buildCheckboxListTile(String key, List<Map<String, String>> options, double fontsize) {
|
||||||
String key, List<Map<String, String>> options, double fontsize) {
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
|
@ -100,8 +93,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: fontsize,
|
fontSize: fontsize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -121,8 +113,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: fontsize,
|
fontSize: fontsize,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -149,8 +140,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
width: 5,
|
width: 5,
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
),
|
),
|
||||||
controlAffinity:
|
controlAffinity: ListTileControlAffinity.leading, // Adiciona esta linha
|
||||||
ListTileControlAffinity.leading, // Adiciona esta linha
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -193,22 +183,17 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0),
|
||||||
10.0, 10.0, 0.0, 10.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context)
|
FFLocalizations.of(context).getText('yfj9pd6k'), // Filtros
|
||||||
.getText('yfj9pd6k'), // Filtros
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
style:
|
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||||
FlutterFlowTheme.of(context).headlineMedium.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.headlineMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 18.0,
|
fontSize: 18.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||||
.headlineMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -221,8 +206,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildCheckboxListTile(
|
_buildCheckboxListTile('personType', personTypeOptions, 14),
|
||||||
'personType', personTypeOptions, 14),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -3,8 +3,6 @@ import '/flutter_flow/form_field_controller.dart';
|
||||||
import 'opt_modal_widget.dart' show OptModalWidget;
|
import 'opt_modal_widget.dart' show OptModalWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
|
@ -19,8 +17,7 @@ class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
||||||
// State field(s) for CheckboxGroup widget.
|
// State field(s) for CheckboxGroup widget.
|
||||||
FormFieldController<List<String>>? checkboxGroupValueController;
|
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||||
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||||
set checkboxGroupValues(List<String>? v) =>
|
set checkboxGroupValues(List<String>? v) => checkboxGroupValueController?.value = v;
|
||||||
checkboxGroupValueController?.value = v;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
|
@ -49,12 +49,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
|
|
||||||
selected = {
|
selected = {
|
||||||
'personType': widget.defaultPersonType == '.*'
|
'personType': widget.defaultPersonType == '.*' ? ['E', 'O'] : [widget.defaultPersonType],
|
||||||
? ['E', 'O']
|
'accessType': widget.defaultAccessType == '.*' ? ['0', '1'] : [widget.defaultAccessType],
|
||||||
: [widget.defaultPersonType],
|
|
||||||
'accessType': widget.defaultAccessType == '.*'
|
|
||||||
? ['0', '1']
|
|
||||||
: [widget.defaultAccessType],
|
|
||||||
'search': '.*',
|
'search': '.*',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -63,9 +59,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
Map<String, String> filterResult = {
|
Map<String, String> filterResult = {
|
||||||
'personType': '',
|
'personType': '',
|
||||||
'accessType': '',
|
'accessType': '',
|
||||||
'search': _model.textController?.text == ''
|
'search': _model.textController?.text == '' ? '.*' : _model.textController!.text.toLowerCase(),
|
||||||
? '.*'
|
|
||||||
: _model.textController!.text.toLowerCase(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (selected['personType']!.isEmpty) {
|
if (selected['personType']!.isEmpty) {
|
||||||
|
@ -96,17 +90,14 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('l7tw8b92'),
|
FFLocalizations.of(context).getText('l7tw8b92'),
|
||||||
textAlign: TextAlign
|
textAlign: TextAlign.left, // Adiciona esta linha para alinhar o texto à esquerda
|
||||||
.left, // Adiciona esta linha para alinhar o texto à esquerda
|
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -124,8 +115,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -152,8 +142,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
width: 10,
|
width: 10,
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
),
|
),
|
||||||
controlAffinity:
|
controlAffinity: ListTileControlAffinity.leading, // Adiciona esta linha
|
||||||
ListTileControlAffinity.leading, // Adiciona esta linha
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -198,30 +187,23 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0),
|
||||||
10.0, 10.0, 0.0, 10.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context)
|
FFLocalizations.of(context).getText('yfj9pd6k'), // Filtros
|
||||||
.getText('yfj9pd6k'), // Filtros
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
style: FlutterFlowTheme.of(context)
|
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||||
.headlineMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.headlineMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||||
.headlineMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController,
|
controller: _model.textController,
|
||||||
focusNode: _model.textFieldFocusNode,
|
focusNode: _model.textFieldFocusNode,
|
||||||
|
@ -232,27 +214,19 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'0enrtljz' /* Pesquise aqui..... */,
|
'0enrtljz' /* Pesquise aqui..... */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -289,14 +263,12 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
validator:
|
validator: _model.textControllerValidator.asValidator(context),
|
||||||
_model.textControllerValidator.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SingleChildScrollView(
|
SingleChildScrollView(
|
||||||
|
@ -305,10 +277,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildCheckboxListTile(
|
_buildCheckboxListTile('personType', personTypeOptions),
|
||||||
'personType', personTypeOptions),
|
_buildCheckboxListTile('accessType', accessTypeOptions),
|
||||||
_buildCheckboxListTile(
|
|
||||||
'accessType', accessTypeOptions),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -319,8 +289,7 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
foregroundColor: FlutterFlowTheme.of(context).info,
|
foregroundColor: FlutterFlowTheme.of(context).info,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
),
|
),
|
||||||
child:
|
child: Text(FFLocalizations.of(context).getText('88kshkph')),
|
||||||
Text(FFLocalizations.of(context).getText('88kshkph')),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import 'package:hub/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
import 'package:hub/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class OptionSelectionModalModel
|
class OptionSelectionModalModel extends FlutterFlowModel<OptionSelectionModalWidget> {
|
||||||
extends FlutterFlowModel<OptionSelectionModalWidget> {
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,10 @@ class OptionSelectionModalWidget extends StatefulWidget {
|
||||||
final List<String>? nameListStr;
|
final List<String>? nameListStr;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<OptionSelectionModalWidget> createState() =>
|
State<OptionSelectionModalWidget> createState() => _OptionSelectionModalWidgetState();
|
||||||
_OptionSelectionModalWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget> with TickerProviderStateMixin {
|
||||||
with TickerProviderStateMixin {
|
|
||||||
late OptionSelectionModalModel _model;
|
late OptionSelectionModalModel _model;
|
||||||
|
|
||||||
final animationsMap = <String, AnimationInfo>{};
|
final animationsMap = <String, AnimationInfo>{};
|
||||||
|
@ -92,17 +90,14 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
context.pop();
|
context.pop();
|
||||||
if (widget.routesListStr![optionsListIndex] ==
|
if (widget.routesListStr![optionsListIndex] == 'scheduleCompleteVisitPage') {
|
||||||
'scheduleCompleteVisitPage') {
|
|
||||||
// Navegação para a página ScheduleCompleteVisitPage com queryParameters
|
// Navegação para a página ScheduleCompleteVisitPage com queryParameters
|
||||||
context.go(
|
context.go(
|
||||||
'/scheduleCompleteVisitPage',
|
'/scheduleCompleteVisitPage',
|
||||||
extra: {
|
extra: {
|
||||||
'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss')
|
'visitStartDateStr': DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now()),
|
||||||
.format(DateTime.now()),
|
'visitEndDateStr':
|
||||||
'visitEndDateStr': DateFormat('yyyy-MM-dd HH:mm:ss')
|
DateFormat('yyyy-MM-dd HH:mm:ss').format(DateTime.now().add(const Duration(days: 1))),
|
||||||
.format(
|
|
||||||
DateTime.now().add(const Duration(days: 1))),
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -149,27 +144,20 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
8.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 30.0,
|
width: 30.0,
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
.primaryBackground,
|
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
alignment: const AlignmentDirectional(
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
0.0, 0.0),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
widget.iconsListIcon![
|
widget.iconsListIcon![optionsListIndex]!,
|
||||||
optionsListIndex]!,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.accent1,
|
|
||||||
size: 34.0,
|
size: 34.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -186,21 +174,16 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.nameListStr![optionsListIndex],
|
widget.nameListStr![optionsListIndex],
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||||
.titleLarge
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.primaryText,
|
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
.containsKey('Nunito'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -3,10 +3,7 @@ import '/flutter_flow/form_field_controller.dart';
|
||||||
import 'order_filter_modal_widget.dart' show OrderFilterModalWidget;
|
import 'order_filter_modal_widget.dart' show OrderFilterModalWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class OrderFilterModalModel extends FlutterFlowModel<OrderFilterModalWidget> {
|
class OrderFilterModalModel extends FlutterFlowModel<OrderFilterModalWidget> {
|
||||||
|
|
||||||
// State field(s) for TextField widget.
|
// State field(s) for TextField widget.
|
||||||
FocusNode? textFieldFocusNode;
|
FocusNode? textFieldFocusNode;
|
||||||
TextEditingController? textController;
|
TextEditingController? textController;
|
||||||
|
@ -18,8 +15,7 @@ class OrderFilterModalModel extends FlutterFlowModel<OrderFilterModalWidget> {
|
||||||
// State field(s) for CheckboxGroup widget.
|
// State field(s) for CheckboxGroup widget.
|
||||||
FormFieldController<List<String>>? checkboxGroupValueController;
|
FormFieldController<List<String>>? checkboxGroupValueController;
|
||||||
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
List<String>? get checkboxGroupValues => checkboxGroupValueController?.value;
|
||||||
set checkboxGroupValues(List<String>? v) =>
|
set checkboxGroupValues(List<String>? v) => checkboxGroupValueController?.value = v;
|
||||||
checkboxGroupValueController?.value = v;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
|
@ -28,26 +28,22 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
late Map<String, dynamic> selected;
|
late Map<String, dynamic> selected;
|
||||||
final List<Map<String, String>> adresseeTypeOptions = [
|
final List<Map<String, String>> adresseeTypeOptions = [
|
||||||
{
|
{
|
||||||
'title': FFLocalizations.of(StorageUtil().context!)
|
'title': FFLocalizations.of(StorageUtil().context!).getVariableText(enText: 'Resident', ptText: 'Morador'),
|
||||||
.getVariableText(enText: 'Resident', ptText: 'Morador'),
|
|
||||||
'value': 'MOR'
|
'value': 'MOR'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': FFLocalizations.of(StorageUtil().context!)
|
'title': FFLocalizations.of(StorageUtil().context!).getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
||||||
.getVariableText(enText: 'Property', ptText: 'Propriedade'),
|
|
||||||
'value': 'PRO'
|
'value': 'PRO'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
final List<Map<String, String>> statusOptions = [
|
final List<Map<String, String>> statusOptions = [
|
||||||
{
|
{
|
||||||
'title': FFLocalizations.of(StorageUtil().context!)
|
'title': FFLocalizations.of(StorageUtil().context!)
|
||||||
.getVariableText(
|
.getVariableText(ptText: 'Aguardando Retirada', enText: 'Waiting for Pickup'),
|
||||||
ptText: 'Aguardando Retirada', enText: 'Waiting for Pickup'),
|
|
||||||
'value': 'notPickedUp'
|
'value': 'notPickedUp'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': FFLocalizations.of(StorageUtil().context!)
|
'title': FFLocalizations.of(StorageUtil().context!).getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
|
||||||
.getVariableText(ptText: 'Retirado', enText: 'Picked Up'),
|
|
||||||
'value': 'pickedUp'
|
'value': 'pickedUp'
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -65,12 +61,8 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
_model = createModel(context, () => OrderFilterModalModel());
|
_model = createModel(context, () => OrderFilterModalModel());
|
||||||
|
|
||||||
selected = {
|
selected = {
|
||||||
'adresseeType': widget.defaultAdresseeType == '.*'
|
'adresseeType': widget.defaultAdresseeType == '.*' ? ['MOR', 'PRO'] : [widget.defaultAdresseeType],
|
||||||
? ['MOR', 'PRO']
|
'status': widget.defaultStatus == '.*' ? ['notPickedUp', 'pickedUp'] : [widget.defaultStatus],
|
||||||
: [widget.defaultAdresseeType],
|
|
||||||
'status': widget.defaultStatus == '.*'
|
|
||||||
? ['notPickedUp', 'pickedUp']
|
|
||||||
: [widget.defaultStatus],
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,8 +92,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
context.pop(filterResult);
|
context.pop(filterResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCheckboxListTile(
|
Widget _buildCheckboxListTile(String key, List<Map<String, String>> options, double fontsize) {
|
||||||
String key, List<Map<String, String>> options, double fontsize) {
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
|
@ -117,8 +108,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
fontSize: fontsize,
|
fontSize: fontsize,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -138,8 +128,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: fontsize,
|
fontSize: fontsize,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -167,8 +156,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
width: 5,
|
width: 5,
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
),
|
),
|
||||||
controlAffinity:
|
controlAffinity: ListTileControlAffinity.leading, // Adiciona esta linha
|
||||||
ListTileControlAffinity.leading, // Adiciona esta linha
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -197,22 +185,17 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 10.0),
|
||||||
10.0, 10.0, 0.0, 10.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context)
|
FFLocalizations.of(context).getText('yfj9pd6k'), // Filtros
|
||||||
.getText('yfj9pd6k'), // Filtros
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
style:
|
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||||
FlutterFlowTheme.of(context).headlineMedium.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.headlineMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 18.0,
|
fontSize: 18.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||||
.headlineMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -225,8 +208,7 @@ class _OrderFilterModalWidgetState extends State<OrderFilterModalWidget> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildCheckboxListTile(
|
_buildCheckboxListTile('adresseeType', adresseeTypeOptions, 14),
|
||||||
'adresseeType', adresseeTypeOptions, 14),
|
|
||||||
_buildCheckboxListTile('status', statusOptions, 14),
|
_buildCheckboxListTile('status', statusOptions, 14),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -2,8 +2,6 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'throw_exception_widget.dart' show ThrowExceptionWidget;
|
import 'throw_exception_widget.dart' show ThrowExceptionWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ThrowExceptionModel extends FlutterFlowModel<ThrowExceptionWidget> {
|
class ThrowExceptionModel extends FlutterFlowModel<ThrowExceptionWidget> {
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
|
@ -13,8 +13,7 @@ export 'throw_exception_model.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
class ThrowExceptionWidget extends StatefulWidget {
|
class ThrowExceptionWidget extends StatefulWidget {
|
||||||
ThrowExceptionWidget(
|
ThrowExceptionWidget({super.key, required this.msg, this.type = EnumThrowException.error});
|
||||||
{super.key, required this.msg, this.type = EnumThrowException.error});
|
|
||||||
|
|
||||||
final String? msg;
|
final String? msg;
|
||||||
EnumThrowException type;
|
EnumThrowException type;
|
||||||
|
@ -23,8 +22,7 @@ class ThrowExceptionWidget extends StatefulWidget {
|
||||||
State<ThrowExceptionWidget> createState() => _ThrowExceptionWidgetState();
|
State<ThrowExceptionWidget> createState() => _ThrowExceptionWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget> with TickerProviderStateMixin {
|
||||||
with TickerProviderStateMixin {
|
|
||||||
late ThrowExceptionModel _model;
|
late ThrowExceptionModel _model;
|
||||||
final animationsMap = <String, AnimationInfo>{};
|
final animationsMap = <String, AnimationInfo>{};
|
||||||
|
|
||||||
|
@ -38,6 +36,7 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
return FlutterFlowTheme.of(context).success;
|
return FlutterFlowTheme.of(context).success;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IconData _getIconByType(BuildContext context) {
|
IconData _getIconByType(BuildContext context) {
|
||||||
switch (widget.type) {
|
switch (widget.type) {
|
||||||
case EnumThrowException.error:
|
case EnumThrowException.error:
|
||||||
|
@ -48,26 +47,26 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
return Icons.check_circle_outline;
|
return Icons.check_circle_outline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _getTitleByType(BuildContext context) {
|
String _getTitleByType(BuildContext context) {
|
||||||
switch (widget.type) {
|
switch (widget.type) {
|
||||||
case EnumThrowException.error:
|
case EnumThrowException.error:
|
||||||
return FFLocalizations.of(context)
|
return FFLocalizations.of(context).getVariableText(ptText: "Falha :(", enText: "Fail :(");
|
||||||
.getVariableText(ptText: "Falha :(", enText: "Fail :(");
|
|
||||||
case EnumThrowException.warning:
|
case EnumThrowException.warning:
|
||||||
return FFLocalizations.of(context)
|
return FFLocalizations.of(context).getVariableText(ptText: "Aviso :O", enText: "Warning :O");
|
||||||
.getVariableText(ptText: "Aviso :O", enText: "Warning :O");
|
|
||||||
case EnumThrowException.success:
|
case EnumThrowException.success:
|
||||||
return FFLocalizations.of(context)
|
return FFLocalizations.of(context).getVariableText(ptText: "Sucesso ;)", enText: "Success ;)");
|
||||||
.getVariableText(ptText: "Sucesso ;)", enText: "Success ;)");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
@override void setState(VoidCallback callback) {
|
void setState(VoidCallback callback) {
|
||||||
super.setState(callback);
|
super.setState(callback);
|
||||||
_model.onUpdate();
|
_model.onUpdate();
|
||||||
}
|
}
|
||||||
@override void initState() {
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => ThrowExceptionModel());
|
_model = createModel(context, () => ThrowExceptionModel());
|
||||||
animationsMap.addAll({
|
animationsMap.addAll({
|
||||||
|
@ -85,12 +84,16 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@override void dispose() {
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
_model.maybeDispose();
|
_model.maybeDispose();
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
@override Widget build(BuildContext context) {
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
key: const ValueKey('ThrowExceptionWidget'),
|
key: const ValueKey('ThrowExceptionWidget'),
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
@ -135,7 +138,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
fontSize: 20.0,
|
fontSize: 20.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -145,7 +149,8 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -156,5 +161,5 @@ class _ThrowExceptionWidgetState extends State<ThrowExceptionWidget>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
|
import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class VisitorNotFoundComponentModel
|
class VisitorNotFoundComponentModel extends FlutterFlowModel<VisitorNotFoundComponentWidget> {
|
||||||
extends FlutterFlowModel<VisitorNotFoundComponentWidget> {
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,10 @@ class VisitorNotFoundComponentWidget extends StatefulWidget {
|
||||||
|
|
||||||
final String? doc;
|
final String? doc;
|
||||||
@override
|
@override
|
||||||
State<VisitorNotFoundComponentWidget> createState() =>
|
State<VisitorNotFoundComponentWidget> createState() => _VisitorNotFoundComponentWidgetState();
|
||||||
_VisitorNotFoundComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VisitorNotFoundComponentWidgetState
|
class _VisitorNotFoundComponentWidgetState extends State<VisitorNotFoundComponentWidget> {
|
||||||
extends State<VisitorNotFoundComponentWidget> {
|
|
||||||
late VisitorNotFoundComponentModel _model;
|
late VisitorNotFoundComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -61,8 +59,7 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
|
|
||||||
child: FlutterFlowIconButton(
|
child: FlutterFlowIconButton(
|
||||||
borderRadius: 20.0,
|
borderRadius: 20.0,
|
||||||
borderWidth: 1.0,
|
borderWidth: 1.0,
|
||||||
|
@ -84,19 +81,16 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
size: 72.0,
|
size: 72.0,
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(5.0, 16.0, 5.0, 10.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(5.0, 16.0, 5.0, 10.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'1p9mykbj' /* Usuário não encontrado */,
|
'1p9mykbj' /* Usuário não encontrado */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: FlutterFlowTheme.of(context).headlineSmall.override(
|
style: FlutterFlowTheme.of(context).headlineSmall.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).headlineSmallFamily,
|
||||||
FlutterFlowTheme.of(context).headlineSmallFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineSmallFamily),
|
||||||
FlutterFlowTheme.of(context).headlineSmallFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -113,8 +107,7 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontStyle: FontStyle.italic,
|
fontStyle: FontStyle.italic,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelSmallFamily),
|
||||||
FlutterFlowTheme.of(context).labelSmallFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -147,22 +140,18 @@ class _VisitorNotFoundComponentWidgetState
|
||||||
).then((value) => context.pop(value));
|
).then((value) => context.pop(value));
|
||||||
// Navigator.pop(context, value)
|
// Navigator.pop(context, value)
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context)
|
text: FFLocalizations.of(context).getVariableText(enText: 'Add', ptText: 'Adicionar'),
|
||||||
.getVariableText(enText: 'Add', ptText: 'Adicionar'),
|
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
height: 30.0,
|
height: 30.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
textStyle: FlutterFlowTheme.of(context).labelSmall.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).labelSmallFamily,
|
||||||
FlutterFlowTheme.of(context).labelSmallFamily,
|
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelSmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelSmallFamily),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
|
import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class BottomArrowLinkedLocalsComponentModel
|
class BottomArrowLinkedLocalsComponentModel extends FlutterFlowModel<BottomArrowLinkedLocalsComponentWidget> {
|
||||||
extends FlutterFlowModel<BottomArrowLinkedLocalsComponentWidget> {
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,10 @@ class BottomArrowLinkedLocalsComponentWidget extends StatefulWidget {
|
||||||
const BottomArrowLinkedLocalsComponentWidget({super.key});
|
const BottomArrowLinkedLocalsComponentWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<BottomArrowLinkedLocalsComponentWidget> createState() =>
|
State<BottomArrowLinkedLocalsComponentWidget> createState() => _BottomArrowLinkedLocalsComponentWidgetState();
|
||||||
_BottomArrowLinkedLocalsComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _BottomArrowLinkedLocalsComponentWidgetState
|
class _BottomArrowLinkedLocalsComponentWidgetState extends State<BottomArrowLinkedLocalsComponentWidget> {
|
||||||
extends State<BottomArrowLinkedLocalsComponentWidget> {
|
|
||||||
late BottomArrowLinkedLocalsComponentModel _model;
|
late BottomArrowLinkedLocalsComponentModel _model;
|
||||||
|
|
||||||
bool _loading = false;
|
bool _loading = false;
|
||||||
|
@ -29,17 +27,21 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
late Future<void> _localsFuture;
|
late Future<void> _localsFuture;
|
||||||
List<dynamic> _localsWrap = [];
|
List<dynamic> _localsWrap = [];
|
||||||
|
|
||||||
@override void setState(VoidCallback callback) {
|
@override
|
||||||
|
void setState(VoidCallback callback) {
|
||||||
super.setState(callback);
|
super.setState(callback);
|
||||||
_model.onUpdate();
|
_model.onUpdate();
|
||||||
}
|
}
|
||||||
@override void initState() {
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model =
|
_model = createModel(context, () => BottomArrowLinkedLocalsComponentModel());
|
||||||
createModel(context, () => BottomArrowLinkedLocalsComponentModel());
|
|
||||||
_localsFuture = _fetchLocals();
|
_localsFuture = _fetchLocals();
|
||||||
}
|
}
|
||||||
@override void dispose() {
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
_model.maybeDispose();
|
_model.maybeDispose();
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
@ -49,8 +51,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: "Não há mais dados.", enText: "No more data."),
|
||||||
ptText: "Não há mais dados.", enText: "No more data."),
|
|
||||||
),
|
),
|
||||||
duration: const Duration(seconds: 3),
|
duration: const Duration(seconds: 3),
|
||||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -64,7 +65,6 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
var response = await PhpGroup.getLocalsCall.call();
|
var response = await PhpGroup.getLocalsCall.call();
|
||||||
final bool isError = response.jsonBody['error'];
|
final bool isError = response.jsonBody['error'];
|
||||||
|
|
||||||
|
|
||||||
if (isError) {
|
if (isError) {
|
||||||
final String errorMsg = response.jsonBody['error_msg'];
|
final String errorMsg = response.jsonBody['error_msg'];
|
||||||
_handleError(context, errorMsg);
|
_handleError(context, errorMsg);
|
||||||
|
@ -73,7 +73,6 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
|
|
||||||
final List<dynamic> locals = response.jsonBody['locais'] ?? [];
|
final List<dynamic> locals = response.jsonBody['locais'] ?? [];
|
||||||
|
|
||||||
|
|
||||||
final bool isEmpty = locals.isEmpty;
|
final bool isEmpty = locals.isEmpty;
|
||||||
final bool isUnique = locals.length == 1;
|
final bool isUnique = locals.length == 1;
|
||||||
final bool isActive = locals[0]['CLU_STATUS'] == 'A';
|
final bool isActive = locals[0]['CLU_STATUS'] == 'A';
|
||||||
|
@ -82,9 +81,6 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
final bool isEnabled = isUnique && isActive;
|
final bool isEnabled = isUnique && isActive;
|
||||||
final bool isDisabled = isUnique && isBlocked;
|
final bool isDisabled = isUnique && isBlocked;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!isEmpty) {
|
if (!isEmpty) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_localsWrap.addAll(locals);
|
_localsWrap.addAll(locals);
|
||||||
|
@ -127,7 +123,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
static void _handleError(BuildContext context, String errorMsg) {
|
static void _handleError(BuildContext context, String errorMsg) {
|
||||||
AuthenticationService.signOut(context);
|
AuthenticationService.signOut(context);
|
||||||
DialogUtil.error(context, errorMsg);
|
DialogUtil.error(context, errorMsg);
|
||||||
LogUtil.requestAPIFailed('getLocals.php', '{devUUID: ${StorageUtil().devUUID}, cliUUID: ${StorageUtil().userUUID}}', 'Get Locals', errorMsg, StackTrace.current);
|
LogUtil.requestAPIFailed('getLocals.php', '{devUUID: ${StorageUtil().devUUID}, cliUUID: ${StorageUtil().userUUID}}',
|
||||||
|
'Get Locals', errorMsg, StackTrace.current);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> _fetchResponseLink(String status, String cliID) async {
|
Future<dynamic> _fetchResponseLink(String status, String cliID) async {
|
||||||
|
@ -138,9 +135,8 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
if (response.jsonBody['error'] == false) {
|
if (response.jsonBody['error'] == false) {
|
||||||
return {
|
return {
|
||||||
'error': false,
|
'error': false,
|
||||||
'error_msg': FFLocalizations.of(context).getVariableText(
|
'error_msg': FFLocalizations.of(context)
|
||||||
ptText: "Vínculo Ativado com Sucesso",
|
.getVariableText(ptText: "Vínculo Ativado com Sucesso", enText: "Link Activated Successfully")
|
||||||
enText: "Link Activated Successfully")
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
StorageUtil().cliUUID = '';
|
StorageUtil().cliUUID = '';
|
||||||
|
@ -148,8 +144,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
}
|
}
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed(
|
LogUtil.requestAPIFailed('responderVinculo.php', '', 'Responder Vínculo', e, s);
|
||||||
'responderVinculo.php', '', 'Responder Vínculo', e, s);
|
|
||||||
return {
|
return {
|
||||||
'error': true,
|
'error': true,
|
||||||
'error_msg': FFLocalizations.of(context).getVariableText(
|
'error_msg': FFLocalizations.of(context).getVariableText(
|
||||||
|
@ -174,17 +169,14 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
Map<String, Color> _statusHashMap(dynamic local) {
|
Map<String, Color> _statusHashMap(dynamic local) {
|
||||||
return Map<String, Color>.from({
|
return Map<String, Color>.from({
|
||||||
if (local['CLU_STATUS'] == 'A')
|
if (local['CLU_STATUS'] == 'A')
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: 'Ativo', enText: 'Active'):
|
||||||
ptText: 'Ativo',
|
FlutterFlowTheme.of(context).success
|
||||||
enText: 'Active'): FlutterFlowTheme.of(context).success
|
|
||||||
else if (local['CLU_STATUS'] == 'B')
|
else if (local['CLU_STATUS'] == 'B')
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: 'Bloqueado', enText: 'Blocked'):
|
||||||
ptText: 'Bloqueado',
|
FlutterFlowTheme.of(context).error
|
||||||
enText: 'Blocked'): FlutterFlowTheme.of(context).error
|
|
||||||
else
|
else
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: 'Pendente', enText: 'Pending'):
|
||||||
ptText: 'Pendente',
|
FlutterFlowTheme.of(context).warning
|
||||||
enText: 'Pending'): FlutterFlowTheme.of(context).warning
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,8 +194,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
context.pop();
|
context.pop();
|
||||||
} else if (local['CLU_STATUS'] == 'B') {
|
} else if (local['CLU_STATUS'] == 'B') {
|
||||||
String message = FFLocalizations.of(context).getVariableText(
|
String message = FFLocalizations.of(context).getVariableText(
|
||||||
ptText:
|
ptText: 'Local Bloqueado para Acesso, Entre em Contato com Administração',
|
||||||
'Local Bloqueado para Acesso, Entre em Contato com Administração',
|
|
||||||
enText: 'Location Blocked for Access, Contact Administration',
|
enText: 'Location Blocked for Access, Contact Administration',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -219,12 +210,10 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
String localName = local['CLI_NOME'];
|
String localName = local['CLI_NOME'];
|
||||||
showAlertDialog(
|
showAlertDialog(
|
||||||
context,
|
context,
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: 'Ativar Vínculo', enText: 'Activate Link'),
|
||||||
ptText: 'Ativar Vínculo', enText: 'Activate Link'),
|
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Deseja aceitar o vínculo a $localName?',
|
ptText: 'Deseja aceitar o vínculo a $localName?',
|
||||||
enText: 'Do you wish to accept the link to $localName?'),
|
enText: 'Do you wish to accept the link to $localName?'), () async {
|
||||||
() async {
|
|
||||||
var response = await _fetchResponseLink('A', local['CLI_ID']);
|
var response = await _fetchResponseLink('A', local['CLI_ID']);
|
||||||
context.pop();
|
context.pop();
|
||||||
|
|
||||||
|
@ -276,8 +265,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
height: height - (height * 0.5),
|
height: height - (height * 0.5),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
borderRadius: const BorderRadius.only(
|
borderRadius: const BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25))),
|
||||||
topLeft: Radius.circular(25), topRight: Radius.circular(25))),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -289,16 +277,13 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Center(
|
||||||
child: Text(FFLocalizations.of(context).getVariableText(
|
child: Text(FFLocalizations.of(context)
|
||||||
ptText: "Nenhum Local Encontrado.",
|
.getVariableText(ptText: "Nenhum Local Encontrado.", enText: "No local found")),
|
||||||
enText: "No local found")),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else if (_hasData == true &&
|
else if (_hasData == true && _loading == false && _localsWrap.isNotEmpty)
|
||||||
_loading == false &&
|
|
||||||
_localsWrap.isNotEmpty)
|
|
||||||
Expanded(child: _listItems(context)),
|
Expanded(child: _listItems(context)),
|
||||||
if (_loading == true)
|
if (_loading == true)
|
||||||
Container(
|
Container(
|
||||||
|
@ -315,8 +300,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState
|
||||||
padding: const EdgeInsets.only(top: 10),
|
padding: const EdgeInsets.only(top: 10),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: 'Escolha um local', enText: 'Choose a location'),
|
||||||
ptText: 'Escolha um local', enText: 'Choose a location'),
|
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
)))),
|
)))),
|
||||||
|
|
|
@ -6,8 +6,7 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
||||||
class LocalProfileComponentModel
|
class LocalProfileComponentModel extends FlutterFlowModel<LocalProfileComponentWidget> {
|
||||||
extends FlutterFlowModel<LocalProfileComponentWidget> {
|
|
||||||
String cliName = '';
|
String cliName = '';
|
||||||
String cliUUID = '';
|
String cliUUID = '';
|
||||||
VoidCallback? setStateCallback;
|
VoidCallback? setStateCallback;
|
||||||
|
|
|
@ -16,12 +16,10 @@ class LocalProfileComponentWidget extends StatefulWidget {
|
||||||
const LocalProfileComponentWidget({super.key});
|
const LocalProfileComponentWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<LocalProfileComponentWidget> createState() =>
|
State<LocalProfileComponentWidget> createState() => _LocalProfileComponentWidgetState();
|
||||||
_LocalProfileComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _LocalProfileComponentWidgetState
|
class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidget> {
|
||||||
extends State<LocalProfileComponentWidget> {
|
|
||||||
late LocalProfileComponentModel _model;
|
late LocalProfileComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -40,7 +38,6 @@ class _LocalProfileComponentWidgetState
|
||||||
// WidgetsBinding.instance
|
// WidgetsBinding.instance
|
||||||
// .addPostFrameCallback((_) async => await LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null));
|
// .addPostFrameCallback((_) async => await LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null));
|
||||||
LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null);
|
LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -57,8 +54,6 @@ class _LocalProfileComponentWidgetState
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
|
@ -90,7 +85,8 @@ class _LocalProfileComponentWidgetState
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await LocalizationService.selectLocal(context).then((value) => value == true ? onUpdate() : null);
|
await LocalizationService.selectLocal(context)
|
||||||
|
.then((value) => value == true ? onUpdate() : null);
|
||||||
},
|
},
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(200.0),
|
borderRadius: BorderRadius.circular(200.0),
|
||||||
|
@ -110,12 +106,9 @@ class _LocalProfileComponentWidgetState
|
||||||
height: 80.0,
|
height: 80.0,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
alignment: const Alignment(0.0, 0.0),
|
alignment: const Alignment(0.0, 0.0),
|
||||||
placeholder: (context, url) =>
|
placeholder: (context, url) => Image.asset('assets/images/home.png'),
|
||||||
Image.asset('assets/images/home.png'),
|
errorListener: (_) => Image.asset('assets/images/home.png'),
|
||||||
errorListener: (_) =>
|
errorWidget: (_, __, ___) => Image.asset('assets/images/home.png'),
|
||||||
Image.asset('assets/images/home.png'),
|
|
||||||
errorWidget: (_, __, ___) =>
|
|
||||||
Image.asset('assets/images/home.png'),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
@ -134,8 +127,7 @@ class _LocalProfileComponentWidgetState
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
GoogleFonts.asMap().containsKey('Nunito'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -12,19 +12,19 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'menu_component_widget.dart' show MenuComponentWidget;
|
import 'menu_component_widget.dart' show MenuComponentWidget;
|
||||||
|
|
||||||
class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
|
|
||||||
bool isGrid = false;
|
bool isGrid = false;
|
||||||
|
|
||||||
late MenuListViewComponentModel menuListViewComponentModel;
|
late MenuListViewComponentModel menuListViewComponentModel;
|
||||||
late MenuStaggeredViewComponentModel menuStaggeredViewComponentModel;
|
late MenuStaggeredViewComponentModel menuStaggeredViewComponentModel;
|
||||||
|
|
||||||
@override void initState(BuildContext context) {
|
@override
|
||||||
menuListViewComponentModel =
|
void initState(BuildContext context) {
|
||||||
createModel(context, () => MenuListViewComponentModel());
|
menuListViewComponentModel = createModel(context, () => MenuListViewComponentModel());
|
||||||
menuStaggeredViewComponentModel =
|
menuStaggeredViewComponentModel = createModel(context, () => MenuStaggeredViewComponentModel());
|
||||||
createModel(context, () => MenuStaggeredViewComponentModel());
|
|
||||||
}
|
}
|
||||||
@override void dispose() {
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
menuListViewComponentModel.dispose();
|
menuListViewComponentModel.dispose();
|
||||||
menuStaggeredViewComponentModel.dispose();
|
menuStaggeredViewComponentModel.dispose();
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
Future changeMenuStyle(BuildContext context) async {
|
Future changeMenuStyle(BuildContext context) async {
|
||||||
isGrid = !isGrid;
|
isGrid = !isGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openQRCodeScanner(BuildContext context) async {
|
Future openQRCodeScanner(BuildContext context) async {
|
||||||
context.push(
|
context.push(
|
||||||
'/qrCodePage',
|
'/qrCodePage',
|
||||||
|
@ -44,6 +45,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openCompleteSchedule(BuildContext context) async {
|
Future openCompleteSchedule(BuildContext context) async {
|
||||||
context.push(
|
context.push(
|
||||||
'/scheduleCompleteVisitPage',
|
'/scheduleCompleteVisitPage',
|
||||||
|
@ -56,6 +58,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openDeliverySchedule(BuildContext context) async {
|
Future openDeliverySchedule(BuildContext context) async {
|
||||||
final bool isProvisional = StorageUtil().provisional;
|
final bool isProvisional = StorageUtil().provisional;
|
||||||
if (isProvisional == true) {
|
if (isProvisional == true) {
|
||||||
|
@ -73,6 +76,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
DialogUnavailable.unavailableFeature(context);
|
DialogUnavailable.unavailableFeature(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openProvisionalSchedule(BuildContext context) async {
|
Future openProvisionalSchedule(BuildContext context) async {
|
||||||
final isProvisional = StorageUtil().provisional;
|
final isProvisional = StorageUtil().provisional;
|
||||||
if (isProvisional == true) {
|
if (isProvisional == true) {
|
||||||
|
@ -90,6 +94,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
DialogUnavailable.unavailableFeature(context);
|
DialogUnavailable.unavailableFeature(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openFastPassSchedule(BuildContext context) async {
|
Future openFastPassSchedule(BuildContext context) async {
|
||||||
final isWpp = StorageUtil().whatsapp;
|
final isWpp = StorageUtil().whatsapp;
|
||||||
if (isWpp) {
|
if (isWpp) {
|
||||||
|
@ -107,6 +112,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
DialogUnavailable.unavailableFeature(context);
|
DialogUnavailable.unavailableFeature(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future showSchedules(BuildContext context) async {
|
Future showSchedules(BuildContext context) async {
|
||||||
final routesListStr = <String>[
|
final routesListStr = <String>[
|
||||||
'scheduleProvisionalVisitPage',
|
'scheduleProvisionalVisitPage',
|
||||||
|
@ -146,6 +152,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openVisitorsRegister(BuildContext context) async {
|
Future openVisitorsRegister(BuildContext context) async {
|
||||||
context.push(
|
context.push(
|
||||||
'/registerVisitorPage',
|
'/registerVisitorPage',
|
||||||
|
@ -158,6 +165,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openPoepleOnTheProperty(BuildContext context) async {
|
Future openPoepleOnTheProperty(BuildContext context) async {
|
||||||
context.push(
|
context.push(
|
||||||
'/peopleOnThePropertyPage',
|
'/peopleOnThePropertyPage',
|
||||||
|
@ -170,6 +178,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> Logout(BuildContext context) async {
|
Future<void> Logout(BuildContext context) async {
|
||||||
final String title = FFLocalizations.of(context).getVariableText(
|
final String title = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Sair',
|
ptText: 'Sair',
|
||||||
|
@ -179,12 +188,9 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
ptText: 'Tem certeza que deseja sair?',
|
ptText: 'Tem certeza que deseja sair?',
|
||||||
enText: 'Are you sure you want to logout?',
|
enText: 'Are you sure you want to logout?',
|
||||||
);
|
);
|
||||||
showAlertDialog(
|
showAlertDialog(context, title, content, () async => await AuthenticationService.signOut(context));
|
||||||
context,
|
|
||||||
title,
|
|
||||||
content,
|
|
||||||
() async => await AuthenticationService.signOut(context));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openPreferencesSettings(BuildContext context) async {
|
Future openPreferencesSettings(BuildContext context) async {
|
||||||
context.push(
|
context.push(
|
||||||
'/preferencesSettings',
|
'/preferencesSettings',
|
||||||
|
@ -197,6 +203,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openMyOrders(BuildContext context) async {
|
Future openMyOrders(BuildContext context) async {
|
||||||
final isWpp = StorageUtil().whatsapp;
|
final isWpp = StorageUtil().whatsapp;
|
||||||
if (isWpp) {
|
if (isWpp) {
|
||||||
|
@ -214,6 +221,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
DialogUnavailable.unavailableFeature(context);
|
DialogUnavailable.unavailableFeature(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openReservations(BuildContext context) async {
|
Future openReservations(BuildContext context) async {
|
||||||
final isWpp = StorageUtil().whatsapp;
|
final isWpp = StorageUtil().whatsapp;
|
||||||
if (isWpp) {
|
if (isWpp) {
|
||||||
|
@ -231,6 +239,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
DialogUnavailable.unavailableFeature(context);
|
DialogUnavailable.unavailableFeature(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future showHistories(BuildContext context) async {
|
Future showHistories(BuildContext context) async {
|
||||||
await showAdaptiveDialog(
|
await showAdaptiveDialog(
|
||||||
// isScrollControlled: true,
|
// isScrollControlled: true,
|
||||||
|
@ -276,6 +285,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openLiberationsHistory(BuildContext context) async {
|
Future openLiberationsHistory(BuildContext context) async {
|
||||||
context.push(
|
context.push(
|
||||||
'/liberationHistory',
|
'/liberationHistory',
|
||||||
|
@ -288,6 +298,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openAccessHistory(BuildContext context) async {
|
Future openAccessHistory(BuildContext context) async {
|
||||||
context.push(
|
context.push(
|
||||||
'/acessHistoryPage',
|
'/acessHistoryPage',
|
||||||
|
@ -300,6 +311,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openVisitsHistory(BuildContext context) async {
|
Future openVisitsHistory(BuildContext context) async {
|
||||||
context.push(
|
context.push(
|
||||||
'/scheduleCompleteVisitPage',
|
'/scheduleCompleteVisitPage',
|
||||||
|
@ -312,6 +324,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openMessagesHistory(BuildContext context) async {
|
Future openMessagesHistory(BuildContext context) async {
|
||||||
context.push(
|
context.push(
|
||||||
'/messageHistoryPage',
|
'/messageHistoryPage',
|
||||||
|
@ -324,6 +337,7 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future openPetsRegister(BuildContext context) async {
|
Future openPetsRegister(BuildContext context) async {
|
||||||
bool isPet = StorageUtil().pets;
|
bool isPet = StorageUtil().pets;
|
||||||
if (isPet) {
|
if (isPet) {
|
||||||
|
@ -341,7 +355,4 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
DialogUnavailable.unavailableFeature(context);
|
DialogUnavailable.unavailableFeature(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -568,9 +568,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
|
|
||||||
return Builder(
|
return Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (widget.style == MenuView.list_grid &&
|
if (widget.style == MenuView.list_grid && widget.expandable == true && widget.item == MenuItem.button) {
|
||||||
widget.expandable == true &&
|
|
||||||
widget.item == MenuItem.button) {
|
|
||||||
if (_model.isGrid == true) {
|
if (_model.isGrid == true) {
|
||||||
return wrapWithModel(
|
return wrapWithModel(
|
||||||
model: _model.menuStaggeredViewComponentModel,
|
model: _model.menuStaggeredViewComponentModel,
|
||||||
|
@ -605,9 +603,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (widget.style == MenuView.list &&
|
if (widget.style == MenuView.list && widget.expandable == false && widget.item == MenuItem.tile) {
|
||||||
widget.expandable == false &&
|
|
||||||
widget.item == MenuItem.tile) {
|
|
||||||
return wrapWithModel(
|
return wrapWithModel(
|
||||||
model: _model.menuListViewComponentModel,
|
model: _model.menuListViewComponentModel,
|
||||||
updateCallback: () => setState(() {}),
|
updateCallback: () => setState(() {}),
|
||||||
|
|
|
@ -2,10 +2,7 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'menu_list_view_component_widget.dart' show MenuListViewComponentWidget;
|
import 'menu_list_view_component_widget.dart' show MenuListViewComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MenuListViewComponentModel extends FlutterFlowModel<MenuListViewComponentWidget> {
|
||||||
|
|
||||||
class MenuListViewComponentModel
|
|
||||||
extends FlutterFlowModel<MenuListViewComponentWidget> {
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,10 @@ class MenuListViewComponentWidget extends StatefulWidget {
|
||||||
final Future Function()? changeMenuStyle;
|
final Future Function()? changeMenuStyle;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MenuListViewComponentWidget> createState() =>
|
State<MenuListViewComponentWidget> createState() => _MenuListViewComponentWidgetState();
|
||||||
_MenuListViewComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MenuListViewComponentWidgetState
|
class _MenuListViewComponentWidgetState extends State<MenuListViewComponentWidget> {
|
||||||
extends State<MenuListViewComponentWidget> {
|
|
||||||
late MenuListViewComponentModel _model;
|
late MenuListViewComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -75,8 +73,7 @@ class _MenuListViewComponentWidgetState
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: SizedBox(
|
child: SizedBox(height: 115, width: 115, child: widget.options[index]),
|
||||||
height: 115, width: 115, child: widget.options[index]),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -95,8 +92,7 @@ class _MenuListViewComponentWidgetState
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: SizedBox(
|
child: SizedBox(height: 115, width: 115, child: widget.options[index]),
|
||||||
height: 115, width: 115, child: widget.options[index]),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -4,9 +4,7 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MenuStaggeredViewComponentModel extends FlutterFlowModel<MenuStaggeredViewComponentWidget> {
|
||||||
class MenuStaggeredViewComponentModel
|
|
||||||
extends FlutterFlowModel<MenuStaggeredViewComponentWidget> {
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,10 @@ class MenuStaggeredViewComponentWidget extends StatefulWidget {
|
||||||
final Future Function()? changeMenuStyle;
|
final Future Function()? changeMenuStyle;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MenuStaggeredViewComponentWidget> createState() =>
|
State<MenuStaggeredViewComponentWidget> createState() => _MenuStaggeredViewComponentWidgetState();
|
||||||
_MenuStaggeredViewComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MenuStaggeredViewComponentWidgetState
|
class _MenuStaggeredViewComponentWidgetState extends State<MenuStaggeredViewComponentWidget> {
|
||||||
extends State<MenuStaggeredViewComponentWidget> {
|
|
||||||
late MenuStaggeredViewComponentModel _model;
|
late MenuStaggeredViewComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -87,9 +85,7 @@ class _MenuStaggeredViewComponentWidgetState
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
]
|
].addToStart(const SizedBox(height: 30)).addToEnd(const SizedBox(height: 30)),
|
||||||
.addToStart(const SizedBox(height: 30))
|
|
||||||
.addToEnd(const SizedBox(height: 30)),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:hub/backend/api_requests/api_manager.dart';
|
import 'package:hub/backend/api_requests/api_manager.dart';
|
||||||
import 'package:hub/flutter_flow/request_manager.dart';
|
import 'package:hub/flutter_flow/request_manager.dart';
|
||||||
|
|
||||||
|
@ -6,10 +5,7 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'message_well_component_widget.dart' show MessageWellComponentWidget;
|
import 'message_well_component_widget.dart' show MessageWellComponentWidget;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MessageWellComponentModel extends FlutterFlowModel<MessageWellComponentWidget> {
|
||||||
|
|
||||||
class MessageWellComponentModel
|
|
||||||
extends FlutterFlowModel<MessageWellComponentWidget> {
|
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
// State field(s) for TextField widget.
|
// State field(s) for TextField widget.
|
||||||
FocusNode? textFieldFocusNode;
|
FocusNode? textFieldFocusNode;
|
||||||
|
@ -30,8 +26,7 @@ class MessageWellComponentModel
|
||||||
requestFn: requestFn,
|
requestFn: requestFn,
|
||||||
);
|
);
|
||||||
void clearGetLiberationsCache() => _getLiberationsManager.clear();
|
void clearGetLiberationsCache() => _getLiberationsManager.clear();
|
||||||
void clearGetLiberationsCacheKey(String? uniqueKey) =>
|
void clearGetLiberationsCacheKey(String? uniqueKey) => _getLiberationsManager.clearRequest(uniqueKey);
|
||||||
_getLiberationsManager.clearRequest(uniqueKey);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
|
@ -21,12 +21,10 @@ class MessageWellComponentWidget extends StatefulWidget {
|
||||||
const MessageWellComponentWidget({super.key});
|
const MessageWellComponentWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MessageWellComponentWidget> createState() =>
|
State<MessageWellComponentWidget> createState() => _MessageWellComponentWidgetState();
|
||||||
_MessageWellComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MessageWellComponentWidgetState
|
class _MessageWellComponentWidgetState extends State<MessageWellComponentWidget> {
|
||||||
extends State<MessageWellComponentWidget> {
|
|
||||||
StreamSubscription? _dropdownSubscription;
|
StreamSubscription? _dropdownSubscription;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -143,8 +141,7 @@ class _MessageWellComponentWidgetState
|
||||||
fillColor: theme.primary,
|
fillColor: theme.primary,
|
||||||
),
|
),
|
||||||
onChanged: (String? newValue) {
|
onChanged: (String? newValue) {
|
||||||
safeSetState(() => dropdown.value = LinkedHashMap.from(
|
safeSetState(() => dropdown.value = LinkedHashMap.from({newValue!: dropdownItems[newValue].toString()}));
|
||||||
{newValue!: dropdownItems[newValue].toString()}));
|
|
||||||
},
|
},
|
||||||
items: dropdownItems.entries
|
items: dropdownItems.entries
|
||||||
.map((entry) => DropdownMenuItem<String>(
|
.map((entry) => DropdownMenuItem<String>(
|
||||||
|
@ -181,8 +178,7 @@ class _MessageWellComponentWidgetState
|
||||||
final formattedWords = words.map((word) {
|
final formattedWords = words.map((word) {
|
||||||
if (word.isEmpty) return word; // Handle empty words
|
if (word.isEmpty) return word; // Handle empty words
|
||||||
final firstLetter = word.substring(0, 1).toUpperCase();
|
final firstLetter = word.substring(0, 1).toUpperCase();
|
||||||
final remainingLetters =
|
final remainingLetters = word.length > 1 ? word.substring(1).toLowerCase() : '';
|
||||||
word.length > 1 ? word.substring(1).toLowerCase() : '';
|
|
||||||
return '$firstLetter$remainingLetters';
|
return '$firstLetter$remainingLetters';
|
||||||
});
|
});
|
||||||
return formattedWords.join(' ');
|
return formattedWords.join(' ');
|
||||||
|
@ -238,8 +234,7 @@ class _MessageWellComponentWidgetState
|
||||||
padding: const EdgeInsets.only(left: 5),
|
padding: const EdgeInsets.only(left: 5),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.history,
|
Icons.history,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
FlutterFlowTheme.of(context).customColor6,
|
|
||||||
size: 15,
|
size: 15,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -249,8 +244,7 @@ class _MessageWellComponentWidgetState
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
FlutterFlowTheme.of(context).customColor6,
|
|
||||||
),
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
|
@ -265,8 +259,7 @@ class _MessageWellComponentWidgetState
|
||||||
padding: const EdgeInsets.only(left: 5),
|
padding: const EdgeInsets.only(left: 5),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.message,
|
Icons.message,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
FlutterFlowTheme.of(context).customColor6,
|
|
||||||
size: 15,
|
size: 15,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -327,8 +320,7 @@ class MessageWellState {
|
||||||
return MessageWellState(
|
return MessageWellState(
|
||||||
messages: messages ?? this.messages,
|
messages: messages ?? this.messages,
|
||||||
pageNumber: pageNumber ?? this.pageNumber,
|
pageNumber: pageNumber ?? this.pageNumber,
|
||||||
allowScrollInSingleChildScrollView: allowScrollInSingleChildScrollView ??
|
allowScrollInSingleChildScrollView: allowScrollInSingleChildScrollView ?? this.allowScrollInSingleChildScrollView,
|
||||||
this.allowScrollInSingleChildScrollView,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -382,7 +374,6 @@ class MessageWellNotifier extends StateNotifier<MessageWellState> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final messageWellProvider =
|
final messageWellProvider = StateNotifierProvider<MessageWellNotifier, MessageWellState>((ref) {
|
||||||
StateNotifierProvider<MessageWellNotifier, MessageWellState>((ref) {
|
|
||||||
return MessageWellNotifier();
|
return MessageWellNotifier();
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/backend/api_requests/api_manager.dart';
|
import 'package:hub/backend/api_requests/api_manager.dart';
|
||||||
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
||||||
|
@ -8,8 +7,7 @@ import 'package:hub/shared/helpers/sqlite_storage_helper.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
class ScheduleVisitDetailModel
|
class ScheduleVisitDetailModel extends FlutterFlowModel<ScheduleVisitDetailWidget> {
|
||||||
extends FlutterFlowModel<ScheduleVisitDetailWidget> {
|
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
late final String cliUUID;
|
late final String cliUUID;
|
||||||
|
@ -39,8 +37,7 @@ class ScheduleVisitDetailModel
|
||||||
DateFormat originalFormat = DateFormat('d/M/y H:mm:ss');
|
DateFormat originalFormat = DateFormat('d/M/y H:mm:ss');
|
||||||
DateFormat newFormat = DateFormat('y-M-d H:mm:ss');
|
DateFormat newFormat = DateFormat('y-M-d H:mm:ss');
|
||||||
|
|
||||||
if (!RegExp(r'^\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2}$')
|
if (!RegExp(r'^\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2}$').hasMatch(dateStr)) {
|
||||||
.hasMatch(dateStr)) {
|
|
||||||
return 'Invalid date format';
|
return 'Invalid date format';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,7 @@ class ScheduleVisitDetailWidget extends StatefulWidget {
|
||||||
final String? visitObsStr;
|
final String? visitObsStr;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ScheduleVisitDetailWidget> createState() =>
|
State<ScheduleVisitDetailWidget> createState() => _ScheduleVisitDetailWidgetState();
|
||||||
_ScheduleVisitDetailWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
|
@ -58,19 +57,16 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
_model.textController1 ??= TextEditingController(text: widget.visitTempStr);
|
_model.textController1 ??= TextEditingController(text: widget.visitTempStr);
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController2 ??=
|
_model.textController2 ??= TextEditingController(text: widget.visitStartDate);
|
||||||
TextEditingController(text: widget.visitStartDate);
|
|
||||||
_model.textFieldFocusNode2 ??= FocusNode();
|
_model.textFieldFocusNode2 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
||||||
_model.textFieldFocusNode3 ??= FocusNode();
|
_model.textFieldFocusNode3 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController4 ??=
|
_model.textController4 ??= TextEditingController(text: extractDescToStr(widget.visitResonStr!));
|
||||||
TextEditingController(text: extractDescToStr(widget.visitResonStr!));
|
|
||||||
_model.textFieldFocusNode4 ??= FocusNode();
|
_model.textFieldFocusNode4 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController5 ??=
|
_model.textController5 ??= TextEditingController(text: extractDescToStr(widget.visitLevelStr!));
|
||||||
TextEditingController(text: extractDescToStr(widget.visitLevelStr!));
|
|
||||||
_model.textFieldFocusNode5 ??= FocusNode();
|
_model.textFieldFocusNode5 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
||||||
|
@ -132,13 +128,11 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Visibility(
|
child: Visibility(
|
||||||
visible: widget.visitorStrList != null &&
|
visible: widget.visitorStrList != null && widget.visitorStrList != '',
|
||||||
widget.visitorStrList != '',
|
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 0.0, 0.0),
|
||||||
15.0, 0.0, 0.0, 0.0),
|
|
||||||
child: FlutterFlowIconButton(
|
child: FlutterFlowIconButton(
|
||||||
borderRadius: 20.0,
|
borderRadius: 20.0,
|
||||||
borderWidth: 1.0,
|
borderWidth: 1.0,
|
||||||
|
@ -161,8 +155,7 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(5.0, 0.0, 5.0, 20.0),
|
||||||
5.0, 0.0, 5.0, 20.0),
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
|
@ -190,8 +183,7 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
Container(
|
Container(
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 10.0),
|
||||||
8.0, 0.0, 8.0, 10.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -203,31 +195,19 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'7w4fohoa' /* Encerramento da Visita */,
|
'7w4fohoa' /* Encerramento da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts:
|
||||||
.containsKey(
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts:
|
||||||
.containsKey(
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -258,32 +238,25 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts:
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
validator: _model.textController1Validator
|
validator: _model.textController1Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
||||||
0.0, 0.0, 0.0, 10.0),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController2,
|
controller: _model.textController2,
|
||||||
focusNode: _model.textFieldFocusNode2,
|
focusNode: _model.textFieldFocusNode2,
|
||||||
|
@ -292,98 +265,71 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context)
|
labelText: FFLocalizations.of(context).getVariableText(
|
||||||
.getVariableText(
|
|
||||||
enText: 'Start',
|
enText: 'Start',
|
||||||
ptText: 'Início',
|
ptText: 'Início',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintText:
|
hintText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'0cp1e31d' /* dd/mm/yyyy */,
|
'0cp1e31d' /* dd/mm/yyyy */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
.accent1,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
.primary,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController2Validator
|
validator: _model.textController2Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -392,90 +338,64 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText:
|
labelText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'abppdgz3' /* Término */,
|
'abppdgz3' /* Término */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintText:
|
hintText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'kqralft4' /* dd/mm/yyyy */,
|
'kqralft4' /* dd/mm/yyyy */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
.accent1,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
.primary,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController3Validator
|
validator: _model.textController3Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -483,16 +403,14 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
||||||
0.0, 0.0, 0.0, 10.0),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
focusNode: _model.textFieldFocusNode4,
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
@ -501,96 +419,69 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText:
|
labelText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'xjxhzqqm' /* Motivo da Visita */,
|
'xjxhzqqm' /* Motivo da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintText:
|
hintText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'47oezdm6' /* Motivo */,
|
'47oezdm6' /* Motivo */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
.accent1,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
.primary,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController4Validator
|
validator: _model.textController4Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController5,
|
controller: _model.textController5,
|
||||||
focusNode: _model.textFieldFocusNode5,
|
focusNode: _model.textFieldFocusNode5,
|
||||||
|
@ -599,89 +490,63 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText:
|
labelText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'2ujg7u18' /* Nível de Acesso */,
|
'2ujg7u18' /* Nível de Acesso */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintText:
|
hintText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'3emmbbfv' /* Nível de Acesso */,
|
'3emmbbfv' /* Nível de Acesso */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
.accent1,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
.primary,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
validator: _model.textController5Validator
|
validator: _model.textController5Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -691,8 +556,7 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
Container(
|
Container(
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController6,
|
controller: _model.textController6,
|
||||||
focusNode: _model.textFieldFocusNode6,
|
focusNode: _model.textFieldFocusNode6,
|
||||||
|
@ -704,31 +568,19 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'ritce5uw' /* Observações da Visita */,
|
'ritce5uw' /* Observações da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts:
|
||||||
.containsKey(
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts:
|
||||||
.containsKey(
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -759,18 +611,13 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts:
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
validator: _model.textController6Validator
|
validator: _model.textController6Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -780,12 +627,10 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
_model.postScheduleVisit =
|
_model.postScheduleVisit = await PhpGroup.postScheduleVisitCall.call(
|
||||||
await PhpGroup.postScheduleVisitCall.call(
|
|
||||||
devDesc: widget.visitObsStr,
|
devDesc: widget.visitObsStr,
|
||||||
idVisitante: widget.visitorStrList,
|
idVisitante: widget.visitorStrList,
|
||||||
dtInicio:
|
dtInicio: _model.convertDateFormat(widget.visitStartDate ?? ''),
|
||||||
_model.convertDateFormat(widget.visitStartDate ?? ''),
|
|
||||||
dtFim: _model.convertDateFormat(widget.visitEndDate ?? ''),
|
dtFim: _model.convertDateFormat(widget.visitEndDate ?? ''),
|
||||||
unica: widget.visitTempStr,
|
unica: widget.visitTempStr,
|
||||||
idMotivo: extractIdToStr(widget.visitResonStr!),
|
idMotivo: extractIdToStr(widget.visitResonStr!),
|
||||||
|
@ -803,8 +648,6 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
||||||
(_model.postScheduleVisit?.jsonBody ?? ''),
|
(_model.postScheduleVisit?.jsonBody ?? ''),
|
||||||
);
|
);
|
||||||
await DialogUtil.error(context, msg!).then((value) => safeSetState(() {}));
|
await DialogUtil.error(context, msg!).then((value) => safeSetState(() {}));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|
|
@ -3,8 +3,7 @@ import 'package:hub/components/organism_components/up_arrow_linked_locals_compon
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
|
|
||||||
class UpArrowLinkedLocalsComponentModel
|
class UpArrowLinkedLocalsComponentModel extends FlutterFlowModel<UpArrowLinkedLocalsComponentWidget> {
|
||||||
extends FlutterFlowModel<UpArrowLinkedLocalsComponentWidget> {
|
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
late final String cliUUID;
|
late final String cliUUID;
|
||||||
|
|
|
@ -12,12 +12,10 @@ class UpArrowLinkedLocalsComponentWidget extends StatefulWidget {
|
||||||
const UpArrowLinkedLocalsComponentWidget({super.key});
|
const UpArrowLinkedLocalsComponentWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<UpArrowLinkedLocalsComponentWidget> createState() =>
|
State<UpArrowLinkedLocalsComponentWidget> createState() => _UpArrowLinkedLocalsComponentWidgetState();
|
||||||
_UpArrowLinkedLocalsComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _UpArrowLinkedLocalsComponentWidgetState
|
class _UpArrowLinkedLocalsComponentWidgetState extends State<UpArrowLinkedLocalsComponentWidget> {
|
||||||
extends State<UpArrowLinkedLocalsComponentWidget> {
|
|
||||||
late UpArrowLinkedLocalsComponentModel _model;
|
late UpArrowLinkedLocalsComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -107,8 +105,7 @@ class _UpArrowLinkedLocalsComponentWidgetState
|
||||||
|
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
gridDelegate:
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 1,
|
crossAxisCount: 1,
|
||||||
crossAxisSpacing: 10.0,
|
crossAxisSpacing: 10.0,
|
||||||
mainAxisSpacing: 0.0,
|
mainAxisSpacing: 0.0,
|
||||||
|
@ -117,8 +114,7 @@ class _UpArrowLinkedLocalsComponentWidgetState
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
itemCount: eachLocals.length,
|
itemCount: eachLocals.length,
|
||||||
itemBuilder: (context, eachLocalsIndex) {
|
itemBuilder: (context, eachLocalsIndex) {
|
||||||
final eachLocalsItem =
|
final eachLocalsItem = eachLocals[eachLocalsIndex];
|
||||||
eachLocals[eachLocalsIndex];
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -141,40 +137,31 @@ class _UpArrowLinkedLocalsComponentWidgetState
|
||||||
width: 50.0,
|
width: 50.0,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
alignment:
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment:
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
MainAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.primaryText,
|
borderRadius: const BorderRadius.only(
|
||||||
borderRadius:
|
|
||||||
const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(25.0),
|
bottomLeft: Radius.circular(25.0),
|
||||||
bottomRight:
|
bottomRight: Radius.circular(25.0),
|
||||||
Radius.circular(25.0),
|
|
||||||
topLeft: Radius.circular(25.0),
|
topLeft: Radius.circular(25.0),
|
||||||
topRight: Radius.circular(25.0),
|
topRight: Radius.circular(25.0),
|
||||||
),
|
),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.secondaryText,
|
|
||||||
width: 3.0,
|
width: 3.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius:
|
borderRadius: const BorderRadius.only(
|
||||||
const BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(25.0),
|
bottomLeft: Radius.circular(25.0),
|
||||||
bottomRight:
|
bottomRight: Radius.circular(25.0),
|
||||||
Radius.circular(25.0),
|
|
||||||
topLeft: Radius.circular(25.0),
|
topLeft: Radius.circular(25.0),
|
||||||
topRight: Radius.circular(25.0),
|
topRight: Radius.circular(25.0),
|
||||||
),
|
),
|
||||||
|
@ -187,36 +174,23 @@ class _UpArrowLinkedLocalsComponentWidgetState
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
alignment:
|
alignment: const Alignment(0.0, 0.0),
|
||||||
const Alignment(0.0, 0.0),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||||
.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
getJsonField(
|
getJsonField(
|
||||||
eachLocalsItem,
|
eachLocalsItem,
|
||||||
r'''$.CLI_NOME''',
|
r'''$.CLI_NOME''',
|
||||||
).toString(),
|
).toString(),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.asMap()
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -4,8 +4,7 @@ import 'package:hub/shared/utils/storage_util.dart';
|
||||||
|
|
||||||
import '/backend/api_requests/api_calls.dart';
|
import '/backend/api_requests/api_calls.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'access_notification_modal_template_component_widget.dart'
|
import 'access_notification_modal_template_component_widget.dart' show AccessNotificationModalTemplateComponentWidget;
|
||||||
show AccessNotificationModalTemplateComponentWidget;
|
|
||||||
|
|
||||||
class AccessNotificationModalTemplateComponentModel
|
class AccessNotificationModalTemplateComponentModel
|
||||||
extends FlutterFlowModel<AccessNotificationModalTemplateComponentWidget> {
|
extends FlutterFlowModel<AccessNotificationModalTemplateComponentWidget> {
|
||||||
|
|
|
@ -41,8 +41,7 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
_model = createModel(
|
_model = createModel(context, () => AccessNotificationModalTemplateComponentModel());
|
||||||
context, () => AccessNotificationModalTemplateComponentModel());
|
|
||||||
|
|
||||||
_model.textController1 ??= TextEditingController(text: widget.name);
|
_model.textController1 ??= TextEditingController(text: widget.name);
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
@ -66,11 +65,9 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
String labelTypeResident = FFLocalizations.of(context)
|
String labelTypeResident = FFLocalizations.of(context).getVariableText(enText: 'Resident', ptText: 'Morador');
|
||||||
.getVariableText(enText: 'Resident', ptText: 'Morador');
|
|
||||||
|
|
||||||
String labelTypeVisitor = FFLocalizations.of(context)
|
String labelTypeVisitor = FFLocalizations.of(context).getVariableText(enText: 'Visitor', ptText: 'Visitante');
|
||||||
.getVariableText(enText: 'Visitor', ptText: 'Visitante');
|
|
||||||
|
|
||||||
return Align(
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
|
@ -113,13 +110,10 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
].addToStart(const SizedBox(width: 10.0)).addToEnd(const SizedBox(width: 10.0)),
|
||||||
.addToStart(const SizedBox(width: 10.0))
|
|
||||||
.addToEnd(const SizedBox(width: 10.0)),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -132,25 +126,19 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'dvag09pq' /* Nome */,
|
'dvag09pq' /* Nome */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -162,18 +150,16 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator:
|
validator: _model.textController1Validator.asValidator(context),
|
||||||
_model.textController1Validator.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
@ -181,10 +167,8 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: TextEditingController(
|
controller:
|
||||||
text: widget.type == 'O'
|
TextEditingController(text: widget.type == 'O' ? labelTypeResident : labelTypeVisitor),
|
||||||
? labelTypeResident
|
|
||||||
: labelTypeVisitor),
|
|
||||||
focusNode: _model.textFieldFocusNode2,
|
focusNode: _model.textFieldFocusNode2,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
|
@ -195,27 +179,19 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'h3s0r1he' /* Tipo */,
|
'h3s0r1he' /* Tipo */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -227,28 +203,22 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController2Validator
|
validator: _model.textController2Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
].addToStart(const SizedBox(width: 24.0)).addToEnd(const SizedBox(width: 24.0)),
|
||||||
.addToStart(const SizedBox(width: 24.0))
|
|
||||||
.addToEnd(const SizedBox(width: 24.0)),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -261,25 +231,19 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'jveeqpdz' /* Acesso */,
|
'jveeqpdz' /* Acesso */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -291,23 +255,20 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator:
|
validator: _model.textController3Validator.asValidator(context),
|
||||||
_model.textController3Validator.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
focusNode: _model.textFieldFocusNode4,
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
@ -322,24 +283,18 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
enText: 'Access Sector',
|
enText: 'Access Sector',
|
||||||
ptText: 'Setor de Acesso',
|
ptText: 'Setor de Acesso',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -351,16 +306,14 @@ class _AccessNotificationModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
validator:
|
validator: _model.textController4Validator.asValidator(context),
|
||||||
_model.textController4Validator.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'card_item_template_component_widget.dart'
|
import 'card_item_template_component_widget.dart' show CardItemTemplateComponentWidget;
|
||||||
show CardItemTemplateComponentWidget;
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CardItemTemplateComponentModel extends FlutterFlowModel<CardItemTemplateComponentWidget> {
|
||||||
class CardItemTemplateComponentModel
|
|
||||||
extends FlutterFlowModel<CardItemTemplateComponentWidget> {
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -25,12 +25,10 @@ class CardItemTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function()? onTapCardItemAction;
|
final Future Function()? onTapCardItemAction;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<CardItemTemplateComponentWidget> createState() =>
|
State<CardItemTemplateComponentWidget> createState() => _CardItemTemplateComponentWidgetState();
|
||||||
_CardItemTemplateComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _CardItemTemplateComponentWidgetState
|
class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateComponentWidget> {
|
||||||
extends State<CardItemTemplateComponentWidget> {
|
|
||||||
late CardItemTemplateComponentModel _model;
|
late CardItemTemplateComponentModel _model;
|
||||||
late LinkedHashMap<String, String> labelsLinkedHashMap;
|
late LinkedHashMap<String, String> labelsLinkedHashMap;
|
||||||
late List<LinkedHashMap<String, Color>> statusLinkedHashMap;
|
late List<LinkedHashMap<String, Color>> statusLinkedHashMap;
|
||||||
|
@ -40,9 +38,7 @@ class _CardItemTemplateComponentWidgetState
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => CardItemTemplateComponentModel());
|
_model = createModel(context, () => CardItemTemplateComponentModel());
|
||||||
labelsLinkedHashMap = LinkedHashMap.from(widget.labelsHashMap ?? {});
|
labelsLinkedHashMap = LinkedHashMap.from(widget.labelsHashMap ?? {});
|
||||||
statusLinkedHashMap = widget.statusHashMap
|
statusLinkedHashMap = widget.statusHashMap.map((map) => LinkedHashMap<String, Color>.from(map ?? {})).toList();
|
||||||
.map((map) => LinkedHashMap<String, Color>.from(map ?? {}))
|
|
||||||
.toList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -70,8 +66,7 @@ class _CardItemTemplateComponentWidgetState
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -85,8 +80,7 @@ class _CardItemTemplateComponentWidgetState
|
||||||
fontSize: 12.5,
|
fontSize: 12.5,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -174,9 +168,7 @@ class _CardItemTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_generateImage(),
|
_generateImage(),
|
||||||
]
|
].addToEnd(const SizedBox(width: 10)).addToStart(const SizedBox(width: 10)),
|
||||||
.addToEnd(const SizedBox(width: 10))
|
|
||||||
.addToStart(const SizedBox(width: 10)),
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Column(
|
return Column(
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'change_pass_widget.dart'
|
import 'change_pass_widget.dart' show PassKeyTemplateWidget;
|
||||||
show PassKeyTemplateWidget;
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class PassKeyTemplateComponentModel extends FlutterFlowModel<PassKeyTemplateWidget> {
|
||||||
class PassKeyTemplateComponentModel
|
|
||||||
extends FlutterFlowModel<PassKeyTemplateWidget> {
|
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
|
@ -18,15 +15,14 @@ class PassKeyTemplateComponentModel
|
||||||
late bool keyTextFieldVisibility2;
|
late bool keyTextFieldVisibility2;
|
||||||
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator1;
|
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator1;
|
||||||
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator2;
|
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator2;
|
||||||
String? _keyTextFieldTextControllerValidator(
|
String? _keyTextFieldTextControllerValidator(BuildContext context, String? val) {
|
||||||
BuildContext context, String? val) {
|
if (val == null || val.isEmpty) {
|
||||||
if (val == null || val.isEmpty ) {
|
|
||||||
return FFLocalizations.of(context).getVariableText(
|
return FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'This field is required',
|
enText: 'This field is required',
|
||||||
ptText: 'Este campo é obrigatório',
|
ptText: 'Este campo é obrigatório',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ( val.length < 4 ) {
|
if (val.length < 4) {
|
||||||
return FFLocalizations.of(context).getVariableText(
|
return FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'This field must have at least 4 characters',
|
enText: 'This field must have at least 4 characters',
|
||||||
ptText: 'Este campo deve ter pelo menos 4 caracteres',
|
ptText: 'Este campo deve ter pelo menos 4 caracteres',
|
||||||
|
|
|
@ -81,8 +81,7 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
tablet: false,
|
tablet: false,
|
||||||
))
|
))
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -95,8 +94,7 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
0.0, 12.0, 0.0, 12.0),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_rounded,
|
Icons.arrow_back_rounded,
|
||||||
color: Color(0xFF15161E),
|
color: Color(0xFF15161E),
|
||||||
|
@ -104,19 +102,16 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||||
12.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style:
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: const Color(0xFF15161E),
|
color: const Color(0xFF15161E),
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -125,14 +120,11 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'INSERT PASSWORD',
|
enText: 'INSERT PASSWORD',
|
||||||
ptText: StorageUtil().accessPass != ''
|
ptText: StorageUtil().accessPass != '' ? 'ALTERAR SENHA' : 'ADICIONAR SENHA',
|
||||||
? 'ALTERAR SENHA'
|
|
||||||
: 'ADICIONAR SENHA',
|
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Outfit',
|
fontFamily: 'Outfit',
|
||||||
|
@ -145,20 +137,17 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Enter your password to continue',
|
enText: 'Enter your password to continue', ptText: 'Digite sua senha para continuar'),
|
||||||
ptText: 'Digite sua senha para continuar'),
|
|
||||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -168,8 +157,7 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||||
16.0, 12.0, 16.0, 0.0),
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
@ -188,36 +176,29 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
obscureText: !_model.keyTextFieldVisibility1,
|
obscureText: !_model.keyTextFieldVisibility1,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText:
|
labelText: FFLocalizations.of(context).getVariableText(
|
||||||
FFLocalizations.of(context).getVariableText(
|
|
||||||
ptText: 'Senha',
|
ptText: 'Senha',
|
||||||
enText: 'Password',
|
enText: 'Password',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getVariableText(
|
hintText: FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Digite a sua senha.....',
|
ptText: 'Digite a sua senha.....',
|
||||||
enText: 'Enter your password.....',
|
enText: 'Enter your password.....',
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -248,14 +229,11 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor:
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
FlutterFlowTheme.of(context).primaryBackground,
|
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: InkWell(
|
suffixIcon: InkWell(
|
||||||
onTap: () => setState(
|
onTap: () => setState(
|
||||||
() => _model.keyTextFieldVisibility1 =
|
() => _model.keyTextFieldVisibility1 = !_model.keyTextFieldVisibility1,
|
||||||
!_model.keyTextFieldVisibility1,
|
|
||||||
),
|
),
|
||||||
focusNode: FocusNode(skipTraversal: true),
|
focusNode: FocusNode(skipTraversal: true),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
|
@ -273,20 +251,14 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
maxLength: 4,
|
maxLength: 4,
|
||||||
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
||||||
buildCounter: (context,
|
buildCounter: (context, {required currentLength, required isFocused, maxLength}) => null,
|
||||||
{required currentLength,
|
|
||||||
required isFocused,
|
|
||||||
maxLength}) =>
|
|
||||||
null,
|
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
validator: _model.keyTextFieldTextControllerValidator1
|
validator: _model.keyTextFieldTextControllerValidator1.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
LengthLimitingTextInputFormatter(4),
|
LengthLimitingTextInputFormatter(4),
|
||||||
|
@ -300,12 +272,10 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (_model.formKey.currentState == null ||
|
if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
|
||||||
!_model.formKey.currentState!.validate()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await widget.toggleActionStatus?.call(
|
await widget.toggleActionStatus?.call(
|
||||||
|
@ -317,20 +287,14 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
context.pop(true);
|
context.pop(true);
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getVariableText(
|
text: FFLocalizations.of(context).getVariableText(
|
||||||
ptText: StorageUtil().accessPass != ''
|
ptText: StorageUtil().accessPass != '' ? 'Alterar' : 'Adicionar',
|
||||||
? 'Alterar'
|
enText: StorageUtil().accessPass != '' ? 'Change' : 'Add',
|
||||||
: 'Adicionar',
|
|
||||||
enText: StorageUtil().accessPass != ''
|
|
||||||
? 'Change'
|
|
||||||
: 'Add',
|
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 270.0,
|
width: 270.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: const Color(0xFF1AAB5F),
|
color: const Color(0xFF1AAB5F),
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -338,8 +302,7 @@ class _PassKeyTemplateWidgetState extends State<PassKeyTemplateWidget> {
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
|
|
@ -7,7 +7,6 @@ import 'package:hub/components/templates_components/details_component/details_co
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
|
||||||
|
|
||||||
class DetailsComponentWidget extends StatefulWidget {
|
class DetailsComponentWidget extends StatefulWidget {
|
||||||
const DetailsComponentWidget({
|
const DetailsComponentWidget({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -31,13 +30,10 @@ class DetailsComponentWidget extends StatefulWidget {
|
||||||
class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
late DetailsComponentModel _model;
|
late DetailsComponentModel _model;
|
||||||
|
|
||||||
LinkedHashMap<String, String> get labelsLinkedHashMap =>
|
LinkedHashMap<String, String> get labelsLinkedHashMap => LinkedHashMap.from(widget.labelsHashMap);
|
||||||
LinkedHashMap.from(widget.labelsHashMap);
|
|
||||||
|
|
||||||
List<LinkedHashMap<String, Color>> get statusLinkedHashMap =>
|
List<LinkedHashMap<String, Color>> get statusLinkedHashMap =>
|
||||||
widget.statusHashMap
|
widget.statusHashMap.map((map) => LinkedHashMap<String, Color>.from(map ?? {})).toList();
|
||||||
.map((map) => LinkedHashMap<String, Color>.from(map ?? {}))
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void setState(VoidCallback callback) {
|
void setState(VoidCallback callback) {
|
||||||
|
@ -96,8 +92,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
SizedBox(height: MediaQuery.of(context).size.height * 0.03),
|
SizedBox(height: MediaQuery.of(context).size.height * 0.03),
|
||||||
Row(
|
Row(
|
||||||
children: statusLinkedHashMap.expand((linkedHashMap) {
|
children: statusLinkedHashMap.expand((linkedHashMap) {
|
||||||
return linkedHashMap.entries
|
return linkedHashMap.entries.map((MapEntry<String, Color> item) {
|
||||||
.map((MapEntry<String, Color> item) {
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
|
@ -121,29 +116,21 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: item.value,
|
fillColor: item.value,
|
||||||
labelText: item.key,
|
labelText: item.key,
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.labelMediumFamily,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.labelMediumFamily,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -155,8 +142,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
@ -166,8 +152,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController1Validator
|
validator: _model.textController1Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -187,8 +172,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
initialValue: '$value',
|
initialValue: '$value',
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
@ -202,26 +186,19 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
@ -231,29 +208,25 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryBackground, // Change border color here
|
||||||
.primaryBackground, // Change border color here
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -261,8 +234,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
|
SizedBox(height: MediaQuery.of(context).size.height * 0.02),
|
||||||
if (widget.buttons
|
if (widget.buttons.isNotEmpty) // Adicione este SizedBox com a altura desejada
|
||||||
.isNotEmpty) // Adicione este SizedBox com a altura desejada
|
|
||||||
OverflowBar(
|
OverflowBar(
|
||||||
overflowAlignment: OverflowBarAlignment.center,
|
overflowAlignment: OverflowBarAlignment.center,
|
||||||
overflowSpacing: 2,
|
overflowSpacing: 2,
|
||||||
|
|
|
@ -2,12 +2,10 @@ import 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
|
||||||
import '/backend/api_requests/api_calls.dart';
|
import '/backend/api_requests/api_calls.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'forgot_password_template_component_widget.dart'
|
import 'forgot_password_template_component_widget.dart' show ForgotPasswordTemplateComponentWidget;
|
||||||
show ForgotPasswordTemplateComponentWidget;
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ForgotPasswordTemplateComponentModel
|
class ForgotPasswordTemplateComponentModel extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
|
||||||
extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
|
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
|
@ -15,8 +13,7 @@ class ForgotPasswordTemplateComponentModel
|
||||||
FocusNode? emailAddressFocusNode;
|
FocusNode? emailAddressFocusNode;
|
||||||
TextEditingController? emailAddressTextController;
|
TextEditingController? emailAddressTextController;
|
||||||
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
||||||
String? _emailAddressTextControllerValidator(
|
String? _emailAddressTextControllerValidator(BuildContext context, String? val) {
|
||||||
BuildContext context, String? val) {
|
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getText(
|
return FFLocalizations.of(context).getText(
|
||||||
'snnmkbyc' /* E-mail é Obrigatório */,
|
'snnmkbyc' /* E-mail é Obrigatório */,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:easy_debounce/easy_debounce.dart';
|
import 'package:easy_debounce/easy_debounce.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
@ -19,12 +18,10 @@ class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
|
||||||
const ForgotPasswordTemplateComponentWidget({super.key});
|
const ForgotPasswordTemplateComponentWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ForgotPasswordTemplateComponentWidget> createState() =>
|
State<ForgotPasswordTemplateComponentWidget> createState() => _ForgotPasswordTemplateComponentWidgetState();
|
||||||
_ForgotPasswordTemplateComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ForgotPasswordTemplateComponentWidgetState
|
class _ForgotPasswordTemplateComponentWidgetState extends State<ForgotPasswordTemplateComponentWidget> {
|
||||||
extends State<ForgotPasswordTemplateComponentWidget> {
|
|
||||||
late ForgotPasswordTemplateComponentModel _model;
|
late ForgotPasswordTemplateComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -79,8 +76,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
tablet: false,
|
tablet: false,
|
||||||
))
|
))
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: const ValueKey<String>('BackButton'),
|
key: const ValueKey<String>('BackButton'),
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
@ -94,8 +90,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
0.0, 12.0, 0.0, 12.0),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_rounded,
|
Icons.arrow_back_rounded,
|
||||||
color: Color(0xFF15161E),
|
color: Color(0xFF15161E),
|
||||||
|
@ -121,8 +116,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
|
@ -136,8 +130,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText('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(
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
|
@ -146,8 +139,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -155,8 +147,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
@ -180,8 +171,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
@ -211,8 +201,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
||||||
24.0, 24.0, 20.0, 24.0),
|
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.email,
|
Icons.email,
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -225,14 +214,12 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
validator: _model.emailAddressTextControllerValidator
|
validator: _model.emailAddressTextControllerValidator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -240,27 +227,22 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('SendButtonWidget'),
|
key: const ValueKey<String>('SendButtonWidget'),
|
||||||
onPressed: (_model.emailAddressTextController.text == '' ||
|
onPressed: (_model.emailAddressTextController.text == '' ||
|
||||||
!ValidatorUtil.isValidEmail(
|
!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
|
||||||
_model.emailAddressTextController.text))
|
|
||||||
? null
|
? null
|
||||||
: () async => AuthenticationService.forgotPassword(context, _model.emailAddressTextController.text),
|
: () async =>
|
||||||
|
AuthenticationService.forgotPassword(context, _model.emailAddressTextController.text),
|
||||||
|
|
||||||
text: FFLocalizations.of(context).getText(
|
text: FFLocalizations.of(context).getText(
|
||||||
'74rnd5bu' /* Enviar */,
|
'74rnd5bu' /* Enviar */,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 270.0,
|
width: 270.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -268,8 +250,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
|
|
@ -4,8 +4,7 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
|
|
||||||
class LiberationHistoryItemDetailsTemplateComponentModel
|
class LiberationHistoryItemDetailsTemplateComponentModel
|
||||||
extends FlutterFlowModel<
|
extends FlutterFlowModel<LiberationHistoryItemDetailsTemplateComponentWidget> {
|
||||||
LiberationHistoryItemDetailsTemplateComponentWidget> {
|
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
late final String cliUUID;
|
late final String cliUUID;
|
||||||
|
|
|
@ -5,8 +5,7 @@ import 'package:hub/components/templates_components/liberation_history_item_deta
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
|
||||||
class LiberationHistoryItemDetailsTemplateComponentWidget
|
class LiberationHistoryItemDetailsTemplateComponentWidget extends StatefulWidget {
|
||||||
extends StatefulWidget {
|
|
||||||
const LiberationHistoryItemDetailsTemplateComponentWidget({
|
const LiberationHistoryItemDetailsTemplateComponentWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.name,
|
required this.name,
|
||||||
|
@ -40,8 +39,7 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(
|
_model = createModel(context, () => LiberationHistoryItemDetailsTemplateComponentModel());
|
||||||
context, () => LiberationHistoryItemDetailsTemplateComponentModel());
|
|
||||||
|
|
||||||
_model.textController1 ??= TextEditingController(text: widget.name);
|
_model.textController1 ??= TextEditingController(text: widget.name);
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
@ -106,13 +104,10 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
].addToStart(const SizedBox(width: 10.0)).addToEnd(const SizedBox(width: 10.0)),
|
||||||
.addToStart(const SizedBox(width: 10.0))
|
|
||||||
.addToEnd(const SizedBox(width: 10.0)),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -125,25 +120,19 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'dmazrriq' /* Nome */,
|
'dmazrriq' /* Nome */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -155,18 +144,16 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator:
|
validator: _model.textController1Validator.asValidator(context),
|
||||||
_model.textController1Validator.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
@ -185,27 +172,19 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'xx3ivbr4' /* Tipo */,
|
'xx3ivbr4' /* Tipo */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -217,28 +196,22 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator: _model.textController2Validator
|
validator: _model.textController2Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
].addToStart(const SizedBox(width: 24.0)).addToEnd(const SizedBox(width: 24.0)),
|
||||||
.addToStart(const SizedBox(width: 24.0))
|
|
||||||
.addToEnd(const SizedBox(width: 24.0)),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -251,25 +224,19 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'rhheok7k' /* Acesso */,
|
'rhheok7k' /* Acesso */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -281,23 +248,20 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
validator:
|
validator: _model.textController3Validator.asValidator(context),
|
||||||
_model.textController3Validator.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
focusNode: _model.textFieldFocusNode4,
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
@ -311,24 +275,18 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'w3tciqlv' /* Acionamento */,
|
'w3tciqlv' /* Acionamento */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -340,16 +298,14 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
validator:
|
validator: _model.textController4Validator.asValidator(context),
|
||||||
_model.textController4Validator.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -36,8 +36,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(
|
_model = createModel(context, () => MessageNotificationModalTemplateComponentModel());
|
||||||
context, () => MessageNotificationModalTemplateComponentModel());
|
|
||||||
|
|
||||||
_model.textController1 ??= TextEditingController(text: widget.message);
|
_model.textController1 ??= TextEditingController(text: widget.message);
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
@ -76,8 +75,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -92,20 +90,16 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
enText: 'Message',
|
enText: 'Message',
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -120,8 +114,7 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -146,85 +139,19 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
ptText: 'De',
|
ptText: 'De',
|
||||||
enText: 'From',
|
enText: 'From',
|
||||||
),
|
),
|
||||||
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),
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
enabledBorder: InputBorder.none,
|
|
||||||
focusedBorder: InputBorder.none,
|
|
||||||
errorBorder: InputBorder.none,
|
|
||||||
focusedErrorBorder: InputBorder.none,
|
|
||||||
suffixIcon: Icon(
|
|
||||||
Icons.person,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: 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),
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
maxLines: null,
|
|
||||||
keyboardType: TextInputType.name,
|
|
||||||
validator:
|
|
||||||
_model.textController2Validator.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.addToStart(const SizedBox(width: 24.0))
|
|
||||||
.addToEnd(const SizedBox(width: 24.0)),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController3,
|
|
||||||
focusNode: _model.textFieldFocusNode3,
|
|
||||||
autofocus: false,
|
|
||||||
textInputAction: TextInputAction.next,
|
|
||||||
readOnly: true,
|
|
||||||
obscureText: false,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
isDense: true,
|
|
||||||
labelText: FFLocalizations.of(context).getVariableText(
|
|
||||||
ptText: 'Para',
|
|
||||||
enText: 'To',
|
|
||||||
),
|
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
|
@ -239,8 +166,58 @@ class _MessageNotificationModalTemplateComponentWidgetState
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
maxLines: null,
|
||||||
|
keyboardType: TextInputType.name,
|
||||||
|
validator: _model.textController2Validator.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].addToStart(const SizedBox(width: 24.0)).addToEnd(const SizedBox(width: 24.0)),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController3,
|
||||||
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
autofocus: false,
|
||||||
|
textInputAction: TextInputAction.next,
|
||||||
|
readOnly: true,
|
||||||
|
obscureText: false,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
labelText: FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Para',
|
||||||
|
enText: 'To',
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
enabledBorder: InputBorder.none,
|
||||||
|
focusedBorder: InputBorder.none,
|
||||||
|
errorBorder: InputBorder.none,
|
||||||
|
focusedErrorBorder: InputBorder.none,
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.person,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: 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),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
|
|
@ -4,8 +4,7 @@ import 'package:hub/components/templates_components/provisional_schedule_templat
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
|
|
||||||
class ScheduleProvisionalVisitPageModel
|
class ScheduleProvisionalVisitPageModel extends FlutterFlowModel<ScheduleProvisionalVisitPageWidget> {
|
||||||
extends FlutterFlowModel<ScheduleProvisionalVisitPageWidget> {
|
|
||||||
String cliUUID = '';
|
String cliUUID = '';
|
||||||
String devUUID = '';
|
String devUUID = '';
|
||||||
String userUUID = '';
|
String userUUID = '';
|
||||||
|
@ -19,25 +18,21 @@ class ScheduleProvisionalVisitPageModel
|
||||||
void addToVisitors(dynamic item) => visitors.add(item);
|
void addToVisitors(dynamic item) => visitors.add(item);
|
||||||
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
||||||
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
||||||
void insertAtIndexInVisitors(int index, dynamic item) =>
|
void insertAtIndexInVisitors(int index, dynamic item) => visitors.insert(index, item);
|
||||||
visitors.insert(index, item);
|
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => visitors[index] = updateFn(visitors[index]);
|
||||||
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) =>
|
|
||||||
visitors[index] = updateFn(visitors[index]);
|
|
||||||
|
|
||||||
List<String> docs = [];
|
List<String> docs = [];
|
||||||
void addToDocs(String item) => docs.add(item);
|
void addToDocs(String item) => docs.add(item);
|
||||||
void removeFromDocs(String item) => docs.remove(item);
|
void removeFromDocs(String item) => docs.remove(item);
|
||||||
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
||||||
void insertAtIndexInDocs(int index, String item) => docs.insert(index, item);
|
void insertAtIndexInDocs(int index, String item) => docs.insert(index, item);
|
||||||
void updateDocsAtIndex(int index, Function(String) updateFn) =>
|
void updateDocsAtIndex(int index, Function(String) updateFn) => docs[index] = updateFn(docs[index]);
|
||||||
docs[index] = updateFn(docs[index]);
|
|
||||||
|
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
FocusNode? personNameFocusNode;
|
FocusNode? personNameFocusNode;
|
||||||
TextEditingController? personNameTextController;
|
TextEditingController? personNameTextController;
|
||||||
String? Function(BuildContext, String?)? personNameTextControllerValidator;
|
String? Function(BuildContext, String?)? personNameTextControllerValidator;
|
||||||
String? _personNameTextControllerValidator(
|
String? _personNameTextControllerValidator(BuildContext context, String? val) {
|
||||||
BuildContext context, String? val) {
|
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getText(
|
return FFLocalizations.of(context).getText(
|
||||||
'3hqg8buh',
|
'3hqg8buh',
|
||||||
|
@ -110,8 +105,7 @@ class ScheduleProvisionalVisitPageModel
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isFormValid() {
|
bool isFormValid() {
|
||||||
if (personNameTextController.text == '' ||
|
if (personNameTextController.text == '' || personNameTextController.text.length > 80) {
|
||||||
personNameTextController.text.length > 80) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,12 +115,10 @@ class ScheduleProvisionalVisitPageModel
|
||||||
|
|
||||||
DateTime selectedDateTime;
|
DateTime selectedDateTime;
|
||||||
DateTime currentDateTime = DateTime.now();
|
DateTime currentDateTime = DateTime.now();
|
||||||
selectedDateTime =
|
selectedDateTime = DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||||
DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
selectedDateTime =
|
selectedDateTime = DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
||||||
DateFormat('dd/MM/yyyy HH:mm:ss').parse(dateTimeTextController.text);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -93,7 +94,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -130,7 +132,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
fadeInDuration: const Duration(milliseconds: 200),
|
fadeInDuration: const Duration(milliseconds: 200),
|
||||||
fadeOutDuration: const Duration(milliseconds: 200),
|
fadeOutDuration: const Duration(milliseconds: 200),
|
||||||
imageUrl: 'https://freaccess.com.br/freaccess/Images/Clients/${model.cliUUID}.png',
|
imageUrl:
|
||||||
|
'https://freaccess.com.br/freaccess/Images/Clients/${model.cliUUID}.png',
|
||||||
width: 35.0,
|
width: 35.0,
|
||||||
height: 35.0,
|
height: 35.0,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
|
@ -145,7 +148,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -173,7 +177,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -193,7 +198,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
controller: model.personNameTextController,
|
controller: model.personNameTextController,
|
||||||
focusNode: model.personNameFocusNode,
|
focusNode: model.personNameFocusNode,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
onChanged: (_) => EasyDebounce.debounce('model.personNameTextController', const Duration(milliseconds: 500), () => setState(() {})),
|
onChanged: (_) => EasyDebounce.debounce('model.personNameTextController',
|
||||||
|
const Duration(milliseconds: 500), () => setState(() {})),
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
|
@ -204,13 +210,15 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -249,7 +257,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -275,7 +284,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
controller: model.dateTimeTextController,
|
controller: model.dateTimeTextController,
|
||||||
focusNode: model.dateTimeFocusNode,
|
focusNode: model.dateTimeFocusNode,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
onChanged: (_) => EasyDebounce.debounce('model.dateTimeTextController', const Duration(milliseconds: 500), () => setState(() {})),
|
onChanged: (_) => EasyDebounce.debounce('model.dateTimeTextController',
|
||||||
|
const Duration(milliseconds: 500), () => setState(() {})),
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
|
@ -285,7 +295,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
labelStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -323,7 +334,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
validator: model.dateTimeTextControllerValidator.asValidator(context),
|
validator: model.dateTimeTextControllerValidator.asValidator(context),
|
||||||
|
@ -348,18 +360,25 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
child!,
|
child!,
|
||||||
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
|
headerTextStyle:
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
|
FlutterFlowTheme.of(context).headlineLarge.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).headlineLargeFamily,
|
||||||
fontSize: 32.0,
|
fontSize: 32.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||||
),
|
),
|
||||||
pickerBackgroundColor: FlutterFlowTheme.of(context).secondaryBackground,
|
pickerBackgroundColor:
|
||||||
|
FlutterFlowTheme.of(context).secondaryBackground,
|
||||||
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
pickerForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
||||||
selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
|
selectedDateTimeBackgroundColor:
|
||||||
selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
|
FlutterFlowTheme.of(context).primary,
|
||||||
actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
selectedDateTimeForegroundColor:
|
||||||
|
FlutterFlowTheme.of(context).info,
|
||||||
|
actionButtonForegroundColor:
|
||||||
|
FlutterFlowTheme.of(context).primaryText,
|
||||||
iconSize: 24.0,
|
iconSize: 24.0,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -376,19 +395,27 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
child!,
|
child!,
|
||||||
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
headerBackgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
headerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
headerTextStyle: FlutterFlowTheme.of(context).headlineLarge.override(
|
headerTextStyle:
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineLargeFamily,
|
FlutterFlowTheme.of(context).headlineLarge.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context).headlineLargeFamily,
|
||||||
fontSize: 32.0,
|
fontSize: 32.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).headlineLargeFamily),
|
||||||
),
|
),
|
||||||
pickerBackgroundColor: FlutterFlowTheme.of(context).secondaryBackground,
|
pickerBackgroundColor:
|
||||||
|
FlutterFlowTheme.of(context).secondaryBackground,
|
||||||
pickerForegroundColor: FlutterFlowTheme.of(context).info,
|
pickerForegroundColor: FlutterFlowTheme.of(context).info,
|
||||||
selectedDateTimeBackgroundColor: FlutterFlowTheme.of(context).primary,
|
selectedDateTimeBackgroundColor:
|
||||||
pickerDialForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
FlutterFlowTheme.of(context).primary,
|
||||||
selectedDateTimeForegroundColor: FlutterFlowTheme.of(context).info,
|
pickerDialForegroundColor:
|
||||||
actionButtonForegroundColor: FlutterFlowTheme.of(context).primaryText,
|
FlutterFlowTheme.of(context).primaryText,
|
||||||
|
selectedDateTimeForegroundColor:
|
||||||
|
FlutterFlowTheme.of(context).info,
|
||||||
|
actionButtonForegroundColor:
|
||||||
|
FlutterFlowTheme.of(context).primaryText,
|
||||||
iconSize: 24.0,
|
iconSize: 24.0,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -413,7 +440,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
model.datePicked,
|
model.datePicked,
|
||||||
locale: FFLocalizations.of(context).languageCode,
|
locale: FFLocalizations.of(context).languageCode,
|
||||||
);
|
);
|
||||||
model.dateTimeTextController?.selection = TextSelection.collapsed(offset: model.dateTimeTextController!.text.length);
|
model.dateTimeTextController?.selection = TextSelection.collapsed(
|
||||||
|
offset: model.dateTimeTextController!.text.length);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -462,13 +490,15 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -507,7 +537,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
|
@ -538,7 +569,9 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
nome: model.personNameTextController.text,
|
nome: model.personNameTextController.text,
|
||||||
proID: model.ownerUUID,
|
proID: model.ownerUUID,
|
||||||
);
|
);
|
||||||
if (PhpGroup.postProvVisitSchedulingCall.error((model.provVisitSchedule?.jsonBody ?? '')) == false) {
|
if (PhpGroup.postProvVisitSchedulingCall
|
||||||
|
.error((model.provVisitSchedule?.jsonBody ?? '')) ==
|
||||||
|
false) {
|
||||||
DialogUtil.success(
|
DialogUtil.success(
|
||||||
context,
|
context,
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
@ -551,7 +584,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
model.notesTextController?.clear();
|
model.notesTextController?.clear();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var message = PhpGroup.postProvVisitSchedulingCall.msg((model.provVisitSchedule?.jsonBody ?? ''));
|
var message = PhpGroup.postProvVisitSchedulingCall
|
||||||
|
.msg((model.provVisitSchedule?.jsonBody ?? ''));
|
||||||
if (message != null) {
|
if (message != null) {
|
||||||
DialogUtil.error(context, message);
|
DialogUtil.error(context, message);
|
||||||
} else {
|
} else {
|
||||||
|
@ -561,7 +595,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
LogUtil.requestAPIFailed("processRequest.php", "", "Cadastrar Visita Provisória", e, s);
|
LogUtil.requestAPIFailed(
|
||||||
|
"processRequest.php", "", "Cadastrar Visita Provisória", e, s);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
|
@ -576,7 +611,8 @@ class _ScheduleProvisionalVisitPageWidgetState extends State<ScheduleProvisional
|
||||||
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'qr_code_pass_key_template_component_widget.dart'
|
import 'qr_code_pass_key_template_component_widget.dart' show QrCodePassKeyTemplateComponentWidget;
|
||||||
show QrCodePassKeyTemplateComponentWidget;
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class QrCodePassKeyTemplateComponentModel
|
class QrCodePassKeyTemplateComponentModel extends FlutterFlowModel<QrCodePassKeyTemplateComponentWidget> {
|
||||||
extends FlutterFlowModel<QrCodePassKeyTemplateComponentWidget> {
|
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
|
@ -13,8 +11,7 @@ class QrCodePassKeyTemplateComponentModel
|
||||||
TextEditingController? keyTextFieldTextController;
|
TextEditingController? keyTextFieldTextController;
|
||||||
late bool keyTextFieldVisibility;
|
late bool keyTextFieldVisibility;
|
||||||
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator;
|
String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator;
|
||||||
String? _keyTextFieldTextControllerValidator(
|
String? _keyTextFieldTextControllerValidator(BuildContext context, String? val) {
|
||||||
BuildContext context, String? val) {
|
|
||||||
if (val == null || val.isEmpty) {
|
if (val == null || val.isEmpty) {
|
||||||
return FFLocalizations.of(context).getVariableText(
|
return FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'This field is required',
|
enText: 'This field is required',
|
||||||
|
|
|
@ -19,12 +19,10 @@ class QrCodePassKeyTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function(String key)? toggleActionStatus;
|
final Future Function(String key)? toggleActionStatus;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<QrCodePassKeyTemplateComponentWidget> createState() =>
|
State<QrCodePassKeyTemplateComponentWidget> createState() => _QrCodePassKeyTemplateComponentWidgetState();
|
||||||
_QrCodePassKeyTemplateComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _QrCodePassKeyTemplateComponentWidgetState
|
class _QrCodePassKeyTemplateComponentWidgetState extends State<QrCodePassKeyTemplateComponentWidget> {
|
||||||
extends State<QrCodePassKeyTemplateComponentWidget> {
|
|
||||||
late QrCodePassKeyTemplateComponentModel _model;
|
late QrCodePassKeyTemplateComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -81,8 +79,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
tablet: false,
|
tablet: false,
|
||||||
))
|
))
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -95,8 +92,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsetsDirectional.fromSTEB(
|
padding: EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
0.0, 12.0, 0.0, 12.0),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_rounded,
|
Icons.arrow_back_rounded,
|
||||||
color: Color(0xFF15161E),
|
color: Color(0xFF15161E),
|
||||||
|
@ -104,19 +100,16 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||||
12.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'',
|
'',
|
||||||
style:
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: const Color(0xFF15161E),
|
color: const Color(0xFF15161E),
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -125,8 +118,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'h1xilful' /* DIGITE A SUA SENHA */,
|
'h1xilful' /* DIGITE A SUA SENHA */,
|
||||||
|
@ -142,8 +134,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
'ujodm2ci' /* Para gerar o QR Code digite a ... */,
|
||||||
|
@ -154,8 +145,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts:
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -163,8 +153,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
@ -185,28 +174,24 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'rfqrdet7' /* Senha */,
|
'rfqrdet7' /* Senha */,
|
||||||
),
|
),
|
||||||
labelStyle:
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'zz1haydj' /* digite a sua senha..... */,
|
'zz1haydj' /* digite a sua senha..... */,
|
||||||
),
|
),
|
||||||
hintStyle:
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -238,18 +223,14 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
contentPadding: const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
||||||
24.0, 24.0, 20.0, 24.0),
|
|
||||||
suffixIcon: InkWell(
|
suffixIcon: InkWell(
|
||||||
onTap: () => safeSetState(
|
onTap: () => safeSetState(
|
||||||
() => _model.keyTextFieldVisibility =
|
() => _model.keyTextFieldVisibility = !_model.keyTextFieldVisibility,
|
||||||
!_model.keyTextFieldVisibility,
|
|
||||||
),
|
),
|
||||||
focusNode: FocusNode(skipTraversal: true),
|
focusNode: FocusNode(skipTraversal: true),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
_model.keyTextFieldVisibility
|
_model.keyTextFieldVisibility ? Icons.visibility_outlined : Icons.visibility_off_outlined,
|
||||||
? Icons.visibility_outlined
|
|
||||||
: Icons.visibility_off_outlined,
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
size: 22.0,
|
size: 22.0,
|
||||||
),
|
),
|
||||||
|
@ -261,19 +242,13 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
maxLength: 4,
|
maxLength: 4,
|
||||||
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
maxLengthEnforcement: MaxLengthEnforcement.enforced,
|
||||||
buildCounter: (context,
|
buildCounter: (context, {required currentLength, required isFocused, maxLength}) => null,
|
||||||
{required currentLength,
|
|
||||||
required isFocused,
|
|
||||||
maxLength}) =>
|
|
||||||
null,
|
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
validator: _model.keyTextFieldTextControllerValidator
|
validator: _model.keyTextFieldTextControllerValidator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
LengthLimitingTextInputFormatter(4),
|
LengthLimitingTextInputFormatter(4),
|
||||||
|
@ -285,12 +260,10 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (_model.formKey.currentState == null ||
|
if (_model.formKey.currentState == null || !_model.formKey.currentState!.validate()) {
|
||||||
!_model.formKey.currentState!.validate()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await widget.toggleActionStatus?.call(
|
await widget.toggleActionStatus?.call(
|
||||||
|
@ -304,10 +277,8 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 270.0,
|
width: 270.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: const Color(0xFF1AAB5F),
|
color: const Color(0xFF1AAB5F),
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -315,8 +286,7 @@ class _QrCodePassKeyTemplateComponentWidgetState
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
|
|
@ -9,8 +9,7 @@ import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/form_field_controller.dart';
|
import '/flutter_flow/form_field_controller.dart';
|
||||||
import 'regisiter_vistor_template_component_widget.dart';
|
import 'regisiter_vistor_template_component_widget.dart';
|
||||||
|
|
||||||
class RegisiterVistorTemplateComponentModel
|
class RegisiterVistorTemplateComponentModel extends FlutterFlowModel<RegisiterVistorTemplateComponentWidget> {
|
||||||
extends FlutterFlowModel<RegisiterVistorTemplateComponentWidget> {
|
|
||||||
Timer? _debounceTimer;
|
Timer? _debounceTimer;
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
|
@ -18,8 +17,7 @@ class RegisiterVistorTemplateComponentModel
|
||||||
|
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
bool isDataUploading = false;
|
bool isDataUploading = false;
|
||||||
FFUploadedFile uploadedLocalFile =
|
FFUploadedFile uploadedLocalFile = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
|
||||||
|
|
||||||
void debounce(Function() fn, Duration time) {
|
void debounce(Function() fn, Duration time) {
|
||||||
if (_debounceTimer != null) {
|
if (_debounceTimer != null) {
|
||||||
|
@ -43,14 +41,12 @@ class RegisiterVistorTemplateComponentModel
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> getVisitanteByDocument(
|
Future<bool> getVisitanteByDocument(String document, BuildContext context) async {
|
||||||
String document, BuildContext context) async {
|
|
||||||
final response = await PhpGroup.getVisitorByDocCall.call(
|
final response = await PhpGroup.getVisitorByDocCall.call(
|
||||||
documento: document,
|
documento: document,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.jsonBody['visitante']['VTE_ID'] != '0' &&
|
if (response.jsonBody['visitante']['VTE_ID'] != '0' && response.jsonBody['error'] != 'false') {
|
||||||
response.jsonBody['error'] != 'false') {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -93,9 +89,7 @@ class RegisiterVistorTemplateComponentModel
|
||||||
TextEditingController? textController4;
|
TextEditingController? textController4;
|
||||||
String? Function(BuildContext, String?)? textController4Validator;
|
String? Function(BuildContext, String?)? textController4Validator;
|
||||||
String? _textController4Validator(BuildContext context, String? val) {
|
String? _textController4Validator(BuildContext context, String? val) {
|
||||||
if (val != null &&
|
if (val != null && val.isNotEmpty && ValidatorUtil.isValidEmail(val) == false) {
|
||||||
val.isNotEmpty &&
|
|
||||||
ValidatorUtil.isValidEmail(val) == false) {
|
|
||||||
return FFLocalizations.of(context).getVariableText(
|
return FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Invalid email',
|
enText: 'Invalid email',
|
||||||
ptText: 'Email inválido',
|
ptText: 'Email inválido',
|
||||||
|
|
|
@ -22,16 +22,13 @@ class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
|
||||||
final String source;
|
final String source;
|
||||||
final String? doc;
|
final String? doc;
|
||||||
|
|
||||||
const RegisiterVistorTemplateComponentWidget(
|
const RegisiterVistorTemplateComponentWidget({super.key, required this.source, this.doc});
|
||||||
{super.key, required this.source, this.doc});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<RegisiterVistorTemplateComponentWidget> createState() =>
|
State<RegisiterVistorTemplateComponentWidget> createState() => _RegisiterVistorTemplateComponentWidgetState();
|
||||||
_RegisiterVistorTemplateComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _RegisiterVistorTemplateComponentWidgetState
|
class _RegisiterVistorTemplateComponentWidgetState extends State<RegisiterVistorTemplateComponentWidget> {
|
||||||
extends State<RegisiterVistorTemplateComponentWidget> {
|
|
||||||
late RegisiterVistorTemplateComponentModel _model;
|
late RegisiterVistorTemplateComponentModel _model;
|
||||||
|
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
@ -51,8 +48,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
|
|
||||||
visitorAlreadyRegistered = BehaviorSubject<bool>.seeded(false);
|
visitorAlreadyRegistered = BehaviorSubject<bool>.seeded(false);
|
||||||
|
|
||||||
_model =
|
_model = createModel(context, () => RegisiterVistorTemplateComponentModel());
|
||||||
createModel(context, () => RegisiterVistorTemplateComponentModel());
|
|
||||||
|
|
||||||
_model.textController1 ??= TextEditingController();
|
_model.textController1 ??= TextEditingController();
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
@ -89,19 +85,15 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.textController1.text.isEmpty ||
|
if (_model.textController1.text.isEmpty || _model.textController1.text == '') {
|
||||||
_model.textController1.text == '') {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.dropDownValue == null ||
|
if (_model.dropDownValue == null || _model.dropDownValue!.isEmpty || _model.dropDownValue == '') {
|
||||||
_model.dropDownValue!.isEmpty ||
|
|
||||||
_model.dropDownValue == '') {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.textController2.text.isEmpty ||
|
if (_model.textController2.text.isEmpty || _model.textController2.text == '') {
|
||||||
_model.textController2.text == '') {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,26 +137,23 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 0.0, 15.0),
|
||||||
20.0, 0.0, 0.0, 15.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'zazj5d8b' /* Preencha o formulário com os d... */,
|
'zazj5d8b' /* Preencha o formulário com os d... */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
TextFormField(
|
TextFormField(
|
||||||
controller: _model.textController2,
|
controller: _model.textController2,
|
||||||
|
@ -183,25 +172,18 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'rl8tvwnr' /* Documento */,
|
'rl8tvwnr' /* Documento */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintStyle:
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts:
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -237,24 +219,21 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
_model.debounce(() async {
|
_model.debounce(() async {
|
||||||
var data = await _model.getVisitanteByDocument(
|
var data = await _model.getVisitanteByDocument(value, context);
|
||||||
value, context);
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_isVisitorRegistered = data;
|
_isVisitorRegistered = data;
|
||||||
});
|
});
|
||||||
}, const Duration(milliseconds: 500));
|
}, const Duration(milliseconds: 500));
|
||||||
},
|
},
|
||||||
validator:
|
validator: _model.textController2Validator.asValidator(context),
|
||||||
_model.textController2Validator.asValidator(context),
|
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
LengthLimitingTextInputFormatter(20)
|
LengthLimitingTextInputFormatter(20)
|
||||||
|
@ -268,29 +247,17 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.only(
|
padding: const EdgeInsetsDirectional.only(top: 5, start: 12),
|
||||||
top: 5, start: 12),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context)
|
FFLocalizations.of(context).getVariableText(
|
||||||
.getVariableText(
|
|
||||||
enText: 'Visitor already registered',
|
enText: 'Visitor already registered',
|
||||||
ptText: 'Visitante já cadastrado',
|
ptText: 'Visitante já cadastrado',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).labelSmall.override(
|
||||||
.labelSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
.brightness ==
|
? Color.alphaBlend(Colors.white.withOpacity(0.7), Colors.red)
|
||||||
Brightness.dark
|
: Color.alphaBlend(Colors.black.withOpacity(0.25), Colors.red),
|
||||||
? Color.alphaBlend(
|
|
||||||
Colors.white
|
|
||||||
.withOpacity(0.7),
|
|
||||||
Colors.red)
|
|
||||||
: Color.alphaBlend(
|
|
||||||
Colors.black
|
|
||||||
.withOpacity(0.25),
|
|
||||||
Colors.red),
|
|
||||||
fontSize: 13.0,
|
fontSize: 13.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
)),
|
)),
|
||||||
|
@ -301,8 +268,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
|
@ -321,25 +287,19 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'v7g73yik' /* Nome */,
|
'v7g73yik' /* Nome */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -375,29 +335,25 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
maxLength: 80,
|
maxLength: 80,
|
||||||
keyboardType: TextInputType.name,
|
keyboardType: TextInputType.name,
|
||||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||||
validator:
|
validator: _model.textController1Validator.asValidator(context),
|
||||||
_model.textController1Validator.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 10.0),
|
||||||
24.0, 0.0, 24.0, 10.0),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
FlutterFlowDropDown<String>(
|
FlutterFlowDropDown<String>(
|
||||||
controller: _model.dropDownValueController ??=
|
controller: _model.dropDownValueController ??= FormFieldController<String>(null),
|
||||||
FormFieldController<String>(null),
|
|
||||||
options: [
|
options: [
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'n8vddmcq' /* Visitante */,
|
'n8vddmcq' /* Visitante */,
|
||||||
|
@ -406,20 +362,15 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
'9luaa09e' /* Prestador de Serviço */,
|
'9luaa09e' /* Prestador de Serviço */,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
onChanged: (val) =>
|
onChanged: (val) => setState(() => _model.dropDownValue = val),
|
||||||
setState(() => _model.dropDownValue = val),
|
|
||||||
width: MediaQuery.sizeOf(context).width * 0.9,
|
width: MediaQuery.sizeOf(context).width * 0.9,
|
||||||
// height: 44.0,
|
// height: 44.0,
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
textStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'pmezihb4' /* Selecione... */,
|
'pmezihb4' /* Selecione... */,
|
||||||
|
@ -433,39 +384,30 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
borderColor: FlutterFlowTheme.of(context).customColor6,
|
borderColor: FlutterFlowTheme.of(context).customColor6,
|
||||||
borderWidth: 0.5,
|
borderWidth: 0.5,
|
||||||
borderRadius: 8.0,
|
borderRadius: 8.0,
|
||||||
margin: const EdgeInsetsDirectional.fromSTEB(
|
margin: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 0.0),
|
||||||
16.0, 0.0, 16.0, 0.0),
|
|
||||||
hidesUnderline: true,
|
hidesUnderline: true,
|
||||||
isOverButton: true,
|
isOverButton: true,
|
||||||
isSearchable: false,
|
isSearchable: false,
|
||||||
isMultiSelect: false,
|
isMultiSelect: false,
|
||||||
),
|
),
|
||||||
if (_model.dropDownValue == null ||
|
if (_model.dropDownValue == null || _model.dropDownValue == '')
|
||||||
_model.dropDownValue == '')
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.only(
|
padding: const EdgeInsetsDirectional.only(top: 5, start: 15),
|
||||||
top: 5, start: 15),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'This field is required',
|
enText: 'This field is required',
|
||||||
ptText: 'Este campo é obrigatório',
|
ptText: 'Este campo é obrigatório',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||||
.bodySmall
|
fontFamily: FlutterFlowTheme.of(context).bodySmallFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodySmallFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.customColor6,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodySmallFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodySmallFamily),
|
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -474,12 +416,10 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ??
|
if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? false)) {
|
||||||
false)) {
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -488,15 +428,13 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
_model.isDataUploading = false;
|
_model.isDataUploading = false;
|
||||||
_model.uploadedLocalFile =
|
_model.uploadedLocalFile = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
FFUploadedFile(bytes: Uint8List.fromList([]));
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
child: Image.memory(
|
child: Image.memory(
|
||||||
_model.uploadedLocalFile.bytes ??
|
_model.uploadedLocalFile.bytes ?? Uint8List.fromList([]),
|
||||||
Uint8List.fromList([]),
|
|
||||||
width: 300.0,
|
width: 300.0,
|
||||||
height: 200.0,
|
height: 200.0,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
@ -510,8 +448,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final selectedMedia =
|
final selectedMedia = await selectMediaWithSourceBottomSheetandFaceDetection(
|
||||||
await selectMediaWithSourceBottomSheetandFaceDetection(
|
|
||||||
context: context,
|
context: context,
|
||||||
// maxWidth: 300.00,
|
// maxWidth: 300.00,
|
||||||
// maxHeight: 300.00,
|
// maxHeight: 300.00,
|
||||||
|
@ -524,15 +461,11 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
// selectedMedia.every((m) =>
|
// selectedMedia.every((m) =>
|
||||||
// validateFileFormat(
|
// validateFileFormat(
|
||||||
// m.storagePath, context))) {
|
// m.storagePath, context))) {
|
||||||
setState(
|
setState(() => _model.isDataUploading = true);
|
||||||
() => _model.isDataUploading = true);
|
var selectedUploadedFiles = <FFUploadedFile>[];
|
||||||
var selectedUploadedFiles =
|
|
||||||
<FFUploadedFile>[];
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final message =
|
final message = FFLocalizations.of(context).getVariableText(
|
||||||
FFLocalizations.of(context)
|
|
||||||
.getVariableText(
|
|
||||||
enText: 'Uploading file...',
|
enText: 'Uploading file...',
|
||||||
ptText: 'Enviando arquivo...',
|
ptText: 'Enviando arquivo...',
|
||||||
);
|
);
|
||||||
|
@ -543,9 +476,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
);
|
);
|
||||||
selectedUploadedFiles = selectedMedia
|
selectedUploadedFiles = selectedMedia
|
||||||
.map((m) => FFUploadedFile(
|
.map((m) => FFUploadedFile(
|
||||||
name: m.storagePath
|
name: m.storagePath.split('/').last,
|
||||||
.split('/')
|
|
||||||
.last,
|
|
||||||
bytes: m.bytes,
|
bytes: m.bytes,
|
||||||
height: m.dimensions?.height,
|
height: m.dimensions?.height,
|
||||||
width: m.dimensions?.width,
|
width: m.dimensions?.width,
|
||||||
|
@ -553,28 +484,21 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
} finally {
|
} finally {
|
||||||
ScaffoldMessenger.of(context)
|
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||||
.hideCurrentSnackBar();
|
|
||||||
_model.isDataUploading = false;
|
_model.isDataUploading = false;
|
||||||
}
|
}
|
||||||
if (selectedUploadedFiles.length ==
|
if (selectedUploadedFiles.length == selectedMedia.length) {
|
||||||
selectedMedia.length) {
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_model.uploadedLocalFile =
|
_model.uploadedLocalFile = selectedUploadedFiles.first;
|
||||||
selectedUploadedFiles.first;
|
|
||||||
});
|
});
|
||||||
final String message =
|
final String message = FFLocalizations.of(context).getVariableText(
|
||||||
FFLocalizations.of(context)
|
|
||||||
.getVariableText(
|
|
||||||
enText: 'File uploaded successfully',
|
enText: 'File uploaded successfully',
|
||||||
ptText: 'Arquivo enviado com sucesso',
|
ptText: 'Arquivo enviado com sucesso',
|
||||||
);
|
);
|
||||||
showUploadMessage(context, message);
|
showUploadMessage(context, message);
|
||||||
} else {
|
} else {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
final String message =
|
final String message = FFLocalizations.of(context).getVariableText(
|
||||||
FFLocalizations.of(context)
|
|
||||||
.getVariableText(
|
|
||||||
enText: 'Failed to upload data',
|
enText: 'Failed to upload data',
|
||||||
ptText: 'Falha ao enviar os dados',
|
ptText: 'Falha ao enviar os dados',
|
||||||
);
|
);
|
||||||
|
@ -592,26 +516,16 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 120.0,
|
height: 120.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 20.0),
|
||||||
0.0, 0.0, 0.0, 20.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(14.0, 0.0, 0.0, 20.0),
|
||||||
iconPadding:
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
14.0, 0.0, 0.0, 20.0),
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.primaryBackground,
|
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.titleSmallFamily),
|
|
||||||
),
|
),
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
@ -624,24 +538,17 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 65.0, 10.0, 0.0),
|
||||||
10.0, 65.0, 10.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'p4ftwxcy' /* Clique para adicionar a foto p... */,
|
'p4ftwxcy' /* Clique para adicionar a foto p... */,
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -655,26 +562,23 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 10.0, 0.0, 15.0),
|
||||||
20.0, 10.0, 0.0, 15.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'bqpucwh0' /* Contatos */,
|
'bqpucwh0' /* Contatos */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController3,
|
controller: _model.textController3,
|
||||||
focusNode: _model.textFieldFocusNode3,
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
@ -686,8 +590,7 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
maxLength: 25,
|
maxLength: 25,
|
||||||
keyboardType: TextInputType.phone,
|
keyboardType: TextInputType.phone,
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
FilteringTextInputFormatter.allow(
|
FilteringTextInputFormatter.allow(RegExp('[0-9, +, -, (, )]')),
|
||||||
RegExp('[0-9, +, -, (, )]')),
|
|
||||||
LengthLimitingTextInputFormatter(25)
|
LengthLimitingTextInputFormatter(25)
|
||||||
],
|
],
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
|
@ -697,25 +600,19 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'h84ls2r6' /* Telefone */,
|
'h84ls2r6' /* Telefone */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -751,20 +648,18 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
// validator:
|
// validator:
|
||||||
// _model.textController3Validator.asValidator(context),
|
// _model.textController3Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController4,
|
controller: _model.textController4,
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
@ -784,25 +679,19 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'fqp7qmka' /* Email */,
|
'fqp7qmka' /* Email */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -838,31 +727,26 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
inputFormatters: [LengthLimitingTextInputFormatter(80)],
|
||||||
validator:
|
validator: _model.textController4Validator.asValidator(context),
|
||||||
_model.textController4Validator.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: _isFormValid(context)
|
onPressed: _isFormValid(context)
|
||||||
? () async {
|
? () async {
|
||||||
_model.imgBase64 =
|
_model.imgBase64 = await ImageUtils.convertImageFileToBase64(
|
||||||
await ImageUtils.convertImageFileToBase64(
|
|
||||||
_model.uploadedLocalFile,
|
_model.uploadedLocalFile,
|
||||||
);
|
);
|
||||||
_model.scheduleVisitor =
|
_model.scheduleVisitor = await PhpGroup.postScheduleVisitorCall
|
||||||
await PhpGroup.postScheduleVisitorCall
|
|
||||||
.call(
|
.call(
|
||||||
documento: _model.textController2.text,
|
documento: _model.textController2.text,
|
||||||
nome: _model.textController1.text,
|
nome: _model.textController1.text,
|
||||||
|
@ -887,21 +771,15 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
_model.textController3?.clear();
|
_model.textController3?.clear();
|
||||||
_model.textController4?.clear();
|
_model.textController4?.clear();
|
||||||
_model.dropDownValueController?.reset();
|
_model.dropDownValueController?.reset();
|
||||||
_model.uploadedLocalFile = FFUploadedFile(
|
_model.uploadedLocalFile = FFUploadedFile(bytes: Uint8List.fromList([]));
|
||||||
bytes: Uint8List.fromList([]));
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText:
|
ptText: 'Visitante cadastrado com sucesso.',
|
||||||
'Visitante cadastrado com sucesso.',
|
enText: 'Visitor successfully registered.'),
|
||||||
enText:
|
style: TextStyle(color: FlutterFlowTheme.of(context).info)),
|
||||||
'Visitor successfully registered.'),
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
style: TextStyle(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.info)),
|
|
||||||
backgroundColor:
|
|
||||||
FlutterFlowTheme.of(context).primary,
|
|
||||||
duration: const Duration(seconds: 3),
|
duration: const Duration(seconds: 3),
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
behavior: SnackBarBehavior.floating,
|
behavior: SnackBarBehavior.floating,
|
||||||
|
@ -914,27 +792,20 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
_formKey.currentState?.reset();
|
_formKey.currentState?.reset();
|
||||||
if (widget.source ==
|
if (widget.source == 'VisitorNotFoundComponent') {
|
||||||
'VisitorNotFoundComponent') {
|
|
||||||
Navigator.pop(context, true);
|
Navigator.pop(context, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return DialogUtil.error(
|
return DialogUtil.error(
|
||||||
context,
|
context,
|
||||||
PhpGroup.postScheduleVisitorCall.errorMsg(
|
PhpGroup.postScheduleVisitorCall.errorMsg(_model.scheduleVisitor?.jsonBody) == null
|
||||||
_model
|
? FFLocalizations.of(context).getVariableText(
|
||||||
.scheduleVisitor?.jsonBody) ==
|
ptText: 'Erro ao se conectar com o servidor',
|
||||||
null
|
|
||||||
? FFLocalizations.of(context)
|
|
||||||
.getVariableText(
|
|
||||||
ptText:
|
|
||||||
'Erro ao se conectar com o servidor',
|
|
||||||
enText: 'Error connecting to server',
|
enText: 'Error connecting to server',
|
||||||
)
|
)
|
||||||
: PhpGroup.postScheduleVisitorCall
|
: PhpGroup.postScheduleVisitorCall
|
||||||
.errorMsg(
|
.errorMsg(_model.scheduleVisitor?.jsonBody)
|
||||||
_model.scheduleVisitor?.jsonBody)
|
|
||||||
.toString());
|
.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -946,20 +817,15 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
width: 250.0,
|
width: 250.0,
|
||||||
height: 36.0,
|
height: 36.0,
|
||||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(80.0, 0.0, 80.0, 0.0),
|
||||||
80.0, 0.0, 80.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
.titleSmall
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
),
|
),
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'sign_in_template_component_widget.dart'
|
import 'sign_in_template_component_widget.dart' show SignInTemplateComponentWidget;
|
||||||
show SignInTemplateComponentWidget;
|
|
||||||
|
|
||||||
class SignInTemplateComponentModel
|
|
||||||
extends FlutterFlowModel<SignInTemplateComponentWidget> {
|
|
||||||
|
|
||||||
|
class SignInTemplateComponentModel extends FlutterFlowModel<SignInTemplateComponentWidget> {
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
FocusNode? emailAddressFocusNode;
|
FocusNode? emailAddressFocusNode;
|
||||||
|
@ -27,6 +24,7 @@ class SignInTemplateComponentModel
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
FocusNode? passwordFocusNode;
|
FocusNode? passwordFocusNode;
|
||||||
TextEditingController? passwordTextController;
|
TextEditingController? passwordTextController;
|
||||||
late bool passwordVisibility;
|
late bool passwordVisibility;
|
||||||
|
@ -41,11 +39,6 @@ class SignInTemplateComponentModel
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {
|
void initState(BuildContext context) {
|
||||||
emailAddressTextControllerValidator = _emailAddressTextControllerValidator;
|
emailAddressTextControllerValidator = _emailAddressTextControllerValidator;
|
||||||
|
|
|
@ -27,12 +27,10 @@ class SignInTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function()? toggleSignUpPage;
|
final Future Function()? toggleSignUpPage;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<SignInTemplateComponentWidget> createState() =>
|
State<SignInTemplateComponentWidget> createState() => _SignInTemplateComponentWidgetState();
|
||||||
_SignInTemplateComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SignInTemplateComponentWidgetState
|
class _SignInTemplateComponentWidgetState extends State<SignInTemplateComponentWidget> with TickerProviderStateMixin {
|
||||||
extends State<SignInTemplateComponentWidget> with TickerProviderStateMixin {
|
|
||||||
late SignInTemplateComponentModel _model;
|
late SignInTemplateComponentModel _model;
|
||||||
|
|
||||||
final animationsMap = <String, AnimationInfo>{};
|
final animationsMap = <String, AnimationInfo>{};
|
||||||
|
@ -148,9 +146,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
enText: 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
|
enText: 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
.displaySmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 24.0,
|
fontSize: 24.0,
|
||||||
|
@ -185,7 +181,9 @@ class _SignInTemplateComponentWidgetState
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(34.0, 0.0, 34.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(34.0, 0.0, 34.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
constraints: const BoxConstraints(maxWidth: 570.0,),
|
constraints: const BoxConstraints(
|
||||||
|
maxWidth: 570.0,
|
||||||
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
@ -201,162 +199,94 @@ class _SignInTemplateComponentWidgetState
|
||||||
children: [
|
children: [
|
||||||
Form(
|
Form(
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode:
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
AutovalidateMode.onUserInteraction,
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
const EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 16.0),
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('emailTextFormField'),
|
||||||
'emailTextFormField'),
|
controller: _model.emailAddressTextController,
|
||||||
controller: _model
|
focusNode: _model.emailAddressFocusNode,
|
||||||
.emailAddressTextController,
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
focusNode: _model
|
onChanged: (_) => EasyDebounce.debounce(
|
||||||
.emailAddressFocusNode,
|
|
||||||
cursorColor:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primary,
|
|
||||||
onChanged: (_) =>
|
|
||||||
EasyDebounce.debounce(
|
|
||||||
'_model.emailAddressTextController',
|
'_model.emailAddressTextController',
|
||||||
const Duration(
|
const Duration(milliseconds: 500),
|
||||||
milliseconds: 500),
|
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
autofillHints: const [
|
autofillHints: const [AutofillHints.email],
|
||||||
AutofillHints.email
|
textCapitalization: TextCapitalization.none,
|
||||||
],
|
textInputAction: TextInputAction.next,
|
||||||
textCapitalization:
|
|
||||||
TextCapitalization.none,
|
|
||||||
textInputAction:
|
|
||||||
TextInputAction.next,
|
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText:
|
labelText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(
|
|
||||||
context)
|
|
||||||
.getText(
|
|
||||||
'1ltg0ylb' /* Email */,
|
'1ltg0ylb' /* Email */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme
|
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||||
.of(context)
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
.labelLarge
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color: FlutterFlowTheme
|
|
||||||
.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight:
|
fontWeight: FontWeight.w500,
|
||||||
FontWeight.w500,
|
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
enabledBorder:
|
enabledBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.customColor1,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
focusedBorder:
|
focusedBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).success,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.success,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
errorBorder:
|
errorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.error,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.error,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.email,
|
Icons.email,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.accent1,
|
|
||||||
size: 22.0,
|
size: 22.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
context)
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
.bodyLarge
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight:
|
fontWeight: FontWeight.w500,
|
||||||
FontWeight.w500,
|
useGoogleFonts:
|
||||||
useGoogleFonts: GoogleFonts
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType
|
keyboardType: TextInputType.emailAddress,
|
||||||
.emailAddress,
|
validator:
|
||||||
validator: _model
|
_model.emailAddressTextControllerValidator.asValidator(context),
|
||||||
.emailAddressTextControllerValidator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional .fromSTEB(0.0, 0.0, 0.0, 16.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
@ -367,24 +297,23 @@ class _SignInTemplateComponentWidgetState
|
||||||
onChanged: (_) => EasyDebounce.debounce(
|
onChanged: (_) => EasyDebounce.debounce(
|
||||||
'_model.passwordTextController',
|
'_model.passwordTextController',
|
||||||
const Duration(milliseconds: 500),
|
const Duration(milliseconds: 500),
|
||||||
() => setState(() {})
|
() => setState(() {})),
|
||||||
),
|
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
autofillHints: const [AutofillHints.password],
|
autofillHints: const [AutofillHints.password],
|
||||||
textInputAction: TextInputAction.send,
|
textInputAction: TextInputAction.send,
|
||||||
obscureText: !_model.passwordVisibility,
|
obscureText: !_model.passwordVisibility,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText('2x19ce8k' /* Senha */),
|
labelText:
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
FFLocalizations.of(context).getText('2x19ce8k' /* Senha */),
|
||||||
.labelLarge
|
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).customColor1,
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
|
@ -392,52 +321,50 @@ class _SignInTemplateComponentWidgetState
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
color:Color(0xFF1AAB5F),
|
const BorderSide(color: Color(0xFF1AAB5F), width: 0.25),
|
||||||
width: 0.25),
|
|
||||||
borderRadius: BorderRadius.circular(12.0)),
|
borderRadius: BorderRadius.circular(12.0)),
|
||||||
errorBorder: OutlineInputBorder(
|
errorBorder: OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
color: Color(0xFFFF5963),
|
const BorderSide(color: Color(0xFFFF5963), width: 0.25),
|
||||||
width: 0.25),
|
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
color: Color(0xFFFF5963),
|
const BorderSide(color: Color(0xFFFF5963), width: 0.25),
|
||||||
width: 0.25),
|
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
suffixIcon: InkWell(
|
suffixIcon: InkWell(
|
||||||
onTap: () => setState(() => _model.passwordVisibility = !_model.passwordVisibility),
|
onTap: () => setState(
|
||||||
|
() => _model.passwordVisibility = !_model.passwordVisibility),
|
||||||
focusNode: FocusNode(skipTraversal: true),
|
focusNode: FocusNode(skipTraversal: true),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
_model.passwordVisibility ? Icons.visibility_outlined : Icons.visibility_off_outlined,
|
_model.passwordVisibility
|
||||||
color:FlutterFlowTheme.of(context).accent1,
|
? Icons.visibility_outlined
|
||||||
|
: Icons.visibility_off_outlined,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
size: 24.0),
|
size: 24.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
.bodyLarge
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
validator: _model.passwordTextControllerValidator.asValidator(context),
|
validator:
|
||||||
|
_model.passwordTextControllerValidator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
Builder(
|
Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
|
if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
|
||||||
|
@ -451,7 +378,9 @@ class _SignInTemplateComponentWidgetState
|
||||||
onPressed: _isFormInvalid()
|
onPressed: _isFormInvalid()
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
await AuthenticationService.signIn(context, _model,
|
await AuthenticationService.signIn(
|
||||||
|
context,
|
||||||
|
_model,
|
||||||
emailAdress: _model.emailAddressTextController.text,
|
emailAdress: _model.emailAddressTextController.text,
|
||||||
password: _model.passwordTextController.text,
|
password: _model.passwordTextController.text,
|
||||||
);
|
);
|
||||||
|
@ -461,8 +390,9 @@ class _SignInTemplateComponentWidgetState
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0,0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0,0.0, 0.0, 0.0),
|
iconPadding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -470,11 +400,11 @@ class _SignInTemplateComponentWidgetState
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide:
|
||||||
color: Colors.transparent,
|
const BorderSide(color: Colors.transparent, width: 1.0),
|
||||||
width: 1.0),
|
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||||
disabledTextColor: Colors.white,
|
disabledTextColor: Colors.white,
|
||||||
|
@ -487,27 +417,28 @@ class _SignInTemplateComponentWidgetState
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('toggleSignUpPage'),
|
key: const ValueKey<String>('toggleSignUpPage'),
|
||||||
onPressed: () async => await widget.toggleSignUpPage?.call(),
|
onPressed: () async => await widget.toggleSignUpPage?.call(),
|
||||||
text: FFLocalizations.of(context).getText('14u7ipws' /* Cadastrar */,
|
text: FFLocalizations.of(context).getText(
|
||||||
|
'14u7ipws' /* Cadastrar */,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0,0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
iconPadding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
color: FlutterFlowTheme.of(context).customColor1,
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
textStyle:
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
borderSide:
|
||||||
|
const BorderSide(color: Colors.transparent, width: 1.0),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
|
@ -523,11 +454,12 @@ class _SignInTemplateComponentWidgetState
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
.fromSTEB(0.0, 0.0,0.0, 16.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('SubmitButtonWidget'),
|
key: const ValueKey<String>('SubmitButtonWidget'),
|
||||||
onPressed: _isFormInvalid() ? null : () async {
|
onPressed: _isFormInvalid()
|
||||||
|
? null
|
||||||
|
: () async {
|
||||||
try {
|
try {
|
||||||
await AuthenticationService.signIn(
|
await AuthenticationService.signIn(
|
||||||
context,
|
context,
|
||||||
|
@ -542,25 +474,27 @@ class _SignInTemplateComponentWidgetState
|
||||||
'login.php',
|
'login.php',
|
||||||
_model.emailAddressTextController.text,
|
_model.emailAddressTextController.text,
|
||||||
"Login",
|
"Login",
|
||||||
e, s);
|
e,
|
||||||
|
s);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText('1x926nsn'),
|
text: FFLocalizations.of(context).getText('1x926nsn'),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0,0.0, 0.0, 0.0),
|
padding:
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
|
iconPadding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
textStyle: FlutterFlowTheme.of(context)
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
@ -577,33 +511,34 @@ class _SignInTemplateComponentWidgetState
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsetsDirectional
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
.fromSTEB(0.0, 0.0,
|
|
||||||
0.0, 16.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('toggleSignUpPage'),
|
key: const ValueKey<String>('toggleSignUpPage'),
|
||||||
onPressed: () async => await widget.toggleSignUpPage?.call(),
|
onPressed: () async => await widget.toggleSignUpPage?.call(),
|
||||||
text: FFLocalizations.of(context).getText('jwvd4ai1' /* Cadastrar */),
|
text: FFLocalizations.of(context)
|
||||||
|
.getText('jwvd4ai1' /* Cadastrar */),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
padding:
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
|
iconPadding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
color: FlutterFlowTheme.of(context).customColor1,
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
textStyle:
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
FlutterFlowTheme
|
|
||||||
.of(context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(color: Colors.transparent,width: 1.0,),
|
borderSide: const BorderSide(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: 1.0,
|
||||||
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
|
@ -614,8 +549,6 @@ class _SignInTemplateComponentWidgetState
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
|
@ -641,28 +574,31 @@ class _SignInTemplateComponentWidgetState
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: FFLocalizations.of(context).getText('05dx91ku' /* Você esqueceu a sua senha? */,),
|
text: FFLocalizations.of(context).getText(
|
||||||
|
'05dx91ku' /* Você esqueceu a sua senha? */,
|
||||||
|
),
|
||||||
style: TextStyle(color: FlutterFlowTheme.of(context).primaryText),
|
style: TextStyle(color: FlutterFlowTheme.of(context).primaryText),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: FFLocalizations.of(context).getText('p5c6d54y' /* Recupere aqui */),
|
text: FFLocalizations.of(context)
|
||||||
|
.getText('p5c6d54y' /* Recupere aqui */),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
mouseCursor: SystemMouseCursors.click,
|
mouseCursor: SystemMouseCursors.click,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily)),
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -672,8 +608,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
).animateOnPageLoad(
|
).animateOnPageLoad(animationsMap['containerOnPageLoadAnimation']!),
|
||||||
animationsMap['containerOnPageLoadAnimation']!),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'sign_up_template_component_widget.dart'
|
import 'sign_up_template_component_widget.dart' show SignUpTemplateComponentWidget;
|
||||||
show SignUpTemplateComponentWidget;
|
|
||||||
|
|
||||||
class SignUpTemplateComponentModel
|
|
||||||
extends FlutterFlowModel<SignUpTemplateComponentWidget> {
|
|
||||||
|
|
||||||
|
class SignUpTemplateComponentModel extends FlutterFlowModel<SignUpTemplateComponentWidget> {
|
||||||
final formKey = GlobalKey<FormState>();
|
final formKey = GlobalKey<FormState>();
|
||||||
FocusNode? nameRegisterFormFocusNode;
|
FocusNode? nameRegisterFormFocusNode;
|
||||||
TextEditingController? nameRegisterFormTextController;
|
TextEditingController? nameRegisterFormTextController;
|
||||||
|
@ -80,7 +77,4 @@ class SignUpTemplateComponentModel
|
||||||
passwordRegisterFormFocusNode?.dispose();
|
passwordRegisterFormFocusNode?.dispose();
|
||||||
passwordRegisterFormTextController?.dispose();
|
passwordRegisterFormTextController?.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,8 @@ export 'sign_up_template_component_model.dart';
|
||||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||||
const SignUpTemplateComponentWidget({super.key, required this.toggleSignInPage});
|
const SignUpTemplateComponentWidget({super.key, required this.toggleSignInPage});
|
||||||
final Future Function()? toggleSignInPage;
|
final Future Function()? toggleSignInPage;
|
||||||
@override State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
@override
|
||||||
|
State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||||
|
@ -104,13 +105,11 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ValidatorUtil.isValidEmail(
|
if (!ValidatorUtil.isValidEmail(_model.emailRegisterFormTextController.text)) {
|
||||||
_model.emailRegisterFormTextController.text)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ValidatorUtil.isValidPassword(
|
if (!ValidatorUtil.isValidPassword(_model.passwordRegisterFormTextController.text)) {
|
||||||
_model.passwordRegisterFormTextController.text)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,8 +151,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||||
const AlignmentDirectional(0.0, -1.0),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(4.0),
|
padding: const EdgeInsets.all(4.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
|
@ -161,18 +159,13 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
.displaySmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.primaryText,
|
|
||||||
fontSize: screenWidth * 0.06,
|
fontSize: screenWidth * 0.06,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -209,8 +202,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
maxWidth: 570.0,
|
maxWidth: 570.0,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
.primaryBackground,
|
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
child: Align(
|
child: Align(
|
||||||
|
@ -219,459 +211,261 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
padding: const EdgeInsets.all(32.0),
|
padding: const EdgeInsets.all(32.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
crossAxisAlignment:
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
CrossAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
Form(
|
Form(
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode:
|
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||||
AutovalidateMode.onUserInteraction,
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
const EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 16.0),
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('nameTextFormField'),
|
||||||
'nameTextFormField'),
|
controller: _model.nameRegisterFormTextController,
|
||||||
controller: _model
|
focusNode: _model.nameRegisterFormFocusNode,
|
||||||
.nameRegisterFormTextController,
|
onChanged: (_) => EasyDebounce.debounce(
|
||||||
focusNode: _model
|
|
||||||
.nameRegisterFormFocusNode,
|
|
||||||
onChanged: (_) =>
|
|
||||||
EasyDebounce.debounce(
|
|
||||||
'_model.nameRegisterFormTextController',
|
'_model.nameRegisterFormTextController',
|
||||||
const Duration(
|
const Duration(milliseconds: 500),
|
||||||
milliseconds: 500),
|
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
autofillHints: const [
|
autofillHints: const [AutofillHints.name],
|
||||||
AutofillHints.name
|
|
||||||
],
|
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText:
|
labelText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(
|
|
||||||
context)
|
|
||||||
.getText(
|
|
||||||
'3corpwhd' /* Nome */,
|
'3corpwhd' /* Nome */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme
|
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||||
.of(context)
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
.labelLarge
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color: FlutterFlowTheme
|
|
||||||
.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight:
|
fontWeight: FontWeight.w500,
|
||||||
FontWeight.w500,
|
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
enabledBorder:
|
enabledBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.customColor1,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
focusedBorder:
|
focusedBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).success,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.success,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
errorBorder:
|
errorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.error,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.error,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor:
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryBackground,
|
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.person,
|
Icons.person,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.accent1,
|
|
||||||
size: 22.0,
|
size: 22.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
context)
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
.bodyLarge
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight:
|
fontWeight: FontWeight.w500,
|
||||||
FontWeight.w500,
|
useGoogleFonts:
|
||||||
useGoogleFonts: GoogleFonts
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
validator: _model
|
validator: _model.nameRegisterFormTextControllerValidator
|
||||||
.nameRegisterFormTextControllerValidator
|
|
||||||
.asValidator(context),
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
const EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 16.0),
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('emailTextFormField'),
|
||||||
'emailTextFormField'),
|
controller: _model.emailRegisterFormTextController,
|
||||||
controller: _model
|
focusNode: _model.emailRegisterFormFocusNode,
|
||||||
.emailRegisterFormTextController,
|
onChanged: (_) => EasyDebounce.debounce(
|
||||||
focusNode: _model
|
|
||||||
.emailRegisterFormFocusNode,
|
|
||||||
onChanged: (_) =>
|
|
||||||
EasyDebounce.debounce(
|
|
||||||
'_model.emailRegisterFormTextController',
|
'_model.emailRegisterFormTextController',
|
||||||
const Duration(
|
const Duration(milliseconds: 500),
|
||||||
milliseconds: 500),
|
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
autofillHints: const [
|
autofillHints: const [AutofillHints.email],
|
||||||
AutofillHints.email
|
|
||||||
],
|
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText:
|
labelText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(
|
|
||||||
context)
|
|
||||||
.getText(
|
|
||||||
'80wonb69' /* Email */,
|
'80wonb69' /* Email */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme
|
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||||
.of(context)
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
.labelLarge
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color: FlutterFlowTheme
|
|
||||||
.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight:
|
fontWeight: FontWeight.w500,
|
||||||
FontWeight.w500,
|
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
enabledBorder:
|
enabledBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryText,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
focusedBorder:
|
focusedBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).success,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.success,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
errorBorder:
|
errorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.error,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).error,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.error,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor:
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryBackground,
|
|
||||||
suffixIcon: Icon(
|
suffixIcon: Icon(
|
||||||
Icons.email,
|
Icons.email,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.accent1,
|
|
||||||
size: 22.0,
|
size: 22.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
context)
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
.bodyLarge
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.customColor1,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight:
|
fontWeight: FontWeight.w500,
|
||||||
FontWeight.w500,
|
useGoogleFonts:
|
||||||
useGoogleFonts: GoogleFonts
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType
|
keyboardType: TextInputType.emailAddress,
|
||||||
.emailAddress,
|
validator: _model.emailRegisterFormTextControllerValidator
|
||||||
validator: _model
|
|
||||||
.emailRegisterFormTextControllerValidator
|
|
||||||
.asValidator(context),
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
const EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 16.0),
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('passwordTextFormField'),
|
||||||
'passwordTextFormField'),
|
controller: _model.passwordRegisterFormTextController,
|
||||||
controller: _model
|
focusNode: _model.passwordRegisterFormFocusNode,
|
||||||
.passwordRegisterFormTextController,
|
onChanged: (_) => EasyDebounce.debounce(
|
||||||
focusNode: _model
|
|
||||||
.passwordRegisterFormFocusNode,
|
|
||||||
onChanged: (_) =>
|
|
||||||
EasyDebounce.debounce(
|
|
||||||
'_model.passwordRegisterFormTextController',
|
'_model.passwordRegisterFormTextController',
|
||||||
const Duration(
|
const Duration(milliseconds: 500),
|
||||||
milliseconds: 500),
|
|
||||||
() => setState(() {}),
|
() => setState(() {}),
|
||||||
),
|
),
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
autofillHints: const [
|
autofillHints: const [AutofillHints.password],
|
||||||
AutofillHints.password
|
obscureText: !_model.passwordRegisterFormVisibility,
|
||||||
],
|
|
||||||
obscureText: !_model
|
|
||||||
.passwordRegisterFormVisibility,
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText:
|
labelText: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(
|
|
||||||
context)
|
|
||||||
.getText(
|
|
||||||
'0firji8l' /* Senha */,
|
'0firji8l' /* Senha */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme
|
labelStyle: FlutterFlowTheme.of(context).labelLarge.override(
|
||||||
.of(context)
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
.labelLarge
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color: FlutterFlowTheme
|
|
||||||
.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight:
|
fontWeight: FontWeight.w500,
|
||||||
FontWeight.w500,
|
|
||||||
useGoogleFonts:
|
useGoogleFonts:
|
||||||
GoogleFonts
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
enabledBorder:
|
enabledBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color:
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.customColor1,
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
focusedBorder:
|
focusedBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
borderSide: const BorderSide(
|
||||||
borderSide:
|
color: Color(0xFF1AAB5F),
|
||||||
const BorderSide(
|
|
||||||
color:
|
|
||||||
Color(0xFF1AAB5F),
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
errorBorder:
|
errorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
borderSide: const BorderSide(
|
||||||
borderSide:
|
color: Color(0xFFFF5963),
|
||||||
const BorderSide(
|
|
||||||
color:
|
|
||||||
Color(0xFFFF5963),
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
focusedErrorBorder:
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
OutlineInputBorder(
|
borderSide: const BorderSide(
|
||||||
borderSide:
|
color: Color(0xFFFF5963),
|
||||||
const BorderSide(
|
|
||||||
color:
|
|
||||||
Color(0xFFFF5963),
|
|
||||||
width: 0.25,
|
width: 0.25,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(
|
|
||||||
12.0),
|
|
||||||
),
|
),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor:
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryBackground,
|
|
||||||
suffixIcon: InkWell(
|
suffixIcon: InkWell(
|
||||||
key: const ValueKey<String>('passwordVisibilitySuffixIcon'),
|
key: const ValueKey<String>('passwordVisibilitySuffixIcon'),
|
||||||
onTap: () => setState(
|
onTap: () => setState(
|
||||||
() => _model
|
() => _model.passwordRegisterFormVisibility =
|
||||||
.passwordRegisterFormVisibility =
|
!_model.passwordRegisterFormVisibility,
|
||||||
!_model
|
|
||||||
.passwordRegisterFormVisibility,
|
|
||||||
),
|
),
|
||||||
focusNode: FocusNode(
|
focusNode: FocusNode(skipTraversal: true),
|
||||||
skipTraversal: true),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
_model.passwordRegisterFormVisibility
|
_model.passwordRegisterFormVisibility
|
||||||
? Icons
|
? Icons.visibility_outlined
|
||||||
.visibility_outlined
|
: Icons.visibility_off_outlined,
|
||||||
: Icons
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
.visibility_off_outlined,
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.accent1,
|
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
context)
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
.bodyLarge
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight:
|
fontWeight: FontWeight.w500,
|
||||||
FontWeight.w500,
|
useGoogleFonts:
|
||||||
useGoogleFonts: GoogleFonts
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
validator: _model
|
validator: _model.passwordRegisterFormTextControllerValidator
|
||||||
.passwordRegisterFormTextControllerValidator
|
|
||||||
.asValidator(context),
|
.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -680,70 +474,53 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('SubmitButtonWidget'),
|
key: const ValueKey<String>('SubmitButtonWidget'),
|
||||||
onPressed: isFormInvalid()
|
onPressed: isFormInvalid()
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
var shouldSetState = false;
|
var shouldSetState = false;
|
||||||
_model.register = await AuthenticationService.signUp(context,
|
_model.register = await AuthenticationService.signUp(
|
||||||
|
context,
|
||||||
email: _model.emailRegisterFormTextController.text,
|
email: _model.emailRegisterFormTextController.text,
|
||||||
name: _model.nameRegisterFormTextController.text,
|
name: _model.nameRegisterFormTextController.text,
|
||||||
passwd: _model.passwordRegisterFormTextController.text,
|
passwd: _model.passwordRegisterFormTextController.text,
|
||||||
device: StorageUtil().deviceType,
|
device: StorageUtil().deviceType,
|
||||||
);
|
);
|
||||||
shouldSetState = true;
|
shouldSetState = true;
|
||||||
if (_model.register == true) await widget.toggleSignInPage?.call();
|
if (_model.register == true)
|
||||||
|
await widget.toggleSignInPage?.call();
|
||||||
else {
|
else {
|
||||||
if (shouldSetState) setState(() {});
|
if (shouldSetState) setState(() {});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (shouldSetState) setState(() {});
|
if (shouldSetState) setState(() {});
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context)
|
text: FFLocalizations.of(context).getText(
|
||||||
.getText(
|
|
||||||
'rnvdwzei' /* Cadastrar-se */,
|
'rnvdwzei' /* Cadastrar-se */,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding:
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
const EdgeInsetsDirectional
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
.fromSTEB(
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
0.0, 0.0, 0.0, 0.0),
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.accent1,
|
|
||||||
textStyle: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.secondaryText,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(12.0),
|
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||||
disabledColor:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.customColor5,
|
|
||||||
disabledTextColor: Colors.white,
|
disabledTextColor: Colors.white,
|
||||||
),
|
),
|
||||||
showLoadingIndicator: true,
|
showLoadingIndicator: true,
|
||||||
|
@ -752,8 +529,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
|
|
||||||
// You will have to add an action on this rich text to go to your login page.
|
// You will have to add an action on this rich text to go to your login page.
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||||
.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: const ValueKey<String>('toggleSignInPage'),
|
key: const ValueKey<String>('toggleSignInPage'),
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
|
@ -762,64 +538,37 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async => await widget.toggleSignInPage?.call(),
|
onTap: () async => await widget.toggleSignInPage?.call(),
|
||||||
child: RichText(
|
child: RichText(
|
||||||
textScaler: MediaQuery.of(context)
|
textScaler: MediaQuery.of(context).textScaler,
|
||||||
.textScaler,
|
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: FFLocalizations.of(
|
text: FFLocalizations.of(context).getText(
|
||||||
context)
|
|
||||||
.getText(
|
|
||||||
'a9smhn5b' /* Você já tem uma conta? */,
|
'a9smhn5b' /* Você já tem uma conta? */,
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: FlutterFlowTheme.of(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
context)
|
|
||||||
.primaryText,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: FFLocalizations.of(
|
text: FFLocalizations.of(context).getText(
|
||||||
context)
|
|
||||||
.getText(
|
|
||||||
'09xv5ctc' /* Clique aqui */,
|
'09xv5ctc' /* Clique aqui */,
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
context)
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
.bodyMedium
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.primary,
|
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight:
|
fontWeight: FontWeight.w600,
|
||||||
FontWeight.w600,
|
useGoogleFonts:
|
||||||
useGoogleFonts: GoogleFonts
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
style:
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
FlutterFlowTheme.of(context)
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.asMap()
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -830,8 +579,7 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
).animateOnPageLoad(
|
).animateOnPageLoad(animationsMap['containerOnPageLoadAnimation']!),
|
||||||
animationsMap['containerOnPageLoadAnimation']!),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -85,23 +85,20 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
_model.textController1 = TextEditingController(
|
_model.textController1 =
|
||||||
text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? '');
|
TextEditingController(text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr ?? '');
|
||||||
_model.textFieldFocusNode1 ??= FocusNode();
|
_model.textFieldFocusNode1 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController2 ??=
|
_model.textController2 ??= TextEditingController(text: widget.visitStartDate);
|
||||||
TextEditingController(text: widget.visitStartDate);
|
|
||||||
_model.textFieldFocusNode2 ??= FocusNode();
|
_model.textFieldFocusNode2 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
_model.textController3 ??= TextEditingController(text: widget.visitEndDate);
|
||||||
_model.textFieldFocusNode3 ??= FocusNode();
|
_model.textFieldFocusNode3 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController4 ??=
|
_model.textController4 ??= TextEditingController(text: widget.visitReasonStr);
|
||||||
TextEditingController(text: widget.visitReasonStr);
|
|
||||||
_model.textFieldFocusNode4 ??= FocusNode();
|
_model.textFieldFocusNode4 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController5 ??=
|
_model.textController5 ??= TextEditingController(text: widget.visitLevelStr);
|
||||||
TextEditingController(text: widget.visitLevelStr);
|
|
||||||
_model.textFieldFocusNode5 ??= FocusNode();
|
_model.textFieldFocusNode5 ??= FocusNode();
|
||||||
|
|
||||||
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
_model.textController6 ??= TextEditingController(text: widget.visitObsStr);
|
||||||
|
@ -117,8 +114,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var filteredVisitorJsonList =
|
var filteredVisitorJsonList = findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null';
|
||||||
findVisitorById(widget.visitorJsonList, widget.visitIdStr) ?? 'null';
|
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 200.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 200.0, 0.0, 0.0),
|
||||||
|
@ -154,8 +150,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(1.0, 0.0),
|
alignment: const AlignmentDirectional(1.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(15.0, 0.0, 15.0, 0.0),
|
||||||
15.0, 0.0, 15.0, 0.0),
|
|
||||||
child: FlutterFlowIconButton(
|
child: FlutterFlowIconButton(
|
||||||
borderRadius: 20.0,
|
borderRadius: 20.0,
|
||||||
borderWidth: 1.0,
|
borderWidth: 1.0,
|
||||||
|
@ -184,8 +179,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 20.0, 20.0),
|
||||||
0.0, 0.0, 20.0, 20.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
|
@ -225,10 +219,8 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(100.0),
|
borderRadius: BorderRadius.circular(100.0),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
fadeInDuration:
|
fadeInDuration: const Duration(milliseconds: 500),
|
||||||
const Duration(milliseconds: 500),
|
fadeOutDuration: const Duration(milliseconds: 500),
|
||||||
fadeOutDuration:
|
|
||||||
const Duration(milliseconds: 500),
|
|
||||||
imageUrl: valueOrDefault<String>(
|
imageUrl: valueOrDefault<String>(
|
||||||
widget.visitorImgPath,
|
widget.visitorImgPath,
|
||||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||||
|
@ -247,8 +239,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
Container(
|
Container(
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 10.0),
|
||||||
8.0, 0.0, 8.0, 10.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController1,
|
controller: _model.textController1,
|
||||||
focusNode: _model.textFieldFocusNode1,
|
focusNode: _model.textFieldFocusNode1,
|
||||||
|
@ -262,27 +253,19 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'9yu35pzg' /* Encerramento da Visita */,
|
'9yu35pzg' /* Encerramento da Visita */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -314,29 +297,24 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
validator: _model.textController1Validator
|
validator: _model.textController1Validator.asValidator(context),
|
||||||
.asValidator(context),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
||||||
0.0, 0.0, 0.0, 10.0),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController2,
|
controller: _model.textController2,
|
||||||
focusNode: _model.textFieldFocusNode2,
|
focusNode: _model.textFieldFocusNode2,
|
||||||
|
@ -350,409 +328,22 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'aj6scczp' /* Início */,
|
'aj6scczp' /* Início */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
hintText: FFLocalizations.of(context).getText(
|
||||||
'ub084nhy' /* dd/mm/yyyy */,
|
'ub084nhy' /* dd/mm/yyyy */,
|
||||||
),
|
),
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
.labelMedium
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
validator: _model.textController2Validator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController3,
|
|
||||||
focusNode: _model.textFieldFocusNode3,
|
|
||||||
autofocus: false,
|
|
||||||
obscureText: false,
|
|
||||||
showCursor: false,
|
|
||||||
enabled: false,
|
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
|
||||||
readOnly: true,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: FFLocalizations.of(context).getText(
|
|
||||||
'rvi5z7wg' /* Término */,
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
hintText: FFLocalizations.of(context).getText(
|
|
||||||
'ixs67mrz' /* dd/mm/yyyy */,
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
validator: _model.textController3Validator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 10.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController4,
|
|
||||||
focusNode: _model.textFieldFocusNode4,
|
|
||||||
autofocus: false,
|
|
||||||
obscureText: false,
|
|
||||||
showCursor: false,
|
|
||||||
enabled: false,
|
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
|
||||||
readOnly: true,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: FFLocalizations.of(context).getText(
|
|
||||||
'yxilg7ek' /* Motivo da Visita */,
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
hintText: FFLocalizations.of(context).getText(
|
|
||||||
'ypeydbem' /* Motivo */,
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
validator: _model.textController4Validator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController5,
|
|
||||||
focusNode: _model.textFieldFocusNode5,
|
|
||||||
autofocus: false,
|
|
||||||
obscureText: false,
|
|
||||||
showCursor: false,
|
|
||||||
enabled: false,
|
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
|
||||||
readOnly: true,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: FFLocalizations.of(context).getText(
|
|
||||||
'dgr3pk3a' /* Nível de Acesso */,
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
hintText: FFLocalizations.of(context).getText(
|
|
||||||
'rs3d4gb8' /* Nível de Acesso */,
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
errorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
validator: _model.textController5Validator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController6,
|
|
||||||
focusNode: _model.textFieldFocusNode6,
|
|
||||||
autofocus: false,
|
|
||||||
obscureText: false,
|
|
||||||
showCursor: false,
|
|
||||||
enabled: false,
|
|
||||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
|
||||||
readOnly: true,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: FFLocalizations.of(context).getText(
|
|
||||||
'lppn9rxa' /* Observações da Visita */,
|
|
||||||
),
|
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
FlutterFlowTheme.of(context)
|
.containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -784,15 +375,314 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context)
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
validator: _model.textController6Validator
|
textAlign: TextAlign.center,
|
||||||
.asValidator(context),
|
validator: _model.textController2Validator.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController3,
|
||||||
|
focusNode: _model.textFieldFocusNode3,
|
||||||
|
autofocus: false,
|
||||||
|
obscureText: false,
|
||||||
|
showCursor: false,
|
||||||
|
enabled: false,
|
||||||
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
readOnly: true,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'rvi5z7wg' /* Término */,
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
hintText: FFLocalizations.of(context).getText(
|
||||||
|
'ixs67mrz' /* dd/mm/yyyy */,
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
validator: _model.textController3Validator.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController4,
|
||||||
|
focusNode: _model.textFieldFocusNode4,
|
||||||
|
autofocus: false,
|
||||||
|
obscureText: false,
|
||||||
|
showCursor: false,
|
||||||
|
enabled: false,
|
||||||
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
readOnly: true,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'yxilg7ek' /* Motivo da Visita */,
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
hintText: FFLocalizations.of(context).getText(
|
||||||
|
'ypeydbem' /* Motivo */,
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
validator: _model.textController4Validator.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController5,
|
||||||
|
focusNode: _model.textFieldFocusNode5,
|
||||||
|
autofocus: false,
|
||||||
|
obscureText: false,
|
||||||
|
showCursor: false,
|
||||||
|
enabled: false,
|
||||||
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
readOnly: true,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'dgr3pk3a' /* Nível de Acesso */,
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
hintText: FFLocalizations.of(context).getText(
|
||||||
|
'rs3d4gb8' /* Nível de Acesso */,
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
validator: _model.textController5Validator.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: const BoxDecoration(),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 8.0, 0.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: _model.textController6,
|
||||||
|
focusNode: _model.textFieldFocusNode6,
|
||||||
|
autofocus: false,
|
||||||
|
obscureText: false,
|
||||||
|
showCursor: false,
|
||||||
|
enabled: false,
|
||||||
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
readOnly: true,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: FFLocalizations.of(context).getText(
|
||||||
|
'lppn9rxa' /* Observações da Visita */,
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
validator: _model.textController6Validator.asValidator(context),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -817,8 +707,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
_model.deleteVisit =
|
_model.deleteVisit = await PhpGroup.deleteVisitCall.call(
|
||||||
await PhpGroup.deleteVisitCall.call(
|
|
||||||
idVisita: widget.visitIdStr,
|
idVisita: widget.visitIdStr,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -828,8 +717,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
||||||
false) {
|
false) {
|
||||||
context.pop();
|
context.pop();
|
||||||
} else {
|
} else {
|
||||||
final error =
|
final error = await DialogUtil.errorDefault(context);
|
||||||
await DialogUtil.errorDefault(context);
|
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart';
|
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart';
|
||||||
import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_model.dart';
|
import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_model.dart';
|
||||||
import 'package:hub/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
|
import 'package:hub/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
|
||||||
|
@ -7,8 +5,7 @@ import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class VisitDetailsModalTemplateComponentModel
|
class VisitDetailsModalTemplateComponentModel extends FlutterFlowModel<VisitDetailsModalTemplateComponentWidget> {
|
||||||
extends FlutterFlowModel<VisitDetailsModalTemplateComponentWidget> {
|
|
||||||
/// Local state fields for this component.
|
/// Local state fields for this component.
|
||||||
|
|
||||||
Color statusColor = const Color(0xff000000);
|
Color statusColor = const Color(0xff000000);
|
||||||
|
@ -23,8 +20,7 @@ class VisitDetailsModalTemplateComponentModel
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {
|
void initState(BuildContext context) {
|
||||||
viewVisitDetailModel = createModel(context, () => ViewVisitDetailModel());
|
viewVisitDetailModel = createModel(context, () => ViewVisitDetailModel());
|
||||||
scheduleVisitDetailModel =
|
scheduleVisitDetailModel = createModel(context, () => ScheduleVisitDetailModel());
|
||||||
createModel(context, () => ScheduleVisitDetailModel());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
|
||||||
import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_widget.dart';
|
import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_widget.dart';
|
||||||
|
@ -42,12 +41,10 @@ class VisitDetailsModalTemplateComponentWidget extends StatefulWidget {
|
||||||
final Color? visitStatusColor;
|
final Color? visitStatusColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<VisitDetailsModalTemplateComponentWidget> createState() =>
|
State<VisitDetailsModalTemplateComponentWidget> createState() => _VisitDetailsModalTemplateComponentWidgetState();
|
||||||
_VisitDetailsModalTemplateComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VisitDetailsModalTemplateComponentWidgetState
|
class _VisitDetailsModalTemplateComponentWidgetState extends State<VisitDetailsModalTemplateComponentWidget> {
|
||||||
extends State<VisitDetailsModalTemplateComponentWidget> {
|
|
||||||
late VisitDetailsModalTemplateComponentModel _model;
|
late VisitDetailsModalTemplateComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -59,8 +56,7 @@ class _VisitDetailsModalTemplateComponentWidgetState
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model =
|
_model = createModel(context, () => VisitDetailsModalTemplateComponentModel());
|
||||||
createModel(context, () => VisitDetailsModalTemplateComponentModel());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'visitor_details_modal_template_component_widget.dart'
|
import 'visitor_details_modal_template_component_widget.dart' show VisitorDetailsModalTemplateComponentWidget;
|
||||||
show VisitorDetailsModalTemplateComponentWidget;
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class VisitorDetailsModalTemplateComponentModel
|
class VisitorDetailsModalTemplateComponentModel extends FlutterFlowModel<VisitorDetailsModalTemplateComponentWidget> {
|
||||||
extends FlutterFlowModel<VisitorDetailsModalTemplateComponentWidget> {
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -25,12 +25,10 @@ class VisitorDetailsModalTemplateComponentWidget extends StatefulWidget {
|
||||||
final String? visitorEmail;
|
final String? visitorEmail;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<VisitorDetailsModalTemplateComponentWidget> createState() =>
|
State<VisitorDetailsModalTemplateComponentWidget> createState() => _VisitorDetailsModalTemplateComponentWidgetState();
|
||||||
_VisitorDetailsModalTemplateComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VisitorDetailsModalTemplateComponentWidgetState
|
class _VisitorDetailsModalTemplateComponentWidgetState extends State<VisitorDetailsModalTemplateComponentWidget> {
|
||||||
extends State<VisitorDetailsModalTemplateComponentWidget> {
|
|
||||||
late VisitorDetailsModalTemplateComponentModel _model;
|
late VisitorDetailsModalTemplateComponentModel _model;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -42,8 +40,7 @@ class _VisitorDetailsModalTemplateComponentWidgetState
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model =
|
_model = createModel(context, () => VisitorDetailsModalTemplateComponentModel());
|
||||||
createModel(context, () => VisitorDetailsModalTemplateComponentModel());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -85,8 +82,7 @@ class _VisitorDetailsModalTemplateComponentWidgetState
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(1.0, -1.0),
|
alignment: const AlignmentDirectional(1.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 5.0, 15.0, 0.0),
|
||||||
10.0, 5.0, 15.0, 0.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -107,21 +103,18 @@ class _VisitorDetailsModalTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 40.0, 20.0, 0.0),
|
||||||
20.0, 40.0, 20.0, 0.0),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||||
0.0, 10.0, 0.0, 0.0),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (widget.visitorImageURL != '' &&
|
if (widget.visitorImageURL != '' && widget.visitorImageURL != null)
|
||||||
widget.visitorImageURL != null)
|
|
||||||
Container(
|
Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
|
@ -137,23 +130,17 @@ class _VisitorDetailsModalTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 0.0),
|
||||||
20.0, 0.0, 20.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.visitorName ?? '',
|
widget.visitorName ?? '',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
fontSize: 24.0,
|
fontSize: 24.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -161,24 +148,18 @@ class _VisitorDetailsModalTemplateComponentWidgetState
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 30.0),
|
||||||
20.0, 0.0, 20.0, 30.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'hz7ivuqn' /* Tipo de Visitante */,
|
'hz7ivuqn' /* Tipo de Visitante */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -192,28 +173,20 @@ class _VisitorDetailsModalTemplateComponentWidgetState
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 0.0),
|
||||||
20.0, 0.0, 20.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'rwqn0det' /* (00) 0 0000-0000 */,
|
'rwqn0det' /* (00) 0 0000-0000 */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -229,28 +202,20 @@ class _VisitorDetailsModalTemplateComponentWidgetState
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment:
|
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||||
const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 0.0),
|
||||||
20.0, 0.0, 20.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'0wqbiekp' /* email@provider.etc */,
|
'0wqbiekp' /* email@provider.etc */,
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
.bodyMedium
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey(
|
.containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -4,8 +4,7 @@ import 'package:hub/components/templates_components/visitor_search_modal_templat
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
import 'package:hub/shared/utils/storage_util.dart';
|
import 'package:hub/shared/utils/storage_util.dart';
|
||||||
|
|
||||||
class VisitorSearchModalTemplateComponentModel
|
class VisitorSearchModalTemplateComponentModel extends FlutterFlowModel<VisitorSearchModalTemplateComponentWidget> {
|
||||||
extends FlutterFlowModel<VisitorSearchModalTemplateComponentWidget> {
|
|
||||||
late final String devUUID;
|
late final String devUUID;
|
||||||
late final String userUUID;
|
late final String userUUID;
|
||||||
late final String cliUUID;
|
late final String cliUUID;
|
||||||
|
@ -14,18 +13,15 @@ class VisitorSearchModalTemplateComponentModel
|
||||||
void addToVisitors(dynamic item) => visitors.add(item);
|
void addToVisitors(dynamic item) => visitors.add(item);
|
||||||
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
void removeFromVisitors(dynamic item) => visitors.remove(item);
|
||||||
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
void removeAtIndexFromVisitors(int index) => visitors.removeAt(index);
|
||||||
void insertAtIndexInVisitors(int index, dynamic item) =>
|
void insertAtIndexInVisitors(int index, dynamic item) => visitors.insert(index, item);
|
||||||
visitors.insert(index, item);
|
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) => visitors[index] = updateFn(visitors[index]);
|
||||||
void updateVisitorsAtIndex(int index, Function(dynamic) updateFn) =>
|
|
||||||
visitors[index] = updateFn(visitors[index]);
|
|
||||||
|
|
||||||
List<String> docs = [];
|
List<String> docs = [];
|
||||||
void addToDocs(String item) => docs.add(item);
|
void addToDocs(String item) => docs.add(item);
|
||||||
void removeFromDocs(String item) => docs.remove(item);
|
void removeFromDocs(String item) => docs.remove(item);
|
||||||
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
void removeAtIndexFromDocs(int index) => docs.removeAt(index);
|
||||||
void insertAtIndexInDocs(int index, String item) => docs.insert(index, item);
|
void insertAtIndexInDocs(int index, String item) => docs.insert(index, item);
|
||||||
void updateDocsAtIndex(int index, Function(String) updateFn) =>
|
void updateDocsAtIndex(int index, Function(String) updateFn) => docs[index] = updateFn(docs[index]);
|
||||||
docs[index] = updateFn(docs[index]);
|
|
||||||
|
|
||||||
FocusNode? textFieldFocusNode;
|
FocusNode? textFieldFocusNode;
|
||||||
TextEditingController? textController;
|
TextEditingController? textController;
|
||||||
|
|
|
@ -26,12 +26,10 @@ class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function(List<String>? docsParam)? getDocs;
|
final Future Function(List<String>? docsParam)? getDocs;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<VisitorSearchModalTemplateComponentWidget> createState() =>
|
State<VisitorSearchModalTemplateComponentWidget> createState() => _VisitorSearchModalTemplateComponentWidgetState();
|
||||||
_VisitorSearchModalTemplateComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _VisitorSearchModalTemplateComponentWidgetState
|
class _VisitorSearchModalTemplateComponentWidgetState extends State<VisitorSearchModalTemplateComponentWidget>
|
||||||
extends State<VisitorSearchModalTemplateComponentWidget>
|
|
||||||
with TickerProviderStateMixin {
|
with TickerProviderStateMixin {
|
||||||
late VisitorSearchModalTemplateComponentModel _model;
|
late VisitorSearchModalTemplateComponentModel _model;
|
||||||
|
|
||||||
|
@ -43,8 +41,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model =
|
_model = createModel(context, () => VisitorSearchModalTemplateComponentModel());
|
||||||
createModel(context, () => VisitorSearchModalTemplateComponentModel());
|
|
||||||
|
|
||||||
_model.textController ??= TextEditingController();
|
_model.textController ??= TextEditingController();
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
|
@ -85,8 +82,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(16.0, 25.0, 16.0, 0.0),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.textController,
|
controller: _model.textController,
|
||||||
focusNode: _model.textFieldFocusNode,
|
focusNode: _model.textFieldFocusNode,
|
||||||
|
@ -103,12 +99,10 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
'cjlpru1m' /* Procure pelo documento do visi... */,
|
'cjlpru1m' /* Procure pelo documento do visi... */,
|
||||||
),
|
),
|
||||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
|
||||||
),
|
),
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
|
@ -168,11 +162,9 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
keyboardType:
|
keyboardType: const TextInputType.numberWithOptions(signed: true),
|
||||||
const TextInputType.numberWithOptions(signed: true),
|
|
||||||
validator: _model.textControllerValidator.asValidator(context),
|
validator: _model.textControllerValidator.asValidator(context),
|
||||||
inputFormatters: [
|
inputFormatters: [
|
||||||
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
||||||
|
@ -185,33 +177,29 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 0.0, 0.0),
|
||||||
16.0, 12.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'9coywebh' /* Visitantes encontrados */,
|
'9coywebh' /* Visitantes encontrados */,
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).labelMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).labelMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(4.0, 12.0, 16.0, 0.0),
|
||||||
4.0, 12.0, 16.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
_model.visitors.length.toString(),
|
_model.visitors.length.toString(),
|
||||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -222,12 +210,10 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (_model.visitors.isNotEmpty) {
|
if (_model.visitors.isNotEmpty) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(8.0, 8.0, 8.0, 0.0),
|
||||||
8.0, 8.0, 8.0, 0.0),
|
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
final visitor =
|
final visitor = _model.visitors.map((e) => e).toList();
|
||||||
_model.visitors.map((e) => e).toList();
|
|
||||||
final doc = _model.docs.map((e) => e).toList();
|
final doc = _model.docs.map((e) => e).toList();
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
|
@ -237,8 +223,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
final visitorItem = visitor[visitorIndex];
|
final visitorItem = visitor[visitorIndex];
|
||||||
final docItem = doc[visitorIndex];
|
final docItem = doc[visitorIndex];
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 1.0),
|
||||||
0.0, 0.0, 0.0, 1.0),
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
|
@ -247,24 +232,19 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
.primaryBackground,
|
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment:
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
CrossAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(40.0),
|
||||||
BorderRadius.circular(40.0),
|
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
fadeInDuration: const Duration(
|
fadeInDuration: const Duration(milliseconds: 500),
|
||||||
milliseconds: 500),
|
fadeOutDuration: const Duration(milliseconds: 500),
|
||||||
fadeOutDuration: const Duration(
|
|
||||||
milliseconds: 500),
|
|
||||||
imageUrl:
|
imageUrl:
|
||||||
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${_model.devUUID}&userUUID=${_model.userUUID}&cliID=${_model.cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
"https://freaccess.com.br/freaccess/getImage.php?devUUID=${_model.devUUID}&userUUID=${_model.userUUID}&cliID=${_model.cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||||
visitorItem,
|
visitorItem,
|
||||||
|
@ -278,16 +258,11 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment:
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
MainAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||||
const EdgeInsetsDirectional
|
|
||||||
.fromSTEB(
|
|
||||||
12.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
valueOrDefault<String>(
|
valueOrDefault<String>(
|
||||||
getJsonField(
|
getJsonField(
|
||||||
|
@ -296,21 +271,11 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
)?.toString(),
|
)?.toString(),
|
||||||
'NOT FOUND',
|
'NOT FOUND',
|
||||||
),
|
),
|
||||||
style: FlutterFlowTheme.of(
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
context)
|
fontFamily: FlutterFlowTheme.of(context).bodyLargeFamily,
|
||||||
.bodyLarge
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyLargeFamily,
|
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
.asMap()
|
FlutterFlowTheme.of(context).bodyLargeFamily),
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyLargeFamily),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -323,14 +288,11 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
buttonSize: 40.0,
|
buttonSize: 40.0,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.close,
|
Icons.close,
|
||||||
color:
|
color: FlutterFlowTheme.of(context).customColor6,
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.customColor6,
|
|
||||||
size: 20.0,
|
size: 20.0,
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
_model.removeFromVisitors(
|
_model.removeFromVisitors(visitorItem);
|
||||||
visitorItem);
|
|
||||||
_model.removeFromDocs(docItem);
|
_model.removeFromDocs(docItem);
|
||||||
safeSetState(() {});
|
safeSetState(() {});
|
||||||
},
|
},
|
||||||
|
@ -384,18 +346,15 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: MediaQuery.of(context).size.width * 0.3,
|
width: MediaQuery.of(context).size.width * 0.3,
|
||||||
height: MediaQuery.of(context).size.width * 0.1,
|
height: MediaQuery.of(context).size.width * 0.1,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
|
||||||
24.0, 0.0, 24.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
fontFamily:
|
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily,
|
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts:
|
||||||
FlutterFlowTheme.of(context).titleSmallFamily),
|
GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).titleSmallFamily),
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
|
@ -433,8 +392,7 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
Future<void> addVisitor(BuildContext context) async {
|
Future<void> addVisitor(BuildContext context) async {
|
||||||
safeSetState(() {
|
safeSetState(() {
|
||||||
_model.textController?.text = _model.textController.text;
|
_model.textController?.text = _model.textController.text;
|
||||||
_model.textController?.selection =
|
_model.textController?.selection = TextSelection.collapsed(offset: _model.textController!.text.length);
|
||||||
TextSelection.collapsed(offset: _model.textController!.text.length);
|
|
||||||
});
|
});
|
||||||
_model.getVisitorByDoc = await PhpGroup.getVisitorByDocCall.call(
|
_model.getVisitorByDoc = await PhpGroup.getVisitorByDocCall.call(
|
||||||
documento: _model.textController.text,
|
documento: _model.textController.text,
|
||||||
|
@ -444,12 +402,8 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
(_model.getVisitorByDoc?.jsonBody ?? ''),
|
(_model.getVisitorByDoc?.jsonBody ?? ''),
|
||||||
) !=
|
) !=
|
||||||
'0' &&
|
'0' &&
|
||||||
PhpGroup.getVisitorByDocCall
|
PhpGroup.getVisitorByDocCall.error((_model.getVisitorByDoc?.jsonBody ?? '')) == false &&
|
||||||
.error((_model.getVisitorByDoc?.jsonBody ?? '')) ==
|
PhpGroup.getVisitorByDocCall.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) != null) {
|
||||||
false &&
|
|
||||||
PhpGroup.getVisitorByDocCall
|
|
||||||
.vistanteId((_model.getVisitorByDoc?.jsonBody ?? '')) !=
|
|
||||||
null) {
|
|
||||||
String newDoc = _model.textController.text;
|
String newDoc = _model.textController.text;
|
||||||
bool existDoc = _model.docs.contains(newDoc);
|
bool existDoc = _model.docs.contains(newDoc);
|
||||||
if (existDoc == false) {
|
if (existDoc == false) {
|
||||||
|
@ -461,9 +415,8 @@ class _VisitorSearchModalTemplateComponentWidgetState
|
||||||
safeSetState(() {});
|
safeSetState(() {});
|
||||||
} else if (existDoc == true) {
|
} else if (existDoc == true) {
|
||||||
ToastUtil.showToast(
|
ToastUtil.showToast(
|
||||||
message: FFLocalizations.of(context).getVariableText(
|
message: FFLocalizations.of(context)
|
||||||
ptText: 'Visitante já adicionado!',
|
.getVariableText(ptText: 'Visitante já adicionado!', enText: 'Visitor already added!'),
|
||||||
enText: 'Visitor already added!'),
|
|
||||||
gravity: ToastGravity.TOP,
|
gravity: ToastGravity.TOP,
|
||||||
backgroundColor: Colors.red);
|
backgroundColor: Colors.red);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'welcome_template_component_widget.dart'
|
import 'welcome_template_component_widget.dart' show WelcomeTemplateComponentWidget;
|
||||||
show WelcomeTemplateComponentWidget;
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class WelcomeTemplateComponentModel
|
class WelcomeTemplateComponentModel extends FlutterFlowModel<WelcomeTemplateComponentWidget> {
|
||||||
extends FlutterFlowModel<WelcomeTemplateComponentWidget> {
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {}
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,7 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function()? toggleSignInPage;
|
final Future Function()? toggleSignInPage;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<WelcomeTemplateComponentWidget> createState() =>
|
State<WelcomeTemplateComponentWidget> createState() => _WelcomeTemplateComponentWidgetState();
|
||||||
_WelcomeTemplateComponentWidgetState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponentWidget> with TickerProviderStateMixin {
|
class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponentWidget> with TickerProviderStateMixin {
|
||||||
|
@ -41,8 +40,7 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => WelcomeTemplateComponentModel());
|
_model = createModel(context, () => WelcomeTemplateComponentModel());
|
||||||
|
|
||||||
animationsMap.addAll(
|
animationsMap.addAll(<String, AnimationInfo>{
|
||||||
<String, AnimationInfo>{
|
|
||||||
'containerOnPageLoadAnimation': AnimationInfo(
|
'containerOnPageLoadAnimation': AnimationInfo(
|
||||||
trigger: AnimationTrigger.onPageLoad,
|
trigger: AnimationTrigger.onPageLoad,
|
||||||
effectsBuilder: () => [
|
effectsBuilder: () => [
|
||||||
|
@ -112,11 +110,10 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text( FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
Text(
|
||||||
|
FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
.displaySmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
fontSize: 24.0,
|
fontSize: 24.0,
|
||||||
|
@ -127,11 +124,10 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
),
|
),
|
||||||
Align(
|
Align(
|
||||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||||
child: Text(FFLocalizations.of(context).getText('5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
child: Text(
|
||||||
|
FFLocalizations.of(context).getText('5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context)
|
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||||
.displaySmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 15.0,
|
fontSize: 15.0,
|
||||||
|
@ -171,7 +167,7 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
blurRadius: 0.0,
|
blurRadius: 0.0,
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
offset: Offset(0.0,0.0),
|
offset: Offset(0.0, 0.0),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
@ -198,88 +194,61 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignInPage?.call();
|
await widget.toggleSignInPage?.call();
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context).getText( 'dynet730' /* Entrar */),
|
text: FFLocalizations.of(context).getText('dynet730' /* Entrar */),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
.primary,
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
textStyle: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color:
|
color: FlutterFlowTheme.of(context).info,
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.info,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(12.0),
|
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding:
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 0.0, 0.0, 16.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>(
|
key: const ValueKey<String>('toggleSignUpPage'),
|
||||||
'toggleSignUpPage'),
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignUpPage?.call();
|
await widget.toggleSignUpPage?.call();
|
||||||
},
|
},
|
||||||
text:
|
text: FFLocalizations.of(context).getText(
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'hha60cg7' /* Cadastrar */,
|
'hha60cg7' /* Cadastrar */,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding:
|
color: FlutterFlowTheme.of(context).customColor1,
|
||||||
const EdgeInsetsDirectional
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.customColor1,
|
|
||||||
textStyle: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color:
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(12.0),
|
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
),
|
),
|
||||||
|
@ -289,60 +258,39 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
} else {
|
} else {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment:
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
MainAxisAlignment.spaceEvenly,
|
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('toggleSignInPage'),
|
key: const ValueKey<String>('toggleSignInPage'),
|
||||||
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
await widget.toggleSignInPage?.call();
|
||||||
await widget.toggleSignInPage
|
|
||||||
?.call();
|
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context)
|
text: FFLocalizations.of(context).getText(
|
||||||
.getText(
|
|
||||||
'zvtay8ee' /* Entrar */,
|
'zvtay8ee' /* Entrar */,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding:
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
const EdgeInsetsDirectional
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
.fromSTEB(
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
0.0, 0.0, 0.0, 0.0),
|
color: FlutterFlowTheme.of(context).info,
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primary,
|
|
||||||
textStyle: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.info,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(12.0),
|
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
),
|
),
|
||||||
|
@ -350,53 +298,35 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
key: const ValueKey<String>('toggleSignUpPage'),
|
key: const ValueKey<String>('toggleSignUpPage'),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.toggleSignUpPage
|
await widget.toggleSignUpPage?.call();
|
||||||
?.call();
|
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context)
|
text: FFLocalizations.of(context).getText(
|
||||||
.getText(
|
|
||||||
'o6zob50a' /* Cadastrar */,
|
'o6zob50a' /* Cadastrar */,
|
||||||
),
|
),
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.0,
|
height: 44.0,
|
||||||
padding: const EdgeInsetsDirectional
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
iconPadding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
iconPadding:
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
const EdgeInsetsDirectional
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
.fromSTEB(
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
0.0, 0.0, 0.0, 0.0),
|
color: FlutterFlowTheme.of(context).info,
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primary,
|
|
||||||
textStyle: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.titleSmall
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
'Plus Jakarta Sans',
|
|
||||||
color: FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.info,
|
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
'Plus Jakarta Sans'),
|
|
||||||
),
|
),
|
||||||
elevation: 3.0,
|
elevation: 3.0,
|
||||||
borderSide: const BorderSide(
|
borderSide: const BorderSide(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
BorderRadius.circular(12.0),
|
|
||||||
),
|
),
|
||||||
showLoadingIndicator: false,
|
showLoadingIndicator: false,
|
||||||
),
|
),
|
||||||
|
@ -411,8 +341,7 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
).animateOnPageLoad(
|
).animateOnPageLoad(animationsMap['containerOnPageLoadAnimation']!),
|
||||||
animationsMap['containerOnPageLoadAnimation']!),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
// File generated by FlutterFire CLI.
|
// File generated by FlutterFire CLI.
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
||||||
import 'package:flutter/foundation.dart'
|
import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
||||||
show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
|
||||||
|
|
||||||
/// Default [FirebaseOptions] for use with your Firebase apps.
|
/// Default [FirebaseOptions] for use with your Firebase apps.
|
||||||
///
|
///
|
||||||
|
@ -73,10 +72,8 @@ class DefaultFirebaseOptions {
|
||||||
projectId: 'accessmoblie-da839',
|
projectId: 'accessmoblie-da839',
|
||||||
databaseURL: 'https://accessmoblie-da839.firebaseio.com',
|
databaseURL: 'https://accessmoblie-da839.firebaseio.com',
|
||||||
storageBucket: 'accessmoblie-da839.appspot.com',
|
storageBucket: 'accessmoblie-da839.appspot.com',
|
||||||
androidClientId:
|
androidClientId: '187064172787-7et0qu5p2qtmisvqgndn3kfi1b7u9ifl.apps.googleusercontent.com',
|
||||||
'187064172787-7et0qu5p2qtmisvqgndn3kfi1b7u9ifl.apps.googleusercontent.com',
|
iosClientId: '187064172787-c5gs7fvp78om9r7dofkjn2qmpumkuvig.apps.googleusercontent.com',
|
||||||
iosClientId:
|
|
||||||
'187064172787-c5gs7fvp78om9r7dofkjn2qmpumkuvig.apps.googleusercontent.com',
|
|
||||||
iosBundleId: 'br.com.freaccess.hub',
|
iosBundleId: 'br.com.freaccess.hub',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,7 @@ class FFIcons {
|
||||||
static const IconData kvector1 = IconData(0xe902, fontFamily: _iconsFamily);
|
static const IconData kvector1 = IconData(0xe902, fontFamily: _iconsFamily);
|
||||||
|
|
||||||
// menu
|
// menu
|
||||||
static const IconData kiconFastPass =
|
static const IconData kiconFastPass = IconData(0xe900, fontFamily: _menuFamily);
|
||||||
IconData(0xe900, fontFamily: _menuFamily);
|
|
||||||
static const IconData kvector2 = IconData(0xe905, fontFamily: _menuFamily);
|
static const IconData kvector2 = IconData(0xe905, fontFamily: _menuFamily);
|
||||||
static const IconData kvector3 = IconData(0xe906, fontFamily: _menuFamily);
|
static const IconData kvector3 = IconData(0xe906, fontFamily: _menuFamily);
|
||||||
}
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
|
|
||||||
|
|
||||||
enum AnimationTrigger {
|
enum AnimationTrigger {
|
||||||
onPageLoad,
|
onPageLoad,
|
||||||
onActionTrigger,
|
onActionTrigger,
|
||||||
|
@ -52,12 +51,8 @@ extension AnimatedWidgetExtension on Widget {
|
||||||
return Animate(
|
return Animate(
|
||||||
effects: animationInfo.effects,
|
effects: animationInfo.effects,
|
||||||
child: this,
|
child: this,
|
||||||
onPlay: (controller) => animationInfo.loop
|
onPlay: (controller) => animationInfo.loop ? controller.repeat(reverse: animationInfo.reverse) : null,
|
||||||
? controller.repeat(reverse: animationInfo.reverse)
|
onComplete: (controller) => !animationInfo.loop && animationInfo.reverse ? controller.reverse() : null,
|
||||||
: null,
|
|
||||||
onComplete: (controller) => !animationInfo.loop && animationInfo.reverse
|
|
||||||
? controller.reverse()
|
|
||||||
: null,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,11 +63,7 @@ extension AnimatedWidgetExtension on Widget {
|
||||||
}) {
|
}) {
|
||||||
animationInfo.maybeUpdateEffects(effects);
|
animationInfo.maybeUpdateEffects(effects);
|
||||||
return hasBeenTriggered || animationInfo.applyInitialState
|
return hasBeenTriggered || animationInfo.applyInitialState
|
||||||
? Animate(
|
? Animate(controller: animationInfo.controller, autoPlay: false, effects: animationInfo.effects, child: this)
|
||||||
controller: animationInfo.controller,
|
|
||||||
autoPlay: false,
|
|
||||||
effects: animationInfo.effects,
|
|
||||||
child: this)
|
|
||||||
: this;
|
: this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,9 @@ import 'package:flutter/gestures.dart' show DragStartBehavior;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const double _kTabHeight = 46.0;
|
const double _kTabHeight = 46.0;
|
||||||
|
|
||||||
typedef _LayoutCallback = void Function(
|
typedef _LayoutCallback = void Function(List<double> xOffsets, TextDirection textDirection, double width);
|
||||||
List<double> xOffsets, TextDirection textDirection, double width);
|
|
||||||
|
|
||||||
class _TabLabelBarRenderer extends RenderFlex {
|
class _TabLabelBarRenderer extends RenderFlex {
|
||||||
_TabLabelBarRenderer({
|
_TabLabelBarRenderer({
|
||||||
|
@ -36,8 +33,7 @@ class _TabLabelBarRenderer extends RenderFlex {
|
||||||
RenderBox? child = firstChild;
|
RenderBox? child = firstChild;
|
||||||
final List<double> xOffsets = <double>[];
|
final List<double> xOffsets = <double>[];
|
||||||
while (child != null) {
|
while (child != null) {
|
||||||
final FlexParentData childParentData =
|
final FlexParentData childParentData = child.parentData! as FlexParentData;
|
||||||
child.parentData! as FlexParentData;
|
|
||||||
xOffsets.add(childParentData.offset.dx);
|
xOffsets.add(childParentData.offset.dx);
|
||||||
assert(child.parentData == childParentData);
|
assert(child.parentData == childParentData);
|
||||||
child = childParentData.nextSibling;
|
child = childParentData.nextSibling;
|
||||||
|
@ -86,8 +82,7 @@ class _TabLabelBar extends Flex {
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void updateRenderObject(
|
void updateRenderObject(BuildContext context, _TabLabelBarRenderer renderObject) {
|
||||||
BuildContext context, _TabLabelBarRenderer renderObject) {
|
|
||||||
super.updateRenderObject(context, renderObject);
|
super.updateRenderObject(context, renderObject);
|
||||||
renderObject.onPerformLayout = onPerformLayout;
|
renderObject.onPerformLayout = onPerformLayout;
|
||||||
}
|
}
|
||||||
|
@ -138,8 +133,7 @@ class _IndicatorPainter extends CustomPainter {
|
||||||
assert(_currentTabOffsets!.isNotEmpty);
|
assert(_currentTabOffsets!.isNotEmpty);
|
||||||
assert(tabIndex >= 0);
|
assert(tabIndex >= 0);
|
||||||
assert(tabIndex <= maxTabIndex);
|
assert(tabIndex <= maxTabIndex);
|
||||||
return (_currentTabOffsets![tabIndex] + _currentTabOffsets![tabIndex + 1]) /
|
return (_currentTabOffsets![tabIndex] + _currentTabOffsets![tabIndex + 1]) / 2.0;
|
||||||
2.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -194,12 +188,10 @@ class _TabBarScrollPosition extends ScrollPositionWithSingleContext {
|
||||||
// ballistic scroll activity.
|
// ballistic scroll activity.
|
||||||
if (!_viewportDimensionWasNonZero || _needsPixelsCorrection) {
|
if (!_viewportDimensionWasNonZero || _needsPixelsCorrection) {
|
||||||
_needsPixelsCorrection = false;
|
_needsPixelsCorrection = false;
|
||||||
correctPixels(tabBar._initialScrollOffset(
|
correctPixels(tabBar._initialScrollOffset(viewportDimension, minScrollExtent, maxScrollExtent));
|
||||||
viewportDimension, minScrollExtent, maxScrollExtent));
|
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
return super.applyContentDimensions(minScrollExtent, maxScrollExtent) &&
|
return super.applyContentDimensions(minScrollExtent, maxScrollExtent) && result;
|
||||||
result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void markNeedsPixelsCorrection() {
|
void markNeedsPixelsCorrection() {
|
||||||
|
@ -215,8 +207,7 @@ class _TabBarScrollController extends ScrollController {
|
||||||
final _FlutterFlowButtonTabBarState tabBar;
|
final _FlutterFlowButtonTabBarState tabBar;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ScrollPosition createScrollPosition(ScrollPhysics physics,
|
ScrollPosition createScrollPosition(ScrollPhysics physics, ScrollContext context, ScrollPosition? oldPosition) {
|
||||||
ScrollContext context, ScrollPosition? oldPosition) {
|
|
||||||
return _TabBarScrollPosition(
|
return _TabBarScrollPosition(
|
||||||
physics: physics,
|
physics: physics,
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -227,8 +218,7 @@ class _TabBarScrollController extends ScrollController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A Flutterflow Design widget that displays a horizontal row of tabs.
|
/// A Flutterflow Design widget that displays a horizontal row of tabs.
|
||||||
class FlutterFlowButtonTabBar extends StatefulWidget
|
class FlutterFlowButtonTabBar extends StatefulWidget implements PreferredSizeWidget {
|
||||||
implements PreferredSizeWidget {
|
|
||||||
/// The [tabs] argument must not be null and its length must match the [controller]'s
|
/// The [tabs] argument must not be null and its length must match the [controller]'s
|
||||||
/// [TabController.length].
|
/// [TabController.length].
|
||||||
///
|
///
|
||||||
|
@ -362,17 +352,14 @@ class FlutterFlowButtonTabBar extends StatefulWidget
|
||||||
maxHeight = math.max(itemHeight, maxHeight);
|
maxHeight = math.max(itemHeight, maxHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Size.fromHeight(
|
return Size.fromHeight(maxHeight + labelPadding.vertical + buttonMargin.vertical);
|
||||||
maxHeight + labelPadding.vertical + buttonMargin.vertical);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<FlutterFlowButtonTabBar> createState() =>
|
State<FlutterFlowButtonTabBar> createState() => _FlutterFlowButtonTabBarState();
|
||||||
_FlutterFlowButtonTabBarState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar> with TickerProviderStateMixin {
|
||||||
with TickerProviderStateMixin {
|
|
||||||
ScrollController? _scrollController;
|
ScrollController? _scrollController;
|
||||||
TabController? _controller;
|
TabController? _controller;
|
||||||
_IndicatorPainter? _indicatorPainter;
|
_IndicatorPainter? _indicatorPainter;
|
||||||
|
@ -396,8 +383,7 @@ class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
||||||
|
|
||||||
/// The animation duration is 2/3 of the tab scroll animation duration in
|
/// The animation duration is 2/3 of the tab scroll animation duration in
|
||||||
/// Material design (kTabScrollDuration).
|
/// Material design (kTabScrollDuration).
|
||||||
_animationController = AnimationController(
|
_animationController = AnimationController(vsync: this, duration: const Duration(milliseconds: 200));
|
||||||
vsync: this, duration: const Duration(milliseconds: 200));
|
|
||||||
|
|
||||||
// so the buttons start in their "final" state (color)
|
// so the buttons start in their "final" state (color)
|
||||||
_animationController
|
_animationController
|
||||||
|
@ -415,8 +401,7 @@ class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
||||||
bool get _controllerIsValid => _controller?.animation != null;
|
bool get _controllerIsValid => _controller?.animation != null;
|
||||||
|
|
||||||
void _updateTabController() {
|
void _updateTabController() {
|
||||||
final TabController? newController =
|
final TabController? newController = widget.controller ?? DefaultTabController.maybeOf(context);
|
||||||
widget.controller ?? DefaultTabController.maybeOf(context);
|
|
||||||
assert(() {
|
assert(() {
|
||||||
if (newController == null) {
|
if (newController == null) {
|
||||||
throw FlutterError(
|
throw FlutterError(
|
||||||
|
@ -501,8 +486,7 @@ class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
||||||
|
|
||||||
int get maxTabIndex => _indicatorPainter!.maxTabIndex;
|
int get maxTabIndex => _indicatorPainter!.maxTabIndex;
|
||||||
|
|
||||||
double _tabScrollOffset(
|
double _tabScrollOffset(int index, double viewportWidth, double minExtent, double maxExtent) {
|
||||||
int index, double viewportWidth, double minExtent, double maxExtent) {
|
|
||||||
if (!widget.isScrollable) {
|
if (!widget.isScrollable) {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
@ -518,34 +502,27 @@ class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return clampDouble(
|
return clampDouble(tabCenter + paddingStart - viewportWidth / 2.0, minExtent, maxExtent);
|
||||||
tabCenter + paddingStart - viewportWidth / 2.0, minExtent, maxExtent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double _tabCenteredScrollOffset(int index) {
|
double _tabCenteredScrollOffset(int index) {
|
||||||
final ScrollPosition position = _scrollController!.position;
|
final ScrollPosition position = _scrollController!.position;
|
||||||
return _tabScrollOffset(index, position.viewportDimension,
|
return _tabScrollOffset(index, position.viewportDimension, position.minScrollExtent, position.maxScrollExtent);
|
||||||
position.minScrollExtent, position.maxScrollExtent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double _initialScrollOffset(
|
double _initialScrollOffset(double viewportWidth, double minExtent, double maxExtent) {
|
||||||
double viewportWidth, double minExtent, double maxExtent) {
|
|
||||||
return _tabScrollOffset(_currentIndex, viewportWidth, minExtent, maxExtent);
|
return _tabScrollOffset(_currentIndex, viewportWidth, minExtent, maxExtent);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _scrollToCurrentIndex() {
|
void _scrollToCurrentIndex() {
|
||||||
final double offset = _tabCenteredScrollOffset(_currentIndex);
|
final double offset = _tabCenteredScrollOffset(_currentIndex);
|
||||||
_scrollController!
|
_scrollController!.animateTo(offset, duration: kTabScrollDuration, curve: Curves.ease);
|
||||||
.animateTo(offset, duration: kTabScrollDuration, curve: Curves.ease);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _scrollToControllerValue() {
|
void _scrollToControllerValue() {
|
||||||
final double? leadingPosition =
|
final double? leadingPosition = _currentIndex > 0 ? _tabCenteredScrollOffset(_currentIndex - 1) : null;
|
||||||
_currentIndex > 0 ? _tabCenteredScrollOffset(_currentIndex - 1) : null;
|
|
||||||
final double middlePosition = _tabCenteredScrollOffset(_currentIndex);
|
final double middlePosition = _tabCenteredScrollOffset(_currentIndex);
|
||||||
final double? trailingPosition = _currentIndex < maxTabIndex
|
final double? trailingPosition = _currentIndex < maxTabIndex ? _tabCenteredScrollOffset(_currentIndex + 1) : null;
|
||||||
? _tabCenteredScrollOffset(_currentIndex + 1)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
final double index = _controller!.index.toDouble();
|
final double index = _controller!.index.toDouble();
|
||||||
final double value = _controller!.animation!.value;
|
final double value = _controller!.animation!.value;
|
||||||
|
@ -557,13 +534,9 @@ class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
||||||
} else if (value == index) {
|
} else if (value == index) {
|
||||||
offset = middlePosition;
|
offset = middlePosition;
|
||||||
} else if (value < index) {
|
} else if (value < index) {
|
||||||
offset = leadingPosition == null
|
offset = leadingPosition == null ? middlePosition : lerpDouble(middlePosition, leadingPosition, index - value)!;
|
||||||
? middlePosition
|
|
||||||
: lerpDouble(middlePosition, leadingPosition, index - value)!;
|
|
||||||
} else {
|
} else {
|
||||||
offset = trailingPosition == null
|
offset = trailingPosition == null ? middlePosition : lerpDouble(middlePosition, trailingPosition, value - index)!;
|
||||||
? middlePosition
|
|
||||||
: lerpDouble(middlePosition, trailingPosition, value - index)!;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_scrollController!.jumpTo(offset);
|
_scrollController!.jumpTo(offset);
|
||||||
|
@ -601,8 +574,7 @@ class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called each time layout completes.
|
// Called each time layout completes.
|
||||||
void _saveTabOffsets(
|
void _saveTabOffsets(List<double> tabOffsets, TextDirection textDirection, double width) {
|
||||||
List<double> tabOffsets, TextDirection textDirection, double width) {
|
|
||||||
_tabStripWidth = width;
|
_tabStripWidth = width;
|
||||||
_indicatorPainter?.saveTabOffsets(tabOffsets, textDirection);
|
_indicatorPainter?.saveTabOffsets(tabOffsets, textDirection);
|
||||||
}
|
}
|
||||||
|
@ -626,52 +598,34 @@ class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
||||||
}
|
}
|
||||||
|
|
||||||
final TextStyle? textStyle = TextStyle.lerp(
|
final TextStyle? textStyle = TextStyle.lerp(
|
||||||
(widget.unselectedLabelStyle ??
|
(widget.unselectedLabelStyle ?? tabBarTheme.labelStyle ?? DefaultTextStyle.of(context).style).copyWith(
|
||||||
tabBarTheme.labelStyle ??
|
|
||||||
DefaultTextStyle.of(context).style)
|
|
||||||
.copyWith(
|
|
||||||
color: widget.unselectedLabelColor,
|
color: widget.unselectedLabelColor,
|
||||||
),
|
),
|
||||||
(widget.labelStyle ??
|
(widget.labelStyle ?? tabBarTheme.labelStyle ?? DefaultTextStyle.of(context).style).copyWith(
|
||||||
tabBarTheme.labelStyle ??
|
|
||||||
DefaultTextStyle.of(context).style)
|
|
||||||
.copyWith(
|
|
||||||
color: widget.labelColor,
|
color: widget.labelColor,
|
||||||
),
|
),
|
||||||
animationValue);
|
animationValue);
|
||||||
|
|
||||||
final Color? textColor = Color.lerp(
|
final Color? textColor = Color.lerp(widget.unselectedLabelColor, widget.labelColor, animationValue);
|
||||||
widget.unselectedLabelColor, widget.labelColor, animationValue);
|
|
||||||
|
|
||||||
final Color? borderColor = Color.lerp(
|
final Color? borderColor = Color.lerp(widget.unselectedBorderColor, widget.borderColor, animationValue);
|
||||||
widget.unselectedBorderColor, widget.borderColor, animationValue);
|
|
||||||
|
|
||||||
BoxDecoration? boxDecoration = BoxDecoration.lerp(
|
BoxDecoration? boxDecoration = BoxDecoration.lerp(
|
||||||
BoxDecoration(
|
BoxDecoration(
|
||||||
color: widget.unselectedDecoration?.color ??
|
color: widget.unselectedDecoration?.color ?? widget.unselectedBackgroundColor ?? Colors.transparent,
|
||||||
widget.unselectedBackgroundColor ??
|
|
||||||
Colors.transparent,
|
|
||||||
boxShadow: widget.unselectedDecoration?.boxShadow,
|
boxShadow: widget.unselectedDecoration?.boxShadow,
|
||||||
gradient: widget.unselectedDecoration?.gradient,
|
gradient: widget.unselectedDecoration?.gradient,
|
||||||
borderRadius: widget.useToggleButtonStyle
|
borderRadius: widget.useToggleButtonStyle ? null : BorderRadius.circular(widget.borderRadius),
|
||||||
? null
|
|
||||||
: BorderRadius.circular(widget.borderRadius),
|
|
||||||
),
|
),
|
||||||
BoxDecoration(
|
BoxDecoration(
|
||||||
color: widget.decoration?.color ??
|
color: widget.decoration?.color ?? widget.backgroundColor ?? Colors.transparent,
|
||||||
widget.backgroundColor ??
|
|
||||||
Colors.transparent,
|
|
||||||
boxShadow: widget.decoration?.boxShadow,
|
boxShadow: widget.decoration?.boxShadow,
|
||||||
gradient: widget.decoration?.gradient,
|
gradient: widget.decoration?.gradient,
|
||||||
borderRadius: widget.useToggleButtonStyle
|
borderRadius: widget.useToggleButtonStyle ? null : BorderRadius.circular(widget.borderRadius),
|
||||||
? null
|
|
||||||
: BorderRadius.circular(widget.borderRadius),
|
|
||||||
),
|
),
|
||||||
animationValue);
|
animationValue);
|
||||||
|
|
||||||
if (widget.useToggleButtonStyle &&
|
if (widget.useToggleButtonStyle && widget.borderWidth > 0 && boxDecoration != null) {
|
||||||
widget.borderWidth > 0 &&
|
|
||||||
boxDecoration != null) {
|
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
boxDecoration = boxDecoration.copyWith(
|
boxDecoration = boxDecoration.copyWith(
|
||||||
border: Border(
|
border: Border(
|
||||||
|
@ -705,13 +659,11 @@ class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
||||||
return Padding(
|
return Padding(
|
||||||
key: _tabKeys[index],
|
key: _tabKeys[index],
|
||||||
// padding for the buttons
|
// padding for the buttons
|
||||||
padding:
|
padding: widget.useToggleButtonStyle ? EdgeInsets.zero : widget.buttonMargin,
|
||||||
widget.useToggleButtonStyle ? EdgeInsets.zero : widget.buttonMargin,
|
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () => _handleTap(index),
|
onPressed: () => _handleTap(index),
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
elevation: WidgetStateProperty.all(
|
elevation: WidgetStateProperty.all(widget.useToggleButtonStyle ? 0 : widget.elevation),
|
||||||
widget.useToggleButtonStyle ? 0 : widget.elevation),
|
|
||||||
|
|
||||||
/// give a pretty small minimum size
|
/// give a pretty small minimum size
|
||||||
minimumSize: WidgetStateProperty.all(const Size(10, 10)),
|
minimumSize: WidgetStateProperty.all(const Size(10, 10)),
|
||||||
|
@ -777,14 +729,11 @@ class _FlutterFlowButtonTabBarState extends State<FlutterFlowButtonTabBar>
|
||||||
|
|
||||||
if (_controller!.length == 0) {
|
if (_controller!.length == 0) {
|
||||||
return Container(
|
return Container(
|
||||||
height: _kTabHeight +
|
height: _kTabHeight + widget.labelPadding.vertical + widget.buttonMargin.vertical,
|
||||||
widget.labelPadding.vertical +
|
|
||||||
widget.buttonMargin.vertical,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<Widget> wrappedTabs =
|
final List<Widget> wrappedTabs = List<Widget>.generate(widget.tabs.length, (int index) {
|
||||||
List<Widget>.generate(widget.tabs.length, (int index) {
|
|
||||||
return _buildStyledTab(widget.tabs[index], index);
|
return _buildStyledTab(widget.tabs[index], index);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import 'package:flutter/scheduler.dart';
|
||||||
|
|
||||||
////
|
////
|
||||||
|
|
||||||
|
|
||||||
class FlutterFlowCheckboxGroup extends StatefulWidget {
|
class FlutterFlowCheckboxGroup extends StatefulWidget {
|
||||||
const FlutterFlowCheckboxGroup({
|
const FlutterFlowCheckboxGroup({
|
||||||
super.key,
|
super.key,
|
||||||
|
@ -38,8 +37,7 @@ class FlutterFlowCheckboxGroup extends StatefulWidget {
|
||||||
final TextStyle? unselectedTextStyle;
|
final TextStyle? unselectedTextStyle;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<FlutterFlowCheckboxGroup> createState() =>
|
State<FlutterFlowCheckboxGroup> createState() => _FlutterFlowCheckboxGroupState();
|
||||||
_FlutterFlowCheckboxGroupState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FlutterFlowCheckboxGroupState extends State<FlutterFlowCheckboxGroup> {
|
class _FlutterFlowCheckboxGroupState extends State<FlutterFlowCheckboxGroup> {
|
||||||
|
@ -87,8 +85,7 @@ class _FlutterFlowCheckboxGroupState extends State<FlutterFlowCheckboxGroup> {
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final option = widget.options[index];
|
final option = widget.options[index];
|
||||||
final selected = selectedValues.contains(option);
|
final selected = selectedValues.contains(option);
|
||||||
final unselectedTextStyle =
|
final unselectedTextStyle = widget.unselectedTextStyle ?? widget.textStyle;
|
||||||
widget.unselectedTextStyle ?? widget.textStyle;
|
|
||||||
return Theme(
|
return Theme(
|
||||||
data: ThemeData(unselectedWidgetColor: widget.checkboxBorderColor),
|
data: ThemeData(unselectedWidgetColor: widget.checkboxBorderColor),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
@ -102,9 +99,7 @@ class _FlutterFlowCheckboxGroupState extends State<FlutterFlowCheckboxGroup> {
|
||||||
if (isSelected == null) {
|
if (isSelected == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
isSelected
|
isSelected ? checkboxValues.add(option) : checkboxValues.remove(option);
|
||||||
? checkboxValues.add(option)
|
|
||||||
: checkboxValues.remove(option);
|
|
||||||
widget.controller.value = List.from(checkboxValues);
|
widget.controller.value = List.from(checkboxValues);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
@ -112,8 +107,7 @@ class _FlutterFlowCheckboxGroupState extends State<FlutterFlowCheckboxGroup> {
|
||||||
activeColor: widget.activeColor,
|
activeColor: widget.activeColor,
|
||||||
checkColor: widget.checkColor,
|
checkColor: widget.checkColor,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius:
|
borderRadius: widget.checkboxBorderRadius ?? BorderRadius.zero,
|
||||||
widget.checkboxBorderRadius ?? BorderRadius.zero,
|
|
||||||
),
|
),
|
||||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
visualDensity: VisualDensity.compact,
|
visualDensity: VisualDensity.compact,
|
||||||
|
@ -123,8 +117,7 @@ class _FlutterFlowCheckboxGroupState extends State<FlutterFlowCheckboxGroup> {
|
||||||
padding: widget.labelPadding ?? EdgeInsets.zero,
|
padding: widget.labelPadding ?? EdgeInsets.zero,
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.options[index],
|
widget.options[index],
|
||||||
style:
|
style: selected ? widget.textStyle : unselectedTextStyle,
|
||||||
selected ? widget.textStyle : unselectedTextStyle,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'form_field_controller.dart';
|
import 'form_field_controller.dart';
|
||||||
|
|
||||||
|
|
||||||
class FlutterFlowDropDown<T> extends StatefulWidget {
|
class FlutterFlowDropDown<T> extends StatefulWidget {
|
||||||
const FlutterFlowDropDown({
|
const FlutterFlowDropDown({
|
||||||
super.key,
|
super.key,
|
||||||
|
@ -87,13 +86,10 @@ class FlutterFlowDropDown<T> extends StatefulWidget {
|
||||||
class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
||||||
bool get isMultiSelect => widget.isMultiSelect;
|
bool get isMultiSelect => widget.isMultiSelect;
|
||||||
FormFieldController<T?> get controller => widget.controller!;
|
FormFieldController<T?> get controller => widget.controller!;
|
||||||
FormFieldController<List<T>?> get multiSelectController =>
|
FormFieldController<List<T>?> get multiSelectController => widget.multiSelectController!;
|
||||||
widget.multiSelectController!;
|
|
||||||
|
|
||||||
T? get currentValue {
|
T? get currentValue {
|
||||||
final value = isMultiSelect
|
final value = isMultiSelect ? multiSelectController.value?.firstOrNull : controller.value;
|
||||||
? multiSelectController.value?.firstOrNull
|
|
||||||
: controller.value;
|
|
||||||
return widget.options.contains(value) ? value : null;
|
return widget.options.contains(value) ? value : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,17 +97,14 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
||||||
if (!isMultiSelect || multiSelectController.value == null) {
|
if (!isMultiSelect || multiSelectController.value == null) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return widget.options
|
return widget.options.toSet().intersection(multiSelectController.value!.toSet());
|
||||||
.toSet()
|
|
||||||
.intersection(multiSelectController.value!.toSet());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<T, String> get optionLabels => Map.fromEntries(
|
Map<T, String> get optionLabels => Map.fromEntries(
|
||||||
widget.options.asMap().entries.map(
|
widget.options.asMap().entries.map(
|
||||||
(option) => MapEntry(
|
(option) => MapEntry(
|
||||||
option.value,
|
option.value,
|
||||||
widget.optionLabels == null ||
|
widget.optionLabels == null || widget.optionLabels!.length < option.key + 1
|
||||||
widget.optionLabels!.length < option.key + 1
|
|
||||||
? option.value.toString()
|
? option.value.toString()
|
||||||
: widget.optionLabels![option.key],
|
: widget.optionLabels![option.key],
|
||||||
),
|
),
|
||||||
|
@ -130,8 +123,7 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (isMultiSelect) {
|
if (isMultiSelect) {
|
||||||
_listener =
|
_listener = () => widget.onMultiSelectChanged!(multiSelectController.value);
|
||||||
() => widget.onMultiSelectChanged!(multiSelectController.value);
|
|
||||||
multiSelectController.addListener(_listener);
|
multiSelectController.addListener(_listener);
|
||||||
} else {
|
} else {
|
||||||
_listener = () => widget.onChanged!(controller.value);
|
_listener = () => widget.onChanged!(controller.value);
|
||||||
|
@ -166,22 +158,16 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: _useDropdown2() ? EdgeInsets.zero : widget.margin,
|
padding: _useDropdown2() ? EdgeInsets.zero : widget.margin,
|
||||||
child: widget.hidesUnderline
|
child: widget.hidesUnderline ? DropdownButtonHideUnderline(child: dropdownWidget) : dropdownWidget,
|
||||||
? DropdownButtonHideUnderline(child: dropdownWidget)
|
|
||||||
: dropdownWidget,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _useDropdown2() =>
|
bool _useDropdown2() =>
|
||||||
widget.isMultiSelect ||
|
widget.isMultiSelect || widget.isSearchable || !widget.isOverButton || widget.maxHeight != null;
|
||||||
widget.isSearchable ||
|
|
||||||
!widget.isOverButton ||
|
|
||||||
widget.maxHeight != null;
|
|
||||||
|
|
||||||
Widget _buildDropdownWidget() =>
|
Widget _buildDropdownWidget() => _useDropdown2() ? _buildDropdown() : _buildLegacyDropdown();
|
||||||
_useDropdown2() ? _buildDropdown() : _buildLegacyDropdown();
|
|
||||||
|
|
||||||
Widget _buildLegacyDropdown() {
|
Widget _buildLegacyDropdown() {
|
||||||
return DropdownButtonFormField<T>(
|
return DropdownButtonFormField<T>(
|
||||||
|
@ -195,20 +181,14 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
||||||
dropdownColor: widget.fillColor,
|
dropdownColor: widget.fillColor,
|
||||||
focusColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: widget.labelText == null || widget.labelText!.isEmpty
|
labelText: widget.labelText == null || widget.labelText!.isEmpty ? null : widget.labelText,
|
||||||
? null
|
|
||||||
: widget.labelText,
|
|
||||||
labelStyle: widget.labelTextStyle,
|
labelStyle: widget.labelTextStyle,
|
||||||
border: widget.hidesUnderline
|
border: widget.hidesUnderline ? InputBorder.none : const UnderlineInputBorder(),
|
||||||
? InputBorder.none
|
|
||||||
: const UnderlineInputBorder(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Text? _createHintText() => widget.hintText != null
|
Text? _createHintText() => widget.hintText != null ? Text(widget.hintText!, style: widget.textStyle) : null;
|
||||||
? Text(widget.hintText!, style: widget.textStyle)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
List<DropdownMenuItem<T>> _createMenuItems() => widget.options
|
List<DropdownMenuItem<T>> _createMenuItems() => widget.options
|
||||||
.map(
|
.map(
|
||||||
|
@ -229,14 +209,11 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
child: StatefulBuilder(
|
child: StatefulBuilder(
|
||||||
builder: (context, menuSetState) {
|
builder: (context, menuSetState) {
|
||||||
final isSelected =
|
final isSelected = multiSelectController.value?.contains(item) ?? false;
|
||||||
multiSelectController.value?.contains(item) ?? false;
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
multiSelectController.value ??= [];
|
multiSelectController.value ??= [];
|
||||||
isSelected
|
isSelected ? multiSelectController.value!.remove(item) : multiSelectController.value!.add(item);
|
||||||
? multiSelectController.value!.remove(item)
|
|
||||||
: multiSelectController.value!.add(item);
|
|
||||||
multiSelectController.update();
|
multiSelectController.update();
|
||||||
// This rebuilds the StatefulWidget to update the button's text.
|
// This rebuilds the StatefulWidget to update the button's text.
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
@ -269,11 +246,9 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
Widget _buildDropdown() {
|
Widget _buildDropdown() {
|
||||||
final overlayColor = WidgetStateProperty.resolveWith<Color?>((states) =>
|
final overlayColor = WidgetStateProperty.resolveWith<Color?>(
|
||||||
states.contains(WidgetState.focused) ? Colors.transparent : null);
|
(states) => states.contains(WidgetState.focused) ? Colors.transparent : null);
|
||||||
final iconStyleData = widget.icon != null
|
final iconStyleData = widget.icon != null ? IconStyleData(icon: widget.icon!) : const IconStyleData();
|
||||||
? IconStyleData(icon: widget.icon!)
|
|
||||||
: const IconStyleData();
|
|
||||||
return DropdownButton2<T>(
|
return DropdownButton2<T>(
|
||||||
value: currentValue,
|
value: currentValue,
|
||||||
hint: _createHintText(),
|
hint: _createHintText(),
|
||||||
|
@ -299,19 +274,14 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
||||||
maxHeight: widget.maxHeight,
|
maxHeight: widget.maxHeight,
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
),
|
),
|
||||||
onChanged: widget.disabled
|
onChanged: widget.disabled ? null : (isMultiSelect ? (_) {} : (val) => widget.controller!.value = val),
|
||||||
? null
|
|
||||||
: (isMultiSelect ? (_) {} : (val) => widget.controller!.value = val),
|
|
||||||
isExpanded: true,
|
isExpanded: true,
|
||||||
selectedItemBuilder: (context) => widget.options
|
selectedItemBuilder: (context) => widget.options
|
||||||
.map((item) => Align(
|
.map((item) => Align(
|
||||||
alignment: AlignmentDirectional.centerStart,
|
alignment: AlignmentDirectional.centerStart,
|
||||||
child: Text(
|
child: Text(
|
||||||
isMultiSelect
|
isMultiSelect
|
||||||
? currentValues
|
? currentValues.where((v) => optionLabels.containsKey(v)).map((v) => optionLabels[v]).join(', ')
|
||||||
.where((v) => optionLabels.containsKey(v))
|
|
||||||
.map((v) => optionLabels[v])
|
|
||||||
.join(', ')
|
|
||||||
: optionLabels[item]!,
|
: optionLabels[item]!,
|
||||||
style: widget.textStyle,
|
style: widget.textStyle,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
@ -351,9 +321,7 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
searchMatchFn: (item, searchValue) {
|
searchMatchFn: (item, searchValue) {
|
||||||
return (optionLabels[item.value] ?? '')
|
return (optionLabels[item.value] ?? '').toLowerCase().contains(searchValue.toLowerCase());
|
||||||
.toLowerCase()
|
|
||||||
.contains(searchValue.toLowerCase());
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class FlutterFlowIconButton extends StatefulWidget {
|
class FlutterFlowIconButton extends StatefulWidget {
|
||||||
const FlutterFlowIconButton({
|
const FlutterFlowIconButton({
|
||||||
super.key,
|
super.key,
|
||||||
|
@ -92,12 +90,10 @@ class _FlutterFlowIconButtonState extends State<FlutterFlowIconButton> {
|
||||||
),
|
),
|
||||||
iconColor: WidgetStateProperty.resolveWith<Color?>(
|
iconColor: WidgetStateProperty.resolveWith<Color?>(
|
||||||
(states) {
|
(states) {
|
||||||
if (states.contains(WidgetState.disabled) &&
|
if (states.contains(WidgetState.disabled) && widget.disabledIconColor != null) {
|
||||||
widget.disabledIconColor != null) {
|
|
||||||
return widget.disabledIconColor;
|
return widget.disabledIconColor;
|
||||||
}
|
}
|
||||||
if (states.contains(WidgetState.hovered) &&
|
if (states.contains(WidgetState.hovered) && widget.hoverIconColor != null) {
|
||||||
widget.hoverIconColor != null) {
|
|
||||||
return widget.hoverIconColor;
|
return widget.hoverIconColor;
|
||||||
}
|
}
|
||||||
return iconColor;
|
return iconColor;
|
||||||
|
@ -105,12 +101,10 @@ class _FlutterFlowIconButtonState extends State<FlutterFlowIconButton> {
|
||||||
),
|
),
|
||||||
backgroundColor: WidgetStateProperty.resolveWith<Color?>(
|
backgroundColor: WidgetStateProperty.resolveWith<Color?>(
|
||||||
(states) {
|
(states) {
|
||||||
if (states.contains(WidgetState.disabled) &&
|
if (states.contains(WidgetState.disabled) && widget.disabledColor != null) {
|
||||||
widget.disabledColor != null) {
|
|
||||||
return widget.disabledColor;
|
return widget.disabledColor;
|
||||||
}
|
}
|
||||||
if (states.contains(WidgetState.hovered) &&
|
if (states.contains(WidgetState.hovered) && widget.hoverColor != null) {
|
||||||
widget.hoverColor != null) {
|
|
||||||
return widget.hoverColor;
|
return widget.hoverColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/scheduler.dart';
|
import 'package:flutter/scheduler.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
|
||||||
Widget wrapWithModel<T extends FlutterFlowModel>({
|
Widget wrapWithModel<T extends FlutterFlowModel>({
|
||||||
required T model,
|
required T model,
|
||||||
required Widget child,
|
required Widget child,
|
||||||
|
@ -112,8 +111,7 @@ class FlutterFlowDynamicModels<T extends FlutterFlowModel> {
|
||||||
}
|
}
|
||||||
|
|
||||||
S? getValueAtIndex<S>(int index, S? Function(T) getValue) {
|
S? getValueAtIndex<S>(int index, S? Function(T) getValue) {
|
||||||
final uniqueKey =
|
final uniqueKey = _childrenIndexes.entries.firstWhereOrNull((e) => e.value == index)?.key;
|
||||||
_childrenIndexes.entries.firstWhereOrNull((e) => e.value == index)?.key;
|
|
||||||
return getValueForKey(uniqueKey, getValue);
|
return getValueForKey(uniqueKey, getValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,6 +161,5 @@ T? _getDefaultValue<T>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
extension TextValidationExtensions on String? Function(BuildContext, String?)? {
|
extension TextValidationExtensions on String? Function(BuildContext, String?)? {
|
||||||
String? Function(String?)? asValidator(BuildContext context) =>
|
String? Function(String?)? asValidator(BuildContext context) => this != null ? (val) => this!(context, val) : null;
|
||||||
this != null ? (val) => this!(context, val) : null;
|
|
||||||
}
|
}
|
|
@ -13,6 +13,7 @@ enum DeviceSize {
|
||||||
tablet,
|
tablet,
|
||||||
desktop,
|
desktop,
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceSize getDeviceSize(BuildContext context) {
|
DeviceSize getDeviceSize(BuildContext context) {
|
||||||
final width = MediaQuery.sizeOf(context).width;
|
final width = MediaQuery.sizeOf(context).width;
|
||||||
if (width < 479) {
|
if (width < 479) {
|
||||||
|
@ -27,8 +28,7 @@ DeviceSize getDeviceSize(BuildContext context) {
|
||||||
abstract class FlutterFlowTheme {
|
abstract class FlutterFlowTheme {
|
||||||
static DeviceSize deviceSize = DeviceSize.mobile;
|
static DeviceSize deviceSize = DeviceSize.mobile;
|
||||||
|
|
||||||
static Future initialize() async =>
|
static Future initialize() async => _prefs = await SharedPreferences.getInstance();
|
||||||
_prefs = await SharedPreferences.getInstance();
|
|
||||||
static ThemeMode get themeMode {
|
static ThemeMode get themeMode {
|
||||||
final darkMode = _prefs?.getBool(kThemeModeKey);
|
final darkMode = _prefs?.getBool(kThemeModeKey);
|
||||||
return darkMode == null
|
return darkMode == null
|
||||||
|
@ -37,14 +37,12 @@ abstract class FlutterFlowTheme {
|
||||||
? ThemeMode.dark
|
? ThemeMode.dark
|
||||||
: ThemeMode.light;
|
: ThemeMode.light;
|
||||||
}
|
}
|
||||||
static void saveThemeMode(ThemeMode mode) => mode == ThemeMode.system
|
|
||||||
? _prefs?.remove(kThemeModeKey)
|
static void saveThemeMode(ThemeMode mode) =>
|
||||||
: _prefs?.setBool(kThemeModeKey, mode == ThemeMode.dark);
|
mode == ThemeMode.system ? _prefs?.remove(kThemeModeKey) : _prefs?.setBool(kThemeModeKey, mode == ThemeMode.dark);
|
||||||
static FlutterFlowTheme of(BuildContext context) {
|
static FlutterFlowTheme of(BuildContext context) {
|
||||||
deviceSize = getDeviceSize(context);
|
deviceSize = getDeviceSize(context);
|
||||||
return Theme.of(context).brightness == Brightness.dark
|
return Theme.of(context).brightness == Brightness.dark ? DarkModeTheme() : LightModeTheme();
|
||||||
? DarkModeTheme()
|
|
||||||
: LightModeTheme();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated('Use primary instead')
|
@Deprecated('Use primary instead')
|
||||||
|
@ -145,6 +143,7 @@ abstract class FlutterFlowTheme {
|
||||||
DeviceSize.desktop: DesktopTypography(this),
|
DeviceSize.desktop: DesktopTypography(this),
|
||||||
}[deviceSize]!;
|
}[deviceSize]!;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LightModeTheme extends FlutterFlowTheme {
|
class LightModeTheme extends FlutterFlowTheme {
|
||||||
@Deprecated('Use primary instead')
|
@Deprecated('Use primary instead')
|
||||||
Color get primaryColor => primary;
|
Color get primaryColor => primary;
|
||||||
|
@ -178,6 +177,7 @@ class LightModeTheme extends FlutterFlowTheme {
|
||||||
late Color customColor5 = const Color(0xFF979595);
|
late Color customColor5 = const Color(0xFF979595);
|
||||||
late Color customColor6 = const Color(0xFF525252);
|
late Color customColor6 = const Color(0xFF525252);
|
||||||
}
|
}
|
||||||
|
|
||||||
class DarkModeTheme extends FlutterFlowTheme {
|
class DarkModeTheme extends FlutterFlowTheme {
|
||||||
@Deprecated('Use primary instead')
|
@Deprecated('Use primary instead')
|
||||||
Color get primaryColor => primary;
|
Color get primaryColor => primary;
|
||||||
|
@ -244,6 +244,7 @@ abstract class Typography {
|
||||||
String get bodySmallFamily;
|
String get bodySmallFamily;
|
||||||
TextStyle get bodySmall;
|
TextStyle get bodySmall;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MobileTypography extends Typography {
|
class MobileTypography extends Typography {
|
||||||
MobileTypography(this.theme);
|
MobileTypography(this.theme);
|
||||||
|
|
||||||
|
@ -352,8 +353,8 @@ class MobileTypography extends Typography {
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
fontSize: 12.0,
|
fontSize: 12.0,
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class TabletTypography extends Typography {
|
class TabletTypography extends Typography {
|
||||||
TabletTypography(this.theme);
|
TabletTypography(this.theme);
|
||||||
final FlutterFlowTheme theme;
|
final FlutterFlowTheme theme;
|
||||||
|
@ -462,8 +463,8 @@ class TabletTypography extends Typography {
|
||||||
fontSize: 12.0,
|
fontSize: 12.0,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
class DesktopTypography extends Typography {
|
|
||||||
|
|
||||||
|
class DesktopTypography extends Typography {
|
||||||
DesktopTypography(this.theme);
|
DesktopTypography(this.theme);
|
||||||
final FlutterFlowTheme theme;
|
final FlutterFlowTheme theme;
|
||||||
String get displayLargeFamily => 'Nunito Sans';
|
String get displayLargeFamily => 'Nunito Sans';
|
||||||
|
|
|
@ -68,8 +68,7 @@ Theme wrapInMaterialDatePickerTheme(
|
||||||
required double iconSize,
|
required double iconSize,
|
||||||
}) {
|
}) {
|
||||||
final baseTheme = Theme.of(context);
|
final baseTheme = Theme.of(context);
|
||||||
final dateTimeMaterialStateForegroundColor =
|
final dateTimeMaterialStateForegroundColor = WidgetStateProperty.resolveWith((states) {
|
||||||
WidgetStateProperty.resolveWith((states) {
|
|
||||||
if (states.contains(WidgetState.disabled)) {
|
if (states.contains(WidgetState.disabled)) {
|
||||||
return pickerForegroundColor.withOpacity(0.60);
|
return pickerForegroundColor.withOpacity(0.60);
|
||||||
}
|
}
|
||||||
|
@ -82,8 +81,7 @@ Theme wrapInMaterialDatePickerTheme(
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
final dateTimeMaterialStateBackgroundColor =
|
final dateTimeMaterialStateBackgroundColor = WidgetStateProperty.resolveWith((states) {
|
||||||
WidgetStateProperty.resolveWith((states) {
|
|
||||||
if (states.contains(WidgetState.selected)) {
|
if (states.contains(WidgetState.selected)) {
|
||||||
return selectedDateTimeBackgroundColor;
|
return selectedDateTimeBackgroundColor;
|
||||||
}
|
}
|
||||||
|
@ -152,8 +150,7 @@ Theme wrapInMaterialDatePickerTheme(
|
||||||
if (states.contains(WidgetState.hovered)) {
|
if (states.contains(WidgetState.hovered)) {
|
||||||
return actionButtonForegroundColor.withOpacity(0.04);
|
return actionButtonForegroundColor.withOpacity(0.04);
|
||||||
}
|
}
|
||||||
if (states.contains(WidgetState.focused) ||
|
if (states.contains(WidgetState.focused) || states.contains(WidgetState.pressed)) {
|
||||||
states.contains(WidgetState.pressed)) {
|
|
||||||
return actionButtonForegroundColor.withOpacity(0.12);
|
return actionButtonForegroundColor.withOpacity(0.12);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -252,8 +249,7 @@ Theme wrapInMaterialTimePickerTheme(
|
||||||
if (states.contains(WidgetState.hovered)) {
|
if (states.contains(WidgetState.hovered)) {
|
||||||
return actionButtonForegroundColor.withOpacity(0.04);
|
return actionButtonForegroundColor.withOpacity(0.04);
|
||||||
}
|
}
|
||||||
if (states.contains(WidgetState.focused) ||
|
if (states.contains(WidgetState.focused) || states.contains(WidgetState.pressed)) {
|
||||||
states.contains(WidgetState.pressed)) {
|
|
||||||
return actionButtonForegroundColor.withOpacity(0.12);
|
return actionButtonForegroundColor.withOpacity(0.12);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -265,20 +261,14 @@ Theme wrapInMaterialTimePickerTheme(
|
||||||
hourMinuteTextColor: pickerForegroundColor,
|
hourMinuteTextColor: pickerForegroundColor,
|
||||||
dialHandColor: selectedDateTimeBackgroundColor,
|
dialHandColor: selectedDateTimeBackgroundColor,
|
||||||
dialTextColor: WidgetStateColor.resolveWith((states) =>
|
dialTextColor: WidgetStateColor.resolveWith((states) =>
|
||||||
states.contains(WidgetState.selected)
|
states.contains(WidgetState.selected) ? selectedDateTimeForegroundColor : pickerDialForegroundColor),
|
||||||
? selectedDateTimeForegroundColor
|
|
||||||
: pickerDialForegroundColor),
|
|
||||||
dayPeriodBorderSide: BorderSide(
|
dayPeriodBorderSide: BorderSide(
|
||||||
color: pickerForegroundColor,
|
color: pickerForegroundColor,
|
||||||
),
|
),
|
||||||
dayPeriodTextColor: WidgetStateColor.resolveWith((states) =>
|
dayPeriodTextColor: WidgetStateColor.resolveWith((states) =>
|
||||||
states.contains(WidgetState.selected)
|
states.contains(WidgetState.selected) ? selectedDateTimeForegroundColor : pickerForegroundColor),
|
||||||
? selectedDateTimeForegroundColor
|
dayPeriodColor: WidgetStateColor.resolveWith(
|
||||||
: pickerForegroundColor),
|
(states) => states.contains(WidgetState.selected) ? selectedDateTimeBackgroundColor : Colors.transparent),
|
||||||
dayPeriodColor: WidgetStateColor.resolveWith((states) =>
|
|
||||||
states.contains(WidgetState.selected)
|
|
||||||
? selectedDateTimeBackgroundColor
|
|
||||||
: Colors.transparent),
|
|
||||||
entryModeIconColor: pickerForegroundColor,
|
entryModeIconColor: pickerForegroundColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -361,8 +351,7 @@ String formatNumber(
|
||||||
break;
|
break;
|
||||||
case FormatType.custom:
|
case FormatType.custom:
|
||||||
final hasLocale = locale != null && locale.isNotEmpty;
|
final hasLocale = locale != null && locale.isNotEmpty;
|
||||||
formattedValue =
|
formattedValue = NumberFormat(format, hasLocale ? locale : null).format(value);
|
||||||
NumberFormat(format, hasLocale ? locale : null).format(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (formattedValue.isEmpty) {
|
if (formattedValue.isEmpty) {
|
||||||
|
@ -370,9 +359,7 @@ String formatNumber(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currency != null) {
|
if (currency != null) {
|
||||||
final currencySymbol = currency.isNotEmpty
|
final currencySymbol = currency.isNotEmpty ? currency : NumberFormat.simpleCurrency().format(0.0).substring(0, 1);
|
||||||
? currency
|
|
||||||
: NumberFormat.simpleCurrency().format(0.0).substring(0, 1);
|
|
||||||
formattedValue = '$currencySymbol$formattedValue';
|
formattedValue = '$currencySymbol$formattedValue';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -430,9 +417,7 @@ dynamic getJsonField(
|
||||||
}
|
}
|
||||||
final value = field.first.value;
|
final value = field.first.value;
|
||||||
if (isForList) {
|
if (isForList) {
|
||||||
return value is! Iterable
|
return value is! Iterable ? [value] : (value is List ? value : value.toList());
|
||||||
? [value]
|
|
||||||
: (value is List ? value : value.toList());
|
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -453,8 +438,7 @@ bool get isWeb => kIsWeb;
|
||||||
const kBreakpointSmall = 479.0;
|
const kBreakpointSmall = 479.0;
|
||||||
const kBreakpointMedium = 767.0;
|
const kBreakpointMedium = 767.0;
|
||||||
const kBreakpointLarge = 991.0;
|
const kBreakpointLarge = 991.0;
|
||||||
bool isMobileWidth(BuildContext context) =>
|
bool isMobileWidth(BuildContext context) => MediaQuery.sizeOf(context).width < kBreakpointSmall;
|
||||||
MediaQuery.sizeOf(context).width < kBreakpointSmall;
|
|
||||||
bool responsiveVisibility({
|
bool responsiveVisibility({
|
||||||
required BuildContext context,
|
required BuildContext context,
|
||||||
bool phone = true,
|
bool phone = true,
|
||||||
|
@ -487,28 +471,21 @@ extension FFTextEditingControllerExt on TextEditingController? {
|
||||||
}
|
}
|
||||||
|
|
||||||
extension IterableExt<T> on Iterable<T> {
|
extension IterableExt<T> on Iterable<T> {
|
||||||
List<T> sortedList<S extends Comparable>(
|
List<T> sortedList<S extends Comparable>({S Function(T)? keyOf, bool desc = false}) {
|
||||||
{S Function(T)? keyOf, bool desc = false}) {
|
final sortedAscending = toList()..sort(keyOf == null ? null : ((a, b) => keyOf(a).compareTo(keyOf(b))));
|
||||||
final sortedAscending = toList()
|
|
||||||
..sort(keyOf == null ? null : ((a, b) => keyOf(a).compareTo(keyOf(b))));
|
|
||||||
if (desc) {
|
if (desc) {
|
||||||
return sortedAscending.reversed.toList();
|
return sortedAscending.reversed.toList();
|
||||||
}
|
}
|
||||||
return sortedAscending;
|
return sortedAscending;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<S> mapIndexed<S>(S Function(int, T) func) => toList()
|
List<S> mapIndexed<S>(S Function(int, T) func) =>
|
||||||
.asMap()
|
toList().asMap().map((index, value) => MapEntry(index, func(index, value))).values.toList();
|
||||||
.map((index, value) => MapEntry(index, func(index, value)))
|
|
||||||
.values
|
|
||||||
.toList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setAppLanguage(BuildContext context, String language) =>
|
void setAppLanguage(BuildContext context, String language) => App.of(context).setLocale(language);
|
||||||
App.of(context).setLocale(language);
|
|
||||||
|
|
||||||
void setDarkModeSetting(BuildContext context, ThemeMode themeMode) =>
|
void setDarkModeSetting(BuildContext context, ThemeMode themeMode) => App.of(context).setThemeMode(themeMode);
|
||||||
App.of(context).setThemeMode(themeMode);
|
|
||||||
|
|
||||||
void showSnackbar(
|
void showSnackbar(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
|
@ -542,9 +519,7 @@ void showSnackbar(
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
duration: Duration(seconds: duration),
|
duration: Duration(seconds: duration),
|
||||||
backgroundColor: error
|
backgroundColor: error ? FlutterFlowTheme.of(context).error : FlutterFlowTheme.of(context).success,
|
||||||
? FlutterFlowTheme.of(context).error
|
|
||||||
: FlutterFlowTheme.of(context).success,
|
|
||||||
behavior: SnackBarBehavior.floating,
|
behavior: SnackBarBehavior.floating,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(30),
|
borderRadius: BorderRadius.circular(30),
|
||||||
|
@ -553,8 +528,7 @@ void showSnackbar(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showAlertDialog(BuildContext context, String title, String content,
|
void showAlertDialog(BuildContext context, String title, String content, Future<void> Function() action) {
|
||||||
Future<void> Function() action) {
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
@ -620,9 +594,7 @@ void showAlertDialog(BuildContext context, String title, String content,
|
||||||
|
|
||||||
extension FFStringExt on String {
|
extension FFStringExt on String {
|
||||||
String maybeHandleOverflow({int? maxChars, String replacement = ''}) =>
|
String maybeHandleOverflow({int? maxChars, String replacement = ''}) =>
|
||||||
maxChars != null && length > maxChars
|
maxChars != null && length > maxChars ? replaceRange(maxChars, null, replacement) : this;
|
||||||
? replaceRange(maxChars, null, replacement)
|
|
||||||
: this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ListFilterExt<T> on Iterable<T?> {
|
extension ListFilterExt<T> on Iterable<T?> {
|
||||||
|
@ -631,16 +603,13 @@ extension ListFilterExt<T> on Iterable<T?> {
|
||||||
|
|
||||||
extension MapFilterExtensions<T> on Map<String, T?> {
|
extension MapFilterExtensions<T> on Map<String, T?> {
|
||||||
Map<String, T> get withoutNulls => Map.fromEntries(
|
Map<String, T> get withoutNulls => Map.fromEntries(
|
||||||
entries
|
entries.where((e) => e.value != null).map((e) => MapEntry(e.key, e.value as T)),
|
||||||
.where((e) => e.value != null)
|
|
||||||
.map((e) => MapEntry(e.key, e.value as T)),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
extension MapListContainsExt on List<dynamic> {
|
extension MapListContainsExt on List<dynamic> {
|
||||||
bool containsMap(dynamic map) => map is Map
|
bool containsMap(dynamic map) =>
|
||||||
? any((e) => e is Map && const DeepCollectionEquality().equals(e, map))
|
map is Map ? any((e) => e is Map && const DeepCollectionEquality().equals(e, map)) : contains(map);
|
||||||
: contains(map);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ListDivideExt<T extends Widget> on Iterable<T> {
|
extension ListDivideExt<T extends Widget> on Iterable<T> {
|
||||||
|
@ -648,23 +617,17 @@ extension ListDivideExt<T extends Widget> on Iterable<T> {
|
||||||
|
|
||||||
List<Widget> divide(Widget t, {bool Function(int)? filterFn}) => isEmpty
|
List<Widget> divide(Widget t, {bool Function(int)? filterFn}) => isEmpty
|
||||||
? []
|
? []
|
||||||
: (enumerate
|
: (enumerate.map((e) => [e.value, if (filterFn == null || filterFn(e.key)) t]).expand((i) => i).toList()
|
||||||
.map((e) => [e.value, if (filterFn == null || filterFn(e.key)) t])
|
|
||||||
.expand((i) => i)
|
|
||||||
.toList()
|
|
||||||
..removeLast());
|
..removeLast());
|
||||||
|
|
||||||
List<Widget> around(Widget t) => addToStart(t).addToEnd(t);
|
List<Widget> around(Widget t) => addToStart(t).addToEnd(t);
|
||||||
|
|
||||||
List<Widget> addToStart(Widget t) =>
|
List<Widget> addToStart(Widget t) => enumerate.map((e) => e.value).toList()..insert(0, t);
|
||||||
enumerate.map((e) => e.value).toList()..insert(0, t);
|
|
||||||
|
|
||||||
List<Widget> addToEnd(Widget t) =>
|
List<Widget> addToEnd(Widget t) => enumerate.map((e) => e.value).toList()..add(t);
|
||||||
enumerate.map((e) => e.value).toList()..add(t);
|
|
||||||
|
|
||||||
List<Padding> paddingTopEach(double val) =>
|
List<Padding> paddingTopEach(double val) =>
|
||||||
map((w) => Padding(padding: EdgeInsets.only(top: val), child: w))
|
map((w) => Padding(padding: EdgeInsets.only(top: val), child: w)).toList();
|
||||||
.toList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension StatefulWidgetExtensions on State<StatefulWidget> {
|
extension StatefulWidgetExtensions on State<StatefulWidget> {
|
||||||
|
|
|
@ -2,7 +2,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:auto_size_text/auto_size_text.dart';
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
|
|
||||||
|
|
||||||
class FFButtonOptions {
|
class FFButtonOptions {
|
||||||
const FFButtonOptions({
|
const FFButtonOptions({
|
||||||
this.textAlign,
|
this.textAlign,
|
||||||
|
@ -75,16 +74,13 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
||||||
bool loading = false;
|
bool loading = false;
|
||||||
|
|
||||||
int get maxLines => widget.options.maxLines ?? 1;
|
int get maxLines => widget.options.maxLines ?? 1;
|
||||||
String? get text =>
|
String? get text => widget.options.textStyle?.fontSize == 0 ? null : widget.text;
|
||||||
widget.options.textStyle?.fontSize == 0 ? null : widget.text;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Widget textWidget = loading
|
Widget textWidget = loading
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
width: widget.options.width == null
|
width: widget.options.width == null ? _getTextWidth(text, widget.options.textStyle, maxLines) : null,
|
||||||
? _getTextWidth(text, widget.options.textStyle, maxLines)
|
|
||||||
: null,
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 23,
|
width: 23,
|
||||||
|
@ -99,8 +95,7 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
||||||
)
|
)
|
||||||
: AutoSizeText(
|
: AutoSizeText(
|
||||||
text ?? '',
|
text ?? '',
|
||||||
style:
|
style: text == null ? null : widget.options.textStyle?.withoutColor(),
|
||||||
text == null ? null : widget.options.textStyle?.withoutColor(),
|
|
||||||
textAlign: widget.options.textAlign,
|
textAlign: widget.options.textAlign,
|
||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
@ -127,29 +122,24 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
||||||
ButtonStyle style = ButtonStyle(
|
ButtonStyle style = ButtonStyle(
|
||||||
shape: WidgetStateProperty.resolveWith<OutlinedBorder>(
|
shape: WidgetStateProperty.resolveWith<OutlinedBorder>(
|
||||||
(states) {
|
(states) {
|
||||||
if (states.contains(WidgetState.hovered) &&
|
if (states.contains(WidgetState.hovered) && widget.options.hoverBorderSide != null) {
|
||||||
widget.options.hoverBorderSide != null) {
|
|
||||||
return RoundedRectangleBorder(
|
return RoundedRectangleBorder(
|
||||||
borderRadius:
|
borderRadius: widget.options.borderRadius ?? BorderRadius.circular(8),
|
||||||
widget.options.borderRadius ?? BorderRadius.circular(8),
|
|
||||||
side: widget.options.hoverBorderSide!,
|
side: widget.options.hoverBorderSide!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return RoundedRectangleBorder(
|
return RoundedRectangleBorder(
|
||||||
borderRadius:
|
borderRadius: widget.options.borderRadius ?? BorderRadius.circular(8),
|
||||||
widget.options.borderRadius ?? BorderRadius.circular(8),
|
|
||||||
side: widget.options.borderSide ?? BorderSide.none,
|
side: widget.options.borderSide ?? BorderSide.none,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
foregroundColor: WidgetStateProperty.resolveWith<Color?>(
|
foregroundColor: WidgetStateProperty.resolveWith<Color?>(
|
||||||
(states) {
|
(states) {
|
||||||
if (states.contains(WidgetState.disabled) &&
|
if (states.contains(WidgetState.disabled) && widget.options.disabledTextColor != null) {
|
||||||
widget.options.disabledTextColor != null) {
|
|
||||||
return widget.options.disabledTextColor;
|
return widget.options.disabledTextColor;
|
||||||
}
|
}
|
||||||
if (states.contains(WidgetState.hovered) &&
|
if (states.contains(WidgetState.hovered) && widget.options.hoverTextColor != null) {
|
||||||
widget.options.hoverTextColor != null) {
|
|
||||||
return widget.options.hoverTextColor;
|
return widget.options.hoverTextColor;
|
||||||
}
|
}
|
||||||
return widget.options.textStyle?.color ?? Colors.white;
|
return widget.options.textStyle?.color ?? Colors.white;
|
||||||
|
@ -157,12 +147,10 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
||||||
),
|
),
|
||||||
backgroundColor: WidgetStateProperty.resolveWith<Color?>(
|
backgroundColor: WidgetStateProperty.resolveWith<Color?>(
|
||||||
(states) {
|
(states) {
|
||||||
if (states.contains(WidgetState.disabled) &&
|
if (states.contains(WidgetState.disabled) && widget.options.disabledColor != null) {
|
||||||
widget.options.disabledColor != null) {
|
|
||||||
return widget.options.disabledColor;
|
return widget.options.disabledColor;
|
||||||
}
|
}
|
||||||
if (states.contains(WidgetState.hovered) &&
|
if (states.contains(WidgetState.hovered) && widget.options.hoverColor != null) {
|
||||||
widget.options.hoverColor != null) {
|
|
||||||
return widget.options.hoverColor;
|
return widget.options.hoverColor;
|
||||||
}
|
}
|
||||||
return widget.options.color;
|
return widget.options.color;
|
||||||
|
@ -174,12 +162,11 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
||||||
}
|
}
|
||||||
return widget.options.hoverColor == null ? null : Colors.transparent;
|
return widget.options.hoverColor == null ? null : Colors.transparent;
|
||||||
}),
|
}),
|
||||||
padding: WidgetStateProperty.all(widget.options.padding ??
|
padding: WidgetStateProperty.all(
|
||||||
const EdgeInsets.symmetric(horizontal: 12.0, vertical: 4.0)),
|
widget.options.padding ?? const EdgeInsets.symmetric(horizontal: 12.0, vertical: 4.0)),
|
||||||
elevation: WidgetStateProperty.resolveWith<double?>(
|
elevation: WidgetStateProperty.resolveWith<double?>(
|
||||||
(states) {
|
(states) {
|
||||||
if (states.contains(WidgetState.hovered) &&
|
if (states.contains(WidgetState.hovered) && widget.options.hoverElevation != null) {
|
||||||
widget.options.hoverElevation != null) {
|
|
||||||
return widget.options.hoverElevation!;
|
return widget.options.hoverElevation!;
|
||||||
}
|
}
|
||||||
return widget.options.elevation ?? 2.0;
|
return widget.options.elevation ?? 2.0;
|
||||||
|
@ -203,8 +190,7 @@ class _FFButtonWidgetState extends State<FFButtonWidget> {
|
||||||
border: Border.fromBorderSide(
|
border: Border.fromBorderSide(
|
||||||
widget.options.borderSide ?? BorderSide.none,
|
widget.options.borderSide ?? BorderSide.none,
|
||||||
),
|
),
|
||||||
borderRadius:
|
borderRadius: widget.options.borderRadius ?? BorderRadius.circular(8),
|
||||||
widget.options.borderRadius ?? BorderRadius.circular(8),
|
|
||||||
),
|
),
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
splashRadius: 1.0,
|
splashRadius: 1.0,
|
||||||
|
@ -277,8 +263,7 @@ extension _WithoutColorExtension on TextStyle {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Slightly hacky method of getting the layout width of the provided text.
|
// Slightly hacky method of getting the layout width of the provided text.
|
||||||
double? _getTextWidth(String? text, TextStyle? style, int maxLines) =>
|
double? _getTextWidth(String? text, TextStyle? style, int maxLines) => text != null
|
||||||
text != null
|
|
||||||
? (TextPainter(
|
? (TextPainter(
|
||||||
text: TextSpan(text: text, style: style),
|
text: TextSpan(text: text, style: style),
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
|
|
||||||
class FormFieldController<T> extends ValueNotifier<T?> {
|
class FormFieldController<T> extends ValueNotifier<T?> {
|
||||||
FormFieldController(this.initialValue) : super(initialValue);
|
FormFieldController(this.initialValue) : super(initialValue);
|
||||||
|
|
||||||
|
@ -16,8 +15,7 @@ class FormFieldController<T> extends ValueNotifier<T?> {
|
||||||
class FormListFieldController<T> extends FormFieldController<List<T>> {
|
class FormListFieldController<T> extends FormFieldController<List<T>> {
|
||||||
final List<T>? _initialListValue;
|
final List<T>? _initialListValue;
|
||||||
|
|
||||||
FormListFieldController(super.initialValue)
|
FormListFieldController(super.initialValue) : _initialListValue = List<T>.from(initialValue ?? []);
|
||||||
: _initialListValue = List<T>.from(initialValue ?? []);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void reset() => value = List<T>.from(_initialListValue ?? []);
|
void reset() => value = List<T>.from(_initialListValue ?? []);
|
||||||
|
|
|
@ -9,16 +9,13 @@ class FFLocalizations {
|
||||||
|
|
||||||
final Locale locale;
|
final Locale locale;
|
||||||
|
|
||||||
static FFLocalizations of(BuildContext context) =>
|
static FFLocalizations of(BuildContext context) => Localizations.of<FFLocalizations>(context, FFLocalizations)!;
|
||||||
Localizations.of<FFLocalizations>(context, FFLocalizations)!;
|
|
||||||
|
|
||||||
static List<String> languages() => ['pt', 'en'];
|
static List<String> languages() => ['pt', 'en'];
|
||||||
|
|
||||||
static late SharedPreferences _prefs;
|
static late SharedPreferences _prefs;
|
||||||
static Future initialize() async =>
|
static Future initialize() async => _prefs = await SharedPreferences.getInstance();
|
||||||
_prefs = await SharedPreferences.getInstance();
|
static Future storeLocale(String locale) => _prefs.setString(_kLocaleStorageKey, locale);
|
||||||
static Future storeLocale(String locale) =>
|
|
||||||
_prefs.setString(_kLocaleStorageKey, locale);
|
|
||||||
static Locale? getStoredLocale() {
|
static Locale? getStoredLocale() {
|
||||||
final locale = _prefs.getString(_kLocaleStorageKey);
|
final locale = _prefs.getString(_kLocaleStorageKey);
|
||||||
return locale != null && locale.isNotEmpty ? createLocale(locale) : null;
|
return locale != null && locale.isNotEmpty ? createLocale(locale) : null;
|
||||||
|
@ -26,15 +23,10 @@ class FFLocalizations {
|
||||||
|
|
||||||
String get languageCode => locale.toString();
|
String get languageCode => locale.toString();
|
||||||
String? get languageShortCode =>
|
String? get languageShortCode =>
|
||||||
_languagesWithShortCode.contains(locale.toString())
|
_languagesWithShortCode.contains(locale.toString()) ? '${locale.toString()}_short' : null;
|
||||||
? '${locale.toString()}_short'
|
int get languageIndex => languages().contains(languageCode) ? languages().indexOf(languageCode) : 0;
|
||||||
: null;
|
|
||||||
int get languageIndex => languages().contains(languageCode)
|
|
||||||
? languages().indexOf(languageCode)
|
|
||||||
: 0;
|
|
||||||
|
|
||||||
String getText(String key) =>
|
String getText(String key) => (kTranslationsMap[key] ?? {})[locale.toString()] ?? '';
|
||||||
(kTranslationsMap[key] ?? {})[locale.toString()] ?? '';
|
|
||||||
|
|
||||||
String getVariableText({
|
String getVariableText({
|
||||||
String? ptText = '',
|
String? ptText = '',
|
||||||
|
@ -83,15 +75,12 @@ class FFLocalizationsDelegate extends LocalizationsDelegate<FFLocalizations> {
|
||||||
bool isSupported(Locale locale) {
|
bool isSupported(Locale locale) {
|
||||||
final language = locale.toString();
|
final language = locale.toString();
|
||||||
return FFLocalizations.languages().contains(
|
return FFLocalizations.languages().contains(
|
||||||
language.endsWith('_')
|
language.endsWith('_') ? language.substring(0, language.length - 1) : language,
|
||||||
? language.substring(0, language.length - 1)
|
|
||||||
: language,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<FFLocalizations> load(Locale locale) =>
|
Future<FFLocalizations> load(Locale locale) => SynchronousFuture<FFLocalizations>(FFLocalizations(locale));
|
||||||
SynchronousFuture<FFLocalizations>(FFLocalizations(locale));
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool shouldReload(FFLocalizationsDelegate old) => false;
|
bool shouldReload(FFLocalizationsDelegate old) => false;
|
||||||
|
@ -1062,10 +1051,8 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'en': 'FORGOT YOUR PASSWORD?',
|
'en': 'FORGOT YOUR PASSWORD?',
|
||||||
},
|
},
|
||||||
'wu2f7yzo': {
|
'wu2f7yzo': {
|
||||||
'pt':
|
'pt': 'Não se preucupe nós vamos te ajudar, digite o email cadastrado no aplicativo e clique em enviar.',
|
||||||
'Não se preucupe nós vamos te ajudar, digite o email cadastrado no aplicativo e clique em enviar.',
|
'en': 'Don\'t worry, we will help you, enter the email registered in the application and click send.',
|
||||||
'en':
|
|
||||||
'Don\'t worry, we will help you, enter the email registered in the application and click send.',
|
|
||||||
},
|
},
|
||||||
'mtz8l7ft': {
|
'mtz8l7ft': {
|
||||||
'pt': 'E-mail',
|
'pt': 'E-mail',
|
||||||
|
@ -1180,10 +1167,8 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'en': 'ENTER YOUR PASSWORD',
|
'en': 'ENTER YOUR PASSWORD',
|
||||||
},
|
},
|
||||||
'ujodm2ci': {
|
'ujodm2ci': {
|
||||||
'pt':
|
'pt': 'Para gerar o QR Code digite a senha cadastrada no aplicativo e clique em enviar.',
|
||||||
'Para gerar o QR Code digite a senha cadastrada no aplicativo e clique em enviar.',
|
'en': 'To generate the QR Code, enter the password registered in the application and click send.',
|
||||||
'en':
|
|
||||||
'To generate the QR Code, enter the password registered in the application and click send.',
|
|
||||||
},
|
},
|
||||||
'rfqrdet7': {
|
'rfqrdet7': {
|
||||||
'pt': 'Senha',
|
'pt': 'Senha',
|
||||||
|
|
|
@ -12,8 +12,7 @@ class KeepAliveWidgetWrapper extends StatefulWidget {
|
||||||
State<KeepAliveWidgetWrapper> createState() => _KeepAliveWidgetWrapperState();
|
State<KeepAliveWidgetWrapper> createState() => _KeepAliveWidgetWrapperState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _KeepAliveWidgetWrapperState extends State<KeepAliveWidgetWrapper>
|
class _KeepAliveWidgetWrapperState extends State<KeepAliveWidgetWrapper> with AutomaticKeepAliveClientMixin {
|
||||||
with AutomaticKeepAliveClientMixin {
|
|
||||||
@override
|
@override
|
||||||
bool get wantKeepAlive => true;
|
bool get wantKeepAlive => true;
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,5 @@ class LatLng {
|
||||||
int get hashCode => latitude.hashCode + longitude.hashCode;
|
int get hashCode => latitude.hashCode + longitude.hashCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(other) =>
|
bool operator ==(other) => other is LatLng && latitude == other.latitude && longitude == other.longitude;
|
||||||
other is LatLng &&
|
|
||||||
latitude == other.latitude &&
|
|
||||||
longitude == other.longitude;
|
|
||||||
}
|
}
|
|
@ -27,7 +27,6 @@ export 'serialization_util.dart';
|
||||||
|
|
||||||
const kTransitionInfoKey = '__transition_info__';
|
const kTransitionInfoKey = '__transition_info__';
|
||||||
|
|
||||||
|
|
||||||
class AppStateNotifier extends ChangeNotifier {
|
class AppStateNotifier extends ChangeNotifier {
|
||||||
AppStateNotifier._();
|
AppStateNotifier._();
|
||||||
|
|
||||||
|
@ -111,17 +110,13 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
|
||||||
email: email,
|
email: email,
|
||||||
token: token,
|
token: token,
|
||||||
);
|
);
|
||||||
}
|
}),
|
||||||
),
|
|
||||||
FFRoute(
|
FFRoute(
|
||||||
name: 'homePage',
|
name: 'homePage',
|
||||||
path: '/homePage',
|
path: '/homePage',
|
||||||
builder: (context, params) => HomePageWidget(key: UniqueKey()),
|
builder: (context, params) => HomePageWidget(key: UniqueKey()),
|
||||||
),
|
),
|
||||||
FFRoute(
|
FFRoute(name: 'receptionPage', path: '/receptionPage', builder: (context, params) => const ReceptionPageWidget()),
|
||||||
name: 'receptionPage',
|
|
||||||
path: '/receptionPage',
|
|
||||||
builder: (context, params) => const ReceptionPageWidget()),
|
|
||||||
FFRoute(
|
FFRoute(
|
||||||
name: 'messageHistoryPage',
|
name: 'messageHistoryPage',
|
||||||
path: '/messageHistoryPage',
|
path: '/messageHistoryPage',
|
||||||
|
@ -236,11 +231,10 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
|
||||||
|
|
||||||
extension NavParamExtensions on Map<String, String?> {
|
extension NavParamExtensions on Map<String, String?> {
|
||||||
Map<String, String> get withoutNulls => Map.fromEntries(
|
Map<String, String> get withoutNulls => Map.fromEntries(
|
||||||
entries
|
entries.where((e) => e.value != null).map((e) => MapEntry(e.key, e.value!)),
|
||||||
.where((e) => e.value != null)
|
|
||||||
.map((e) => MapEntry(e.key, e.value!)),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
extension NavigationExtensions on BuildContext {
|
extension NavigationExtensions on BuildContext {
|
||||||
void safePop() {
|
void safePop() {
|
||||||
// If there is only one route on the stack, navigate to the initial
|
// If there is only one route on the stack, navigate to the initial
|
||||||
|
@ -252,9 +246,9 @@ extension NavigationExtensions on BuildContext {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension _GoRouterStateExtensions on GoRouterState {
|
extension _GoRouterStateExtensions on GoRouterState {
|
||||||
Map<String, dynamic> get extraMap =>
|
Map<String, dynamic> get extraMap => extra != null ? extra as Map<String, dynamic> : {};
|
||||||
extra != null ? extra as Map<String, dynamic> : {};
|
|
||||||
Map<String, dynamic> get allParams => <String, dynamic>{}
|
Map<String, dynamic> get allParams => <String, dynamic>{}
|
||||||
..addAll(pathParameters)
|
..addAll(pathParameters)
|
||||||
..addAll(uri.queryParameters)
|
..addAll(uri.queryParameters)
|
||||||
|
@ -263,12 +257,12 @@ extension _GoRouterStateExtensions on GoRouterState {
|
||||||
? extraMap[kTransitionInfoKey] as TransitionInfo
|
? extraMap[kTransitionInfoKey] as TransitionInfo
|
||||||
: TransitionInfo.appDefault();
|
: TransitionInfo.appDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
extension GoRouterLocationExtension on GoRouter {
|
extension GoRouterLocationExtension on GoRouter {
|
||||||
String getCurrentLocation() {
|
String getCurrentLocation() {
|
||||||
final RouteMatch lastMatch = routerDelegate.currentConfiguration.last;
|
final RouteMatch lastMatch = routerDelegate.currentConfiguration.last;
|
||||||
final RouteMatchList matchList = lastMatch is ImperativeRouteMatch
|
final RouteMatchList matchList =
|
||||||
? lastMatch.matches
|
lastMatch is ImperativeRouteMatch ? lastMatch.matches : routerDelegate.currentConfiguration;
|
||||||
: routerDelegate.currentConfiguration;
|
|
||||||
return matchList.uri.toString();
|
return matchList.uri.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -284,17 +278,13 @@ class FFParameters {
|
||||||
// Parameters are empty if the params map is empty or if the only parameter
|
// Parameters are empty if the params map is empty or if the only parameter
|
||||||
// present is the special extra parameter reserved for the transition info.
|
// present is the special extra parameter reserved for the transition info.
|
||||||
bool get isEmpty =>
|
bool get isEmpty =>
|
||||||
state.allParams.isEmpty ||
|
state.allParams.isEmpty || (state.allParams.length == 1 && state.extraMap.containsKey(kTransitionInfoKey));
|
||||||
(state.allParams.length == 1 &&
|
bool isAsyncParam(MapEntry<String, dynamic> param) => asyncParams.containsKey(param.key) && param.value is String;
|
||||||
state.extraMap.containsKey(kTransitionInfoKey));
|
|
||||||
bool isAsyncParam(MapEntry<String, dynamic> param) =>
|
|
||||||
asyncParams.containsKey(param.key) && param.value is String;
|
|
||||||
bool get hasFutures => state.allParams.entries.any(isAsyncParam);
|
bool get hasFutures => state.allParams.entries.any(isAsyncParam);
|
||||||
Future<bool> completeFutures() => Future.wait(
|
Future<bool> completeFutures() => Future.wait(
|
||||||
state.allParams.entries.where(isAsyncParam).map(
|
state.allParams.entries.where(isAsyncParam).map(
|
||||||
(param) async {
|
(param) async {
|
||||||
final doc = await asyncParams[param.key]!(param.value)
|
final doc = await asyncParams[param.key]!(param.value).onError((_, __) => null);
|
||||||
.onError((_, __) => null);
|
|
||||||
if (doc != null) {
|
if (doc != null) {
|
||||||
futureParamValues[param.key] = doc;
|
futureParamValues[param.key] = doc;
|
||||||
return true;
|
return true;
|
||||||
|
@ -330,6 +320,7 @@ class FFParameters {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FFRoute {
|
class FFRoute {
|
||||||
const FFRoute({
|
const FFRoute({
|
||||||
required this.name,
|
required this.name,
|
||||||
|
@ -367,9 +358,7 @@ class FFRoute {
|
||||||
key: state.pageKey,
|
key: state.pageKey,
|
||||||
child: child,
|
child: child,
|
||||||
transitionDuration: transitionInfo.duration,
|
transitionDuration: transitionInfo.duration,
|
||||||
transitionsBuilder:
|
transitionsBuilder: (context, animation, secondaryAnimation, child) => PageTransition(
|
||||||
(context, animation, secondaryAnimation, child) =>
|
|
||||||
PageTransition(
|
|
||||||
type: transitionInfo.transitionType,
|
type: transitionInfo.transitionType,
|
||||||
duration: transitionInfo.duration,
|
duration: transitionInfo.duration,
|
||||||
reverseDuration: transitionInfo.duration,
|
reverseDuration: transitionInfo.duration,
|
||||||
|
@ -387,6 +376,7 @@ class FFRoute {
|
||||||
routes: routes,
|
routes: routes,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
class TransitionInfo {
|
class TransitionInfo {
|
||||||
const TransitionInfo({
|
const TransitionInfo({
|
||||||
required this.hasTransition,
|
required this.hasTransition,
|
||||||
|
@ -400,9 +390,9 @@ class TransitionInfo {
|
||||||
final Duration duration;
|
final Duration duration;
|
||||||
final Alignment? alignment;
|
final Alignment? alignment;
|
||||||
|
|
||||||
static TransitionInfo appDefault() =>
|
static TransitionInfo appDefault() => const TransitionInfo(hasTransition: false);
|
||||||
const TransitionInfo(hasTransition: false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class RootPageContext {
|
class RootPageContext {
|
||||||
const RootPageContext(this.isRootPage, [this.errorRoute]);
|
const RootPageContext(this.isRootPage, [this.errorRoute]);
|
||||||
final bool isRootPage;
|
final bool isRootPage;
|
||||||
|
@ -412,13 +402,11 @@ class RootPageContext {
|
||||||
final rootPageContext = context.read<RootPageContext?>();
|
final rootPageContext = context.read<RootPageContext?>();
|
||||||
final isRootPage = rootPageContext?.isRootPage ?? false;
|
final isRootPage = rootPageContext?.isRootPage ?? false;
|
||||||
final location = GoRouterState.of(context).uri.toString();
|
final location = GoRouterState.of(context).uri.toString();
|
||||||
return isRootPage &&
|
return isRootPage && location != '/' && location != rootPageContext?.errorRoute;
|
||||||
location != '/' &&
|
|
||||||
location != rootPageContext?.errorRoute;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Widget wrap(Widget child, {String? errorRoute}) => Provider.value(
|
static Widget wrap(Widget child, {String? errorRoute}) => Provider.value(
|
||||||
value: RootPageContext(true, errorRoute),
|
value: RootPageContext(true, errorRoute),
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,7 @@ String placeToString(FFPlace place) => jsonEncode({
|
||||||
'zipCode': place.zipCode,
|
'zipCode': place.zipCode,
|
||||||
});
|
});
|
||||||
|
|
||||||
String uploadedFileToString(FFUploadedFile uploadedFile) =>
|
String uploadedFileToString(FFUploadedFile uploadedFile) => uploadedFile.serialize();
|
||||||
uploadedFile.serialize();
|
|
||||||
|
|
||||||
String? serializeParam(
|
String? serializeParam(
|
||||||
dynamic param,
|
dynamic param,
|
||||||
|
@ -137,8 +136,7 @@ FFPlace placeFromString(String placeStr) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
FFUploadedFile uploadedFileFromString(String uploadedFileStr) =>
|
FFUploadedFile uploadedFileFromString(String uploadedFileStr) => FFUploadedFile.deserialize(uploadedFileStr);
|
||||||
FFUploadedFile.deserialize(uploadedFileStr);
|
|
||||||
|
|
||||||
enum ParamType {
|
enum ParamType {
|
||||||
int,
|
int,
|
||||||
|
@ -196,9 +194,7 @@ dynamic deserializeParam<T>(
|
||||||
return param == 'true';
|
return param == 'true';
|
||||||
case ParamType.DateTime:
|
case ParamType.DateTime:
|
||||||
final milliseconds = int.tryParse(param);
|
final milliseconds = int.tryParse(param);
|
||||||
return milliseconds != null
|
return milliseconds != null ? DateTime.fromMillisecondsSinceEpoch(milliseconds) : null;
|
||||||
? DateTime.fromMillisecondsSinceEpoch(milliseconds)
|
|
||||||
: null;
|
|
||||||
case ParamType.DateTimeRange:
|
case ParamType.DateTimeRange:
|
||||||
return dateTimeRangeFromString(param);
|
return dateTimeRangeFromString(param);
|
||||||
case ParamType.LatLng:
|
case ParamType.LatLng:
|
||||||
|
|
|
@ -13,5 +13,4 @@ Future<bool> getPermissionStatus(Permission setting) async {
|
||||||
return kPermissionStateToBool[status]!;
|
return kPermissionStateToBool[status]!;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> requestPermission(Permission setting) async =>
|
Future<void> requestPermission(Permission setting) async => await setting.request();
|
||||||
await setting.request();
|
|
||||||
|
|
|
@ -29,16 +29,14 @@ String randomString(
|
||||||
if (digits) {
|
if (digits) {
|
||||||
chars += '0123456789';
|
chars += '0123456789';
|
||||||
}
|
}
|
||||||
return List.generate(randomInteger(minLength, maxLength),
|
return List.generate(randomInteger(minLength, maxLength), (index) => chars[_random.nextInt(chars.length)]).join();
|
||||||
(index) => chars[_random.nextInt(chars.length)]).join();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Random date between 1970 and 2025.
|
// Random date between 1970 and 2025.
|
||||||
DateTime randomDate() {
|
DateTime randomDate() {
|
||||||
// Random max must be in range 0 < max <= 2^32.
|
// Random max must be in range 0 < max <= 2^32.
|
||||||
// So we have to generate the time in seconds and then convert to milliseconds.
|
// So we have to generate the time in seconds and then convert to milliseconds.
|
||||||
return DateTime.fromMillisecondsSinceEpoch(
|
return DateTime.fromMillisecondsSinceEpoch(randomInteger(0, 1735689600) * 1000);
|
||||||
randomInteger(0, 1735689600) * 1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String randomImageUrl(int width, int height) {
|
String randomImageUrl(int width, int height) {
|
||||||
|
@ -46,6 +44,5 @@ String randomImageUrl(int width, int height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Color randomColor() {
|
Color randomColor() {
|
||||||
return Color.fromARGB(
|
return Color.fromARGB(255, _random.nextInt(255), _random.nextInt(255), _random.nextInt(255));
|
||||||
255, _random.nextInt(255), _random.nextInt(255), _random.nextInt(255));
|
|
||||||
}
|
}
|
|
@ -24,8 +24,7 @@ class FutureRequestManager<T> {
|
||||||
}
|
}
|
||||||
// Remove the first cached result if we have reached the specified limit,
|
// Remove the first cached result if we have reached the specified limit,
|
||||||
// since we will be adding another.
|
// since we will be adding another.
|
||||||
if (!_requests.containsKey(uniqueQueryKey) &&
|
if (!_requests.containsKey(uniqueQueryKey) && _requests.length >= cacheLimit) {
|
||||||
_requests.length >= cacheLimit) {
|
|
||||||
_requests.remove(_requests.keys.first);
|
_requests.remove(_requests.keys.first);
|
||||||
}
|
}
|
||||||
// Return the cached query result or set it to the new value.
|
// Return the cached query result or set it to the new value.
|
||||||
|
@ -69,9 +68,8 @@ class StreamRequestManager<T> {
|
||||||
|
|
||||||
// Create a subscription that stores the latest result in the behavior subject.
|
// Create a subscription that stores the latest result in the behavior subject.
|
||||||
final streamSubject = BehaviorSubject<T>();
|
final streamSubject = BehaviorSubject<T>();
|
||||||
_requestSubscriptions[uniqueQueryKey] = requestFn()
|
_requestSubscriptions[uniqueQueryKey] =
|
||||||
.asBroadcastStream()
|
requestFn().asBroadcastStream().listen((result) => streamSubject.add(result));
|
||||||
.listen((result) => streamSubject.add(result));
|
|
||||||
_streamSubjects[uniqueQueryKey] = streamSubject;
|
_streamSubjects[uniqueQueryKey] = streamSubject;
|
||||||
|
|
||||||
return streamSubject.stream;
|
return streamSubject.stream;
|
||||||
|
@ -89,5 +87,4 @@ class StreamRequestManager<T> {
|
||||||
}.forEach(clearRequest);
|
}.forEach(clearRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
String _requestKey(String? key) =>
|
String _requestKey(String? key) => key == null || key.isEmpty ? '__DEFAULT_KEY__' : key;
|
||||||
key == null || key.isEmpty ? '__DEFAULT_KEY__' : key;
|
|
||||||
|
|
|
@ -65,9 +65,7 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheetandFaceDetection({
|
||||||
enableLandmarks: true,
|
enableLandmarks: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
createUploadMediaListTile(
|
createUploadMediaListTile(String label, MediaSource mediaSource, IconData icon) => ListTile(
|
||||||
String label, MediaSource mediaSource, IconData icon) =>
|
|
||||||
ListTile(
|
|
||||||
title: Row(
|
title: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
@ -110,15 +108,12 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheetandFaceDetection({
|
||||||
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
|
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context)
|
||||||
ptText: "Escolha uma das opções",
|
.getVariableText(ptText: "Escolha uma das opções", enText: "Choose one of the options"),
|
||||||
enText: "Choose one of the options"),
|
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: GoogleFonts.getFont(
|
style: GoogleFonts.getFont(
|
||||||
pickerFontFamily,
|
pickerFontFamily,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryText.withOpacity(0.65),
|
||||||
.primaryText
|
|
||||||
.withOpacity(0.65),
|
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
),
|
),
|
||||||
|
@ -134,40 +129,35 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheetandFaceDetection({
|
||||||
if (allowPhoto && allowVideo) ...[
|
if (allowPhoto && allowVideo) ...[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context)
|
||||||
ptText: "Galeria (Foto)",
|
.getVariableText(ptText: "Galeria (Foto)", enText: "Gallery (Photo)"),
|
||||||
enText: "Gallery (Photo)"),
|
|
||||||
MediaSource.photoGallery,
|
MediaSource.photoGallery,
|
||||||
Icons.camera),
|
Icons.camera),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context)
|
||||||
ptText: "Galeria (Video)",
|
.getVariableText(ptText: "Galeria (Video)", enText: "Gallery (Video)"),
|
||||||
enText: "Gallery (Video)"),
|
|
||||||
MediaSource.videoGallery,
|
MediaSource.videoGallery,
|
||||||
Icons.videocam),
|
Icons.videocam),
|
||||||
)
|
)
|
||||||
] else if (allowPhoto)
|
] else if (allowPhoto)
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: "Galeria", enText: "Gallery"),
|
||||||
ptText: "Galeria", enText: "Gallery"),
|
|
||||||
MediaSource.photoGallery,
|
MediaSource.photoGallery,
|
||||||
Icons.photo))
|
Icons.photo))
|
||||||
else
|
else
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: "Galeria", enText: "Gallery"),
|
||||||
ptText: "Galeria", enText: "Gallery"),
|
|
||||||
MediaSource.videoGallery,
|
MediaSource.videoGallery,
|
||||||
Icons.videocam),
|
Icons.videocam),
|
||||||
),
|
),
|
||||||
if (!kIsWeb) ...[
|
if (!kIsWeb) ...[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: "Camera", enText: "Camera"),
|
||||||
ptText: "Camera", enText: "Camera"),
|
|
||||||
MediaSource.camera,
|
MediaSource.camera,
|
||||||
Icons.camera_alt),
|
Icons.camera_alt),
|
||||||
)
|
)
|
||||||
|
@ -186,8 +176,8 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheetandFaceDetection({
|
||||||
maxWidth: maxWidth,
|
maxWidth: maxWidth,
|
||||||
maxHeight: maxHeight,
|
maxHeight: maxHeight,
|
||||||
imageQuality: imageQuality,
|
imageQuality: imageQuality,
|
||||||
isVideo: mediaSource == MediaSource.videoGallery ||
|
isVideo:
|
||||||
(mediaSource == MediaSource.camera && allowVideo && !allowPhoto),
|
mediaSource == MediaSource.videoGallery || (mediaSource == MediaSource.camera && allowVideo && !allowPhoto),
|
||||||
mediaSource: mediaSource,
|
mediaSource: mediaSource,
|
||||||
includeDimensions: includeDimensions,
|
includeDimensions: includeDimensions,
|
||||||
includeBlurHash: includeBlurHash,
|
includeBlurHash: includeBlurHash,
|
||||||
|
@ -202,16 +192,14 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheetandFaceDetection({
|
||||||
final inputImage = InputImage.fromFilePath(media.filePath!);
|
final inputImage = InputImage.fromFilePath(media.filePath!);
|
||||||
final faces = await faceDetector.processImage(inputImage);
|
final faces = await faceDetector.processImage(inputImage);
|
||||||
if (faces.isEmpty) {
|
if (faces.isEmpty) {
|
||||||
final String message = FFLocalizations.of(context).getVariableText(
|
final String message = FFLocalizations.of(context)
|
||||||
ptText: "Nenhuma face detectada na imagem",
|
.getVariableText(ptText: "Nenhuma face detectada na imagem", enText: "No face detected in the image");
|
||||||
enText: "No face detected in the image");
|
|
||||||
DialogUtil.error(context, message);
|
DialogUtil.error(context, message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (faces.length > 1) {
|
if (faces.length > 1) {
|
||||||
final String message = FFLocalizations.of(context).getVariableText(
|
final String message = FFLocalizations.of(context).getVariableText(
|
||||||
ptText: "Mais de uma face detectada na imagem",
|
ptText: "Mais de uma face detectada na imagem", enText: "More than one face detected in the image");
|
||||||
enText: "More than one face detected in the image");
|
|
||||||
DialogUtil.error(context, message);
|
DialogUtil.error(context, message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -234,9 +222,7 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
bool includeDimensions = false,
|
bool includeDimensions = false,
|
||||||
bool includeBlurHash = false,
|
bool includeBlurHash = false,
|
||||||
}) async {
|
}) async {
|
||||||
createUploadMediaListTile(
|
createUploadMediaListTile(String label, MediaSource mediaSource, IconData icon) => ListTile(
|
||||||
String label, MediaSource mediaSource, IconData icon) =>
|
|
||||||
ListTile(
|
|
||||||
title: Row(
|
title: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
@ -280,15 +266,12 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
|
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context)
|
||||||
ptText: "Escolha uma das opções",
|
.getVariableText(ptText: "Escolha uma das opções", enText: "Choose one of the options"),
|
||||||
enText: "Choose one of the options"),
|
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: GoogleFonts.getFont(
|
style: GoogleFonts.getFont(
|
||||||
pickerFontFamily,
|
pickerFontFamily,
|
||||||
color: FlutterFlowTheme.of(context)
|
color: FlutterFlowTheme.of(context).primaryText.withOpacity(0.65),
|
||||||
.primaryText
|
|
||||||
.withOpacity(0.65),
|
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
),
|
),
|
||||||
|
@ -304,40 +287,35 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
if (allowPhoto && allowVideo) ...[
|
if (allowPhoto && allowVideo) ...[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context)
|
||||||
ptText: "Galeria (Foto)",
|
.getVariableText(ptText: "Galeria (Foto)", enText: "Gallery (Photo)"),
|
||||||
enText: "Gallery (Photo)"),
|
|
||||||
MediaSource.photoGallery,
|
MediaSource.photoGallery,
|
||||||
Icons.camera),
|
Icons.camera),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context)
|
||||||
ptText: "Galeria (Video)",
|
.getVariableText(ptText: "Galeria (Video)", enText: "Gallery (Video)"),
|
||||||
enText: "Gallery (Video)"),
|
|
||||||
MediaSource.videoGallery,
|
MediaSource.videoGallery,
|
||||||
Icons.videocam),
|
Icons.videocam),
|
||||||
)
|
)
|
||||||
] else if (allowPhoto)
|
] else if (allowPhoto)
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: "Galeria", enText: "Gallery"),
|
||||||
ptText: "Galeria", enText: "Gallery"),
|
|
||||||
MediaSource.photoGallery,
|
MediaSource.photoGallery,
|
||||||
Icons.photo))
|
Icons.photo))
|
||||||
else
|
else
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: "Galeria", enText: "Gallery"),
|
||||||
ptText: "Galeria", enText: "Gallery"),
|
|
||||||
MediaSource.videoGallery,
|
MediaSource.videoGallery,
|
||||||
Icons.videocam),
|
Icons.videocam),
|
||||||
),
|
),
|
||||||
if (!kIsWeb) ...[
|
if (!kIsWeb) ...[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: createUploadMediaListTile(
|
child: createUploadMediaListTile(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(ptText: "Camera", enText: "Camera"),
|
||||||
ptText: "Camera", enText: "Camera"),
|
|
||||||
MediaSource.camera,
|
MediaSource.camera,
|
||||||
Icons.camera_alt),
|
Icons.camera_alt),
|
||||||
)
|
)
|
||||||
|
@ -356,8 +334,8 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
||||||
maxWidth: maxWidth,
|
maxWidth: maxWidth,
|
||||||
maxHeight: maxHeight,
|
maxHeight: maxHeight,
|
||||||
imageQuality: imageQuality,
|
imageQuality: imageQuality,
|
||||||
isVideo: mediaSource == MediaSource.videoGallery ||
|
isVideo:
|
||||||
(mediaSource == MediaSource.camera && allowVideo && !allowPhoto),
|
mediaSource == MediaSource.videoGallery || (mediaSource == MediaSource.camera && allowVideo && !allowPhoto),
|
||||||
mediaSource: mediaSource,
|
mediaSource: mediaSource,
|
||||||
includeDimensions: includeDimensions,
|
includeDimensions: includeDimensions,
|
||||||
includeBlurHash: includeBlurHash,
|
includeBlurHash: includeBlurHash,
|
||||||
|
@ -407,9 +385,7 @@ Future<List<SelectedFile>?> selectMedia({
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
final source = mediaSource == MediaSource.camera
|
final source = mediaSource == MediaSource.camera ? ImageSource.camera : ImageSource.gallery;
|
||||||
? ImageSource.camera
|
|
||||||
: ImageSource.gallery;
|
|
||||||
final pickedMediaFuture = isVideo
|
final pickedMediaFuture = isVideo
|
||||||
? picker.pickVideo(source: source)
|
? picker.pickVideo(source: source)
|
||||||
: picker.pickImage(
|
: picker.pickImage(
|
||||||
|
@ -480,8 +456,7 @@ Future<List<SelectedFile>?> selectFiles({
|
||||||
return Future.wait(pickedFiles.files.asMap().entries.map((e) async {
|
return Future.wait(pickedFiles.files.asMap().entries.map((e) async {
|
||||||
final index = e.key;
|
final index = e.key;
|
||||||
final file = e.value;
|
final file = e.value;
|
||||||
final storagePath =
|
final storagePath = _getStoragePath(storageFolderPath, file.name, false, index);
|
||||||
_getStoragePath(storageFolderPath, file.name, false, index);
|
|
||||||
return SelectedFile(
|
return SelectedFile(
|
||||||
storagePath: storagePath,
|
storagePath: storagePath,
|
||||||
filePath: isWeb ? null : file.path,
|
filePath: isWeb ? null : file.path,
|
||||||
|
@ -578,8 +553,7 @@ void showUploadMessage(
|
||||||
padding: const EdgeInsetsDirectional.only(end: 10.0),
|
padding: const EdgeInsetsDirectional.only(end: 10.0),
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
valueColor: Theme.of(context).brightness == Brightness.dark
|
valueColor: Theme.of(context).brightness == Brightness.dark
|
||||||
? AlwaysStoppedAnimation<Color>(
|
? AlwaysStoppedAnimation<Color>(FlutterFlowTheme.of(context).info)
|
||||||
FlutterFlowTheme.of(context).info)
|
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -593,12 +567,10 @@ void showUploadMessage(
|
||||||
topRight: Radius.circular(15),
|
topRight: Radius.circular(15),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
duration:
|
duration: showLoading ? const Duration(days: 1) : const Duration(seconds: 4),
|
||||||
showLoading ? const Duration(days: 1) : const Duration(seconds: 4),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String? _removeTrailingSlash(String? path) => path != null && path.endsWith('/')
|
String? _removeTrailingSlash(String? path) =>
|
||||||
? path.substring(0, path.length - 1)
|
path != null && path.endsWith('/') ? path.substring(0, path.length - 1) : path;
|
||||||
: path;
|
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
export 'pages/acess_history_page/acess_history_page_widget.dart'
|
export 'pages/acess_history_page/acess_history_page_widget.dart' show AccessHistoryScreen;
|
||||||
show AccessHistoryScreen;
|
|
||||||
export 'pages/home_page/home_page_widget.dart' show HomePageWidget;
|
export 'pages/home_page/home_page_widget.dart' show HomePageWidget;
|
||||||
export 'pages/liberation_history/liberation_history_widget.dart'
|
export 'pages/liberation_history/liberation_history_widget.dart' show LiberationHistoryWidget;
|
||||||
show LiberationHistoryWidget;
|
export 'pages/people_on_the_property_page/people_on_the_property_page_widget.dart' show PeopleOnThePropertyPageWidget;
|
||||||
export 'pages/people_on_the_property_page/people_on_the_property_page_widget.dart'
|
export 'pages/preferences_settings_page/preferences_settings_widget.dart' show PreferencesPageWidget;
|
||||||
show PeopleOnThePropertyPageWidget;
|
|
||||||
export 'pages/preferences_settings_page/preferences_settings_widget.dart'
|
|
||||||
show PreferencesPageWidget;
|
|
||||||
export 'pages/qr_code_page/qr_code_page_widget.dart' show QrCodePageWidget;
|
export 'pages/qr_code_page/qr_code_page_widget.dart' show QrCodePageWidget;
|
||||||
export 'pages/register_visitor_page/register_visitor_page_widget.dart'
|
export 'pages/register_visitor_page/register_visitor_page_widget.dart' show RegisterVisitorPageWidget;
|
||||||
show RegisterVisitorPageWidget;
|
|
||||||
export 'pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart'
|
export 'pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart'
|
||||||
show ScheduleCompleteVisitPageWidget;
|
show ScheduleCompleteVisitPageWidget;
|
||||||
export 'pages/sign_in_page/sign_in_page_widget.dart' show SignInPageWidget;
|
export 'pages/sign_in_page/sign_in_page_widget.dart' show SignInPageWidget;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue