commit
d286daca53
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -409,10 +409,11 @@
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Profile;
|
name = Profile;
|
||||||
|
@ -557,11 +558,12 @@
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
|
@ -599,10 +601,11 @@
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 185 KiB |
Binary file not shown.
Before Width: | Height: | Size: 185 KiB |
Binary file not shown.
Before Width: | Height: | Size: 185 KiB |
|
@ -1,17 +1,14 @@
|
||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"filename" : "69.png",
|
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "69 1.png",
|
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "69 2.png",
|
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,11 @@ import 'package:flutter/material.dart';
|
||||||
// import 'package:hub/components/organisms/bottom_arrow_linked_locals/bottom_arrow_linked_locals_component_widget.dart';
|
// import 'package:hub/components/organisms/bottom_arrow_linked_locals/bottom_arrow_linked_locals_component_widget.dart';
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
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/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
|
|
||||||
import 'package:hub/custom_code/actions/get_dev_u_u_i_d.dart';
|
import 'package:hub/custom_code/actions/get_dev_u_u_i_d.dart';
|
||||||
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';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/flutter_flow/random_data_util.dart';
|
import 'package:hub/flutter_flow/random_data_util.dart';
|
||||||
import 'package:hub/pages/home_page/home_page_model.dart';
|
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
import 'package:qr_flutter/qr_flutter.dart';
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
@ -139,29 +137,24 @@ Future singInLoginAction(
|
||||||
AppState().userUUID = PhpGroup.loginCall.userUUID(
|
AppState().userUUID = PhpGroup.loginCall.userUUID(
|
||||||
(loginCall.jsonBody ?? ''),
|
(loginCall.jsonBody ?? ''),
|
||||||
)!;
|
)!;
|
||||||
|
|
||||||
AppState().createdAt = dateTimeFormat(
|
AppState().createdAt = dateTimeFormat(
|
||||||
'd/M/y H:mm:ss',
|
'd/M/y H:mm:ss',
|
||||||
getCurrentTimestamp,
|
getCurrentTimestamp,
|
||||||
locale: FFLocalizations.of(context).languageCode,
|
locale: FFLocalizations.of(context).languageCode,
|
||||||
);
|
);
|
||||||
|
|
||||||
AppState().updatedAt = '00/00/0000 00:00:00';
|
AppState().updatedAt = '00/00/0000 00:00:00';
|
||||||
|
|
||||||
AppState().status =
|
AppState().status =
|
||||||
PhpGroup.loginCall.userStatus((loginCall.jsonBody ?? ''))!;
|
PhpGroup.loginCall.userStatus((loginCall.jsonBody ?? ''))!;
|
||||||
|
|
||||||
AppState().userDevUUID =
|
AppState().userDevUUID =
|
||||||
PhpGroup.loginCall.userDeviceId((loginCall.jsonBody ?? ''))!;
|
PhpGroup.loginCall.userDeviceId((loginCall.jsonBody ?? ''))!;
|
||||||
|
|
||||||
AppState().name =
|
|
||||||
PhpGroup.loginCall.userName((loginCall.jsonBody ?? ''))!;
|
PhpGroup.loginCall.userName((loginCall.jsonBody ?? ''))!;
|
||||||
|
|
||||||
AppState().serialNumber = await getSerialNumber() ?? '';
|
AppState().serialNumber = await getSerialNumber() ?? '';
|
||||||
|
|
||||||
AppState().isLogged = true;
|
AppState().isLogged = true;
|
||||||
|
|
||||||
AppState().haveLocal =
|
AppState().haveLocal =
|
||||||
await checkLocals(context: context, model: model);
|
await checkLocals(context: context, model: model);
|
||||||
|
log('haveLocal in login: ${AppState().haveLocal}');
|
||||||
|
toggleApp(context, AppState().haveLocal!);
|
||||||
} else {
|
} else {
|
||||||
if (PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')) == null) {
|
if (PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')) == null) {
|
||||||
DialogUtil.errorDefault(context);
|
DialogUtil.errorDefault(context);
|
||||||
|
@ -306,6 +299,7 @@ Future toggleSignUpPage(BuildContext context) async {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future toggleApp(BuildContext context, bool haveLocal) async {
|
Future toggleApp(BuildContext context, bool haveLocal) async {
|
||||||
|
log('haveLocal in toggleApp: $haveLocal');
|
||||||
if (haveLocal == true)
|
if (haveLocal == true)
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'homePage',
|
'homePage',
|
||||||
|
@ -398,24 +392,10 @@ Future<bool> checkLocals({
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
List<dynamic> locals = response.jsonBody['locais'] ?? [];
|
List<dynamic> locals = response.jsonBody['locais'] ?? [];
|
||||||
if (locals != null && locals.isEmpty) {
|
|
||||||
await toggleApp(context, false);
|
if (locals.isEmpty) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
// else if (locals.where((local) => local['CLU_STATUS'] != 'A').isNotEmpty) {
|
|
||||||
// await showModalBottomSheet(
|
|
||||||
// isScrollControlled: true,
|
|
||||||
// backgroundColor: Colors.transparent,
|
|
||||||
// enableDrag: false,
|
|
||||||
// isDismissible: false,
|
|
||||||
// context: context,
|
|
||||||
// builder: (context) => Padding(
|
|
||||||
// padding: MediaQuery.viewInsetsOf(context),
|
|
||||||
// child: const BottomArrowLinkedLocalsComponentWidget(),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
await toggleApp(context, true);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,7 @@ class AppState extends ChangeNotifier {
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_devUUID = await secureStorage.getString('ff_devUUID') ?? _devUUID;
|
_devUUID = await secureStorage.getString('ff_devUUID') ?? _devUUID;
|
||||||
});
|
});
|
||||||
|
|
||||||
await _safeInitAsync(() async {
|
await _safeInitAsync(() async {
|
||||||
_email = await secureStorage.getString('ff_email') ?? _email;
|
_email = await secureStorage.getString('ff_email') ?? _email;
|
||||||
});
|
});
|
||||||
|
@ -215,6 +216,17 @@ class AppState extends ChangeNotifier {
|
||||||
secureStorage.delete(key: 'panic');
|
secureStorage.delete(key: 'panic');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool? _haveLocal = null;
|
||||||
|
bool? get haveLocal => _haveLocal;
|
||||||
|
set haveLocal(bool? value) {
|
||||||
|
_haveLocal = value;
|
||||||
|
secureStorage.setBool('ff_have_local', value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void deleteHaveLocal() {
|
||||||
|
secureStorage.delete(key: 'ff_have_local');
|
||||||
|
}
|
||||||
|
|
||||||
String _fingerprintPass = '';
|
String _fingerprintPass = '';
|
||||||
String get fingerprintPass => _fingerprintPass;
|
String get fingerprintPass => _fingerprintPass;
|
||||||
set fingerprintPass(String value) {
|
set fingerprintPass(String value) {
|
||||||
|
@ -297,6 +309,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteSerialNumber() {
|
void deleteSerialNumber() {
|
||||||
secureStorage.delete(key: 'ff_serialNumber');
|
secureStorage.delete(key: 'ff_serialNumber');
|
||||||
|
AppState().serialNumber = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _cliUUID = '';
|
String _cliUUID = '';
|
||||||
|
@ -308,6 +321,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteCliUUID() {
|
void deleteCliUUID() {
|
||||||
secureStorage.delete(key: 'ff_cliUUID');
|
secureStorage.delete(key: 'ff_cliUUID');
|
||||||
|
AppState().cliUUID = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _userDevUUID = '';
|
String _userDevUUID = '';
|
||||||
|
@ -319,6 +333,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteRemoteId() {
|
void deleteRemoteId() {
|
||||||
secureStorage.delete(key: 'ff_user_dev_id');
|
secureStorage.delete(key: 'ff_user_dev_id');
|
||||||
|
AppState().userDevUUID = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String? _tokenAPNS = '';
|
String? _tokenAPNS = '';
|
||||||
|
@ -336,6 +351,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteTokenAPNS() {
|
void deleteTokenAPNS() {
|
||||||
secureStorage.delete(key: 'ff_tokenAPNS');
|
secureStorage.delete(key: 'ff_tokenAPNS');
|
||||||
|
AppState().tokenAPNS = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _ownerUUID = '';
|
String _ownerUUID = '';
|
||||||
|
@ -347,6 +363,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteOwnerUUID() {
|
void deleteOwnerUUID() {
|
||||||
secureStorage.delete(key: 'ff_ownerUUID');
|
secureStorage.delete(key: 'ff_ownerUUID');
|
||||||
|
AppState().ownerUUID = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _userUUID = '';
|
String _userUUID = '';
|
||||||
|
@ -358,6 +375,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteUserUUID() {
|
void deleteUserUUID() {
|
||||||
secureStorage.delete(key: 'ff_userUUID');
|
secureStorage.delete(key: 'ff_userUUID');
|
||||||
|
AppState().userUUID = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _devUUID = '';
|
String _devUUID = '';
|
||||||
|
@ -369,6 +387,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteDevUUID() {
|
void deleteDevUUID() {
|
||||||
secureStorage.delete(key: 'ff_devUUID');
|
secureStorage.delete(key: 'ff_devUUID');
|
||||||
|
AppState().devUUID = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _email = '';
|
String _email = '';
|
||||||
|
@ -380,6 +399,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteEmail() {
|
void deleteEmail() {
|
||||||
secureStorage.delete(key: 'ff_email');
|
secureStorage.delete(key: 'ff_email');
|
||||||
|
AppState().email = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _passwd = '';
|
String _passwd = '';
|
||||||
|
@ -391,6 +411,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deletePasswd() {
|
void deletePasswd() {
|
||||||
secureStorage.delete(key: 'ff_passwd');
|
secureStorage.delete(key: 'ff_passwd');
|
||||||
|
AppState().passwd = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _device = '';
|
String _device = '';
|
||||||
|
@ -402,6 +423,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteDevice() {
|
void deleteDevice() {
|
||||||
secureStorage.delete(key: 'ff_device');
|
secureStorage.delete(key: 'ff_device');
|
||||||
|
AppState().device = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isLogged = false;
|
bool _isLogged = false;
|
||||||
|
@ -411,13 +433,6 @@ class AppState extends ChangeNotifier {
|
||||||
secureStorage.setBool('ff_isLogged', value);
|
secureStorage.setBool('ff_isLogged', value);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _haveLocal = false;
|
|
||||||
bool get haveLocal => _haveLocal;
|
|
||||||
set haveLocal(bool value) {
|
|
||||||
_haveLocal = value;
|
|
||||||
secureStorage.setBool('ff_have_local', value);
|
|
||||||
}
|
|
||||||
|
|
||||||
void deleteIsLogged() {
|
void deleteIsLogged() {
|
||||||
secureStorage.delete(key: 'ff_isLogged');
|
secureStorage.delete(key: 'ff_isLogged');
|
||||||
}
|
}
|
||||||
|
@ -431,6 +446,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteLocal() {
|
void deleteLocal() {
|
||||||
secureStorage.delete(key: 'ff_local');
|
secureStorage.delete(key: 'ff_local');
|
||||||
|
AppState().local = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _token = '';
|
String _token = '';
|
||||||
|
@ -442,6 +458,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteToken() {
|
void deleteToken() {
|
||||||
secureStorage.delete(key: 'ff_token');
|
secureStorage.delete(key: 'ff_token');
|
||||||
|
AppState().token = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _createdAt = '';
|
String _createdAt = '';
|
||||||
|
@ -453,6 +470,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteCreatedAt() {
|
void deleteCreatedAt() {
|
||||||
secureStorage.delete(key: 'ff_createdAt');
|
secureStorage.delete(key: 'ff_createdAt');
|
||||||
|
AppState().createdAt = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _updatedAt = '';
|
String _updatedAt = '';
|
||||||
|
@ -464,6 +482,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteUpdatedAt() {
|
void deleteUpdatedAt() {
|
||||||
secureStorage.delete(key: 'ff_updatedAt');
|
secureStorage.delete(key: 'ff_updatedAt');
|
||||||
|
AppState().updatedAt = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _status = '';
|
String _status = '';
|
||||||
|
@ -475,6 +494,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteStatus() {
|
void deleteStatus() {
|
||||||
secureStorage.delete(key: 'ff_status');
|
secureStorage.delete(key: 'ff_status');
|
||||||
|
AppState().status = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _name = '';
|
String _name = '';
|
||||||
|
@ -486,6 +506,7 @@ class AppState extends ChangeNotifier {
|
||||||
|
|
||||||
void deleteName() {
|
void deleteName() {
|
||||||
secureStorage.delete(key: 'ff_name');
|
secureStorage.delete(key: 'ff_name');
|
||||||
|
AppState().name = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
void deleteAll() {
|
void deleteAll() {
|
||||||
|
@ -548,7 +569,7 @@ extension FlutterSecureStorageExtensions on FlutterSecureStorage {
|
||||||
await writeSync(key: key, value: value);
|
await writeSync(key: key, value: value);
|
||||||
|
|
||||||
Future<bool?> getBool(String key) async => (await read(key: key)) == 'true';
|
Future<bool?> getBool(String key) async => (await read(key: key)) == 'true';
|
||||||
Future<void> setBool(String key, bool value) async =>
|
Future<void> setBool(String key, bool? value) async =>
|
||||||
await writeSync(key: key, value: value.toString());
|
await writeSync(key: key, value: value.toString());
|
||||||
|
|
||||||
Future<int?> getInt(String key) async =>
|
Future<int?> getInt(String key) async =>
|
||||||
|
|
|
@ -510,6 +510,11 @@ class ApiManager {
|
||||||
result = ApiCallResponse(null, {}, -1, exception: e);
|
result = ApiCallResponse(null, {}, -1, exception: e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log('API Call: $callName');
|
||||||
|
log('URL: $apiUrl');
|
||||||
|
log('Headers: $headers');
|
||||||
|
log('Params$params');
|
||||||
|
log('Response${result.jsonBody}');
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,7 +297,6 @@ class NotificationService {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log('default');
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
||||||
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';
|
|
||||||
|
|
||||||
class MenuButtonWidget extends MenuEntry {
|
class MenuButtonWidget extends MenuEntry {
|
||||||
const MenuButtonWidget({
|
const MenuButtonWidget({
|
||||||
|
@ -33,8 +32,10 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await widget.action?.call();
|
await widget.action?.call();
|
||||||
},
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 120.0,
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -56,55 +57,30 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(4.0),
|
padding: const EdgeInsets.all(0.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Align(
|
if (widget.icon != null)
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
Container(
|
||||||
child: Row(
|
alignment: Alignment.topLeft,
|
||||||
mainAxisSize: MainAxisSize.max,
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Align(
|
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
8.0, 0.0, 0.0, 0.0),
|
|
||||||
child: Container(
|
|
||||||
width: 30.0,
|
|
||||||
height: 30.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryBackground,
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Icon(
|
child: Icon(
|
||||||
widget.icon,
|
widget.icon,
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Flexible(
|
||||||
),
|
child: Padding(
|
||||||
),
|
padding: const EdgeInsets.only(left: 10.0),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.title ?? '',
|
widget.title ?? '',
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 2,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
@ -116,11 +92,10 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
].divide(const SizedBox(height: 0.0)),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
||||||
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';
|
|
||||||
|
|
||||||
class MenuCardItem extends MenuEntry {
|
class MenuCardItem extends MenuEntry {
|
||||||
const MenuCardItem({
|
const MenuCardItem({
|
||||||
|
@ -36,10 +35,6 @@ class _MenuCardItemState extends State<MenuCardItem> {
|
||||||
child: Card(
|
child: Card(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(4.0),
|
|
||||||
child: Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -47,8 +42,8 @@ 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: const EdgeInsetsDirectional.fromSTEB(
|
padding:
|
||||||
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,
|
||||||
|
@ -66,26 +61,23 @@ class _MenuCardItemState extends State<MenuCardItem> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Align(
|
Flexible(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.title ?? '',
|
widget.title ?? '',
|
||||||
|
// overflow: TextOverflow.ellipsis,
|
||||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
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('Nunito'),
|
||||||
GoogleFonts.asMap().containsKey('Nunito'),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/form_field_controller.dart';
|
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';
|
|
||||||
|
|
||||||
|
|
||||||
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.
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
import 'dart:ffi';
|
|
||||||
|
|
||||||
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/components/molecular_components/message_opt_modal/opt_modal_model.dart';
|
import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_model.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|
||||||
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';
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
|
||||||
|
|
||||||
class OptModalWidget extends StatefulWidget {
|
class OptModalWidget extends StatefulWidget {
|
||||||
final String defaultPersonType;
|
final String defaultPersonType;
|
||||||
|
@ -85,7 +81,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
Navigator.pop(context, filterResult);
|
Navigator.pop(context, filterResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCheckboxListTile(String key, List<Map<String, String>> options, double fontsize) {
|
Widget _buildCheckboxListTile(
|
||||||
|
String key, List<Map<String, String>> options, double fontsize) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
|
@ -145,13 +142,13 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
||||||
checkboxShape: RoundedRectangleBorder(
|
checkboxShape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(100),
|
borderRadius: BorderRadius.circular(100),
|
||||||
),
|
),
|
||||||
|
|
||||||
enableFeedback: true,
|
enableFeedback: true,
|
||||||
side: BorderSide(
|
side: BorderSide(
|
||||||
width: 5,
|
width: 5,
|
||||||
color: FlutterFlowTheme.of(context).secondaryText,
|
color: FlutterFlowTheme.of(context).secondaryText,
|
||||||
),
|
),
|
||||||
controlAffinity: ListTileControlAffinity.leading, // Adiciona esta linha
|
controlAffinity:
|
||||||
|
ListTileControlAffinity.leading, // Adiciona esta linha
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -14,7 +14,7 @@ export 'local_profile_component_model.dart';
|
||||||
////
|
////
|
||||||
|
|
||||||
class LocalProfileComponentWidget extends StatefulWidget {
|
class LocalProfileComponentWidget extends StatefulWidget {
|
||||||
const LocalProfileComponentWidget({required bool localStatus, super.key});
|
const LocalProfileComponentWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<LocalProfileComponentWidget> createState() =>
|
State<LocalProfileComponentWidget> createState() =>
|
||||||
|
@ -59,9 +59,9 @@ class _LocalProfileComponentWidgetState
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 119.0,
|
height: 119.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xFF1AAB5F),
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: const Color(0xFF1AAB5F),
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
@ -88,7 +88,8 @@ class _LocalProfileComponentWidgetState
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child: const SizedBox(
|
child: const SizedBox(
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
child: BottomArrowLinkedLocalsComponentWidget(),
|
child:
|
||||||
|
BottomArrowLinkedLocalsComponentWidget(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -97,19 +98,27 @@ class _LocalProfileComponentWidgetState
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(200.0),
|
borderRadius: BorderRadius.circular(200.0),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
|
imageBuilder: (context, imageProvider) => Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: imageProvider,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
imageUrl: valueOrDefault(
|
imageUrl: valueOrDefault(
|
||||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||||
'assets/images/error_image.svg'),
|
'assets/images/home.png'),
|
||||||
width: 80.0,
|
width: 80.0,
|
||||||
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/error_image.svg'),
|
Image.asset('assets/images/home.png'),
|
||||||
errorListener: (_) =>
|
errorListener: (_) =>
|
||||||
Image.asset('assets/images/error_image.svg'),
|
Image.asset('assets/images/home.png'),
|
||||||
errorWidget: (_, __, ___) =>
|
errorWidget: (_, __, ___) =>
|
||||||
Image.asset('assets/images/error_image.svg'),
|
Image.asset('assets/images/home.png'),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart';
|
import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/reservation_page/reservation_page_widget.dart';
|
import 'package:hub/pages/reservation_page/reservation_page_widget.dart';
|
||||||
|
import 'package:hub/shared/extensions/dialog_extensions.dart';
|
||||||
|
|
||||||
import '/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
import '/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
||||||
import '/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
|
import '/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
|
||||||
|
@ -42,36 +41,97 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
isGrid = !isGrid;
|
isGrid = !isGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future scheduleVisitOptAction(BuildContext context) async {
|
Future scheduleCompleteVisitAction(BuildContext context) async {
|
||||||
final isWpp = AppState().whatsapp;
|
context.pushNamed(
|
||||||
final isProvisional = AppState().provisional;
|
'scheduleCompleteVisitPage',
|
||||||
log("isWpp ${isWpp ? 1 : 0}");
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
final routesListStr = <String>[
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future deliverySchedule(BuildContext context) async {
|
||||||
|
final isProvisional = AppState().provisional;
|
||||||
|
if (isProvisional == true) {
|
||||||
|
context.pushNamed(
|
||||||
|
'deliverySchedule',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
DialogUnavailable.unavailableFeature(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future provisionalSchedule(BuildContext context) async {
|
||||||
|
final isProvisional = AppState().provisional;
|
||||||
|
if (isProvisional == true) {
|
||||||
|
context.pushNamed(
|
||||||
|
'provisionalSchedule',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
DialogUnavailable.unavailableFeature(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future fastPassAction(BuildContext context) async {
|
||||||
|
final isWpp = AppState().whatsapp;
|
||||||
|
if (isWpp) {
|
||||||
|
context.pushNamed(
|
||||||
|
'fastPassPage',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
DialogUnavailable.unavailableFeature(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future scheduleVisitOptAction(BuildContext context) async {
|
||||||
|
final routesListStr = <String>[
|
||||||
|
'scheduleProvisionalVisitPage',
|
||||||
|
'fastPassPage',
|
||||||
'scheduleCompleteVisitPage',
|
'scheduleCompleteVisitPage',
|
||||||
if (isProvisional) 'scheduleProvisionalVisitPage',
|
|
||||||
if (isWpp) 'fastPassPage',
|
|
||||||
];
|
];
|
||||||
final iconsListIcon = <IconData>[
|
final iconsListIcon = <IconData>[
|
||||||
Icons.date_range_rounded,
|
Icons.date_range_rounded,
|
||||||
if (isProvisional) Icons.date_range_rounded,
|
Icons.date_range_rounded,
|
||||||
if (isWpp) Icons.date_range_rounded,
|
Icons.date_range_rounded,
|
||||||
];
|
];
|
||||||
final nameListStr = <String>[
|
final nameListStr = <String>[
|
||||||
FFLocalizations.of(context).getVariableText(
|
|
||||||
ptText: 'Visita\nCompleta',
|
|
||||||
enText: 'Complete\nSchedule',
|
|
||||||
),
|
|
||||||
if (isProvisional)
|
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Visita\nProvisória',
|
ptText: 'Visita\nProvisória',
|
||||||
enText: 'Provisional\nSchedule',
|
enText: 'Provisional\nSchedule',
|
||||||
),
|
),
|
||||||
if (isWpp)
|
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Visita\nRápida',
|
ptText: 'Visita\nRápida',
|
||||||
enText: 'Fast\nSchedule',
|
enText: 'Fast\nSchedule',
|
||||||
),
|
),
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Visita\nCompleta',
|
||||||
|
enText: 'Complete\nSchedule',
|
||||||
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
await showAdaptiveDialog(
|
await showAdaptiveDialog(
|
||||||
|
@ -123,7 +183,6 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
ptText: 'Tem certeza',
|
ptText: 'Tem certeza',
|
||||||
), () async {
|
), () async {
|
||||||
AppState().deleteAll();
|
AppState().deleteAll();
|
||||||
// setState(() {});
|
|
||||||
|
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'welcomePage',
|
'welcomePage',
|
||||||
|
@ -165,10 +224,11 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future reservation(BuildContext context) async {
|
Future reservation(BuildContext context) async {
|
||||||
Navigator.push(context, MaterialPageRoute(builder: (context) => ReservationPageWidget()));
|
Navigator.push(context,
|
||||||
|
MaterialPageRoute(builder: (context) => ReservationPageWidget()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Future liberationHistoryOptAction(BuildContext context) async {
|
Future consultHistoriesAction(BuildContext context) async {
|
||||||
await showAdaptiveDialog(
|
await showAdaptiveDialog(
|
||||||
// isScrollControlled: true,
|
// isScrollControlled: true,
|
||||||
// backgroundColor: Colors.transparent,
|
// backgroundColor: Colors.transparent,
|
||||||
|
@ -214,6 +274,45 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future liberationHistoryAction(BuildContext context) async {
|
||||||
|
context.pushNamed(
|
||||||
|
'liberationHistory',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future accessHistoryAction(BuildContext context) async {
|
||||||
|
context.pushNamed(
|
||||||
|
'acessHistoryPage',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future visitHistoryAction(BuildContext context) async {
|
||||||
|
context.pushNamed(
|
||||||
|
'scheduleCompleteVisitPage',
|
||||||
|
extra: <String, dynamic>{
|
||||||
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
|
hasTransition: true,
|
||||||
|
transitionType: PageTransitionType.scale,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Future accessQRCodeOptAction(BuildContext context) async {
|
Future accessQRCodeOptAction(BuildContext context) async {
|
||||||
context.pushNamed(
|
context.pushNamed(
|
||||||
'qrCodePage',
|
'qrCodePage',
|
||||||
|
|
|
@ -55,6 +55,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final options = () {
|
final options = () {
|
||||||
if (widget.item == MenuItem.button) {
|
if (widget.item == MenuItem.button) {
|
||||||
|
if (_model.isGrid == true)
|
||||||
return <MenuEntry>[
|
return <MenuEntry>[
|
||||||
MenuButtonWidget(
|
MenuButtonWidget(
|
||||||
icon: FFIcons.kvector1,
|
icon: FFIcons.kvector1,
|
||||||
|
@ -96,14 +97,14 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Poeple on\nthe Property',
|
enText: 'People on\nthe Property',
|
||||||
ptText: 'Pessoas na\nPropriedade',
|
ptText: 'Pessoas na\nPropriedade',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MenuButtonWidget(
|
MenuButtonWidget(
|
||||||
icon: Icons.history_sharp,
|
icon: Icons.history_sharp,
|
||||||
action: () async {
|
action: () async {
|
||||||
await _model.liberationHistoryOptAction(context);
|
await _model.consultHistoriesAction(context);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
@ -111,28 +112,6 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
ptText: 'Consultar\nHistóricos',
|
ptText: 'Consultar\nHistóricos',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MenuButtonWidget(
|
|
||||||
icon: Icons.inventory_2_rounded,
|
|
||||||
action: () async {
|
|
||||||
await _model.packageOrder(context);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
|
||||||
enText: 'Orders',
|
|
||||||
ptText: 'Encomendas',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
MenuButtonWidget(
|
|
||||||
icon: Icons.event_available,
|
|
||||||
action: () async {
|
|
||||||
await _model.reservation(context);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
|
||||||
enText: 'Reservations',
|
|
||||||
ptText: 'Reservas',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
MenuButtonWidget(
|
MenuButtonWidget(
|
||||||
icon: Icons.settings,
|
icon: Icons.settings,
|
||||||
action: () async {
|
action: () async {
|
||||||
|
@ -141,10 +120,166 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Preferences\nSettings',
|
enText: 'Preferences\nSettings',
|
||||||
ptText: 'Preferências \nde Configurações',
|
ptText: 'Opções\ndo Sistema',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
else
|
||||||
|
return <MenuEntry>[
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.engineering_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.provisionalSchedule(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Provisional\nSchedule',
|
||||||
|
ptText: 'Agendar\nPrestadores',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.sports_motorsports_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.deliverySchedule(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Delivery\nSchedule',
|
||||||
|
ptText: 'Agendar\nEntregas',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.share_location_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.fastPassAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Fast\nVisit',
|
||||||
|
ptText: 'Agenda\nRápida',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.event,
|
||||||
|
action: () async {
|
||||||
|
await _model.scheduleCompleteVisitAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Complete\nSchedule',
|
||||||
|
ptText: 'Agenda\nCompleta',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.inventory_2_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.packageOrder(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Minhas\nEncomendas',
|
||||||
|
enText: 'My\nOrders',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.event_available,
|
||||||
|
action: () async {
|
||||||
|
await _model.reservation(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Reserva\nde Itens',
|
||||||
|
enText: 'Item\nReservation',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: FFIcons.khome,
|
||||||
|
action: () async {
|
||||||
|
await _model.registerVisitorOptAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Register\nVisitor',
|
||||||
|
ptText: 'Cadastro\nde Visitante',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.qr_code,
|
||||||
|
action: () async {
|
||||||
|
await _model.accessQRCodeOptAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'QRCode\nAccess',
|
||||||
|
ptText: 'QRCode\nde Acesso',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.groups,
|
||||||
|
action: () async {
|
||||||
|
await _model.peopleOnThePropertyAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'People on\nthe Property',
|
||||||
|
ptText: 'Pessoas na\nPropriedade',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.how_to_reg_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.liberationHistoryAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Liberations\nHistory',
|
||||||
|
ptText: 'Consultar\nLiberações',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.key_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.accessHistoryAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Access\nHistory',
|
||||||
|
ptText: 'Consultar\nAcessos',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.people_outline_sharp,
|
||||||
|
action: () async {
|
||||||
|
await _model.visitHistoryAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Visit\nHistory',
|
||||||
|
ptText: 'Consultar\nVisitas',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.chat_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.messageHistoryAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Message\nHistory',
|
||||||
|
ptText: 'Consultar\nMensagens',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuButtonWidget(
|
||||||
|
icon: Icons.settings,
|
||||||
|
action: () async {
|
||||||
|
await _model.preferencesSettings(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Preferences\nSettings',
|
||||||
|
ptText: 'Opções\ndo Sistema',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (widget.item == MenuItem.card) {
|
if (widget.item == MenuItem.card) {
|
||||||
|
@ -189,14 +324,14 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Poeple on\nthe Property',
|
enText: 'People on\nthe Property',
|
||||||
ptText: 'Pessoas\nna Propriedade',
|
ptText: 'Pessoas\nna Propriedade',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MenuCardItem(
|
MenuCardItem(
|
||||||
icon: Icons.history_sharp,
|
icon: Icons.history_sharp,
|
||||||
action: () async {
|
action: () async {
|
||||||
await _model.liberationHistoryOptAction(context);
|
await _model.consultHistoriesAction(context);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
@ -242,14 +377,69 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
// if (MenuItem.tile)
|
// if (MenuItem.tile)
|
||||||
return <MenuEntry>[
|
return <MenuEntry>[
|
||||||
MenuCardItem(
|
MenuCardItem(
|
||||||
icon: FFIcons.kvector1,
|
icon: Icons.engineering_outlined,
|
||||||
action: () async {
|
action: () async {
|
||||||
await _model.scheduleVisitOptAction(context);
|
await _model.provisionalSchedule(context);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Schedule Visit',
|
enText: 'Provisional Schedule',
|
||||||
ptText: 'Agendar Visita',
|
ptText: 'Agendar Prestadores',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuCardItem(
|
||||||
|
icon: Icons.sports_motorsports_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.deliverySchedule(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Delivery Schedule',
|
||||||
|
ptText: 'Agendar Entregas',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuCardItem(
|
||||||
|
icon: Icons.share_location_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.fastPassAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Fast Visit',
|
||||||
|
ptText: 'Agenda Rápida',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuCardItem(
|
||||||
|
icon: Icons.event,
|
||||||
|
action: () async {
|
||||||
|
await _model.scheduleCompleteVisitAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Complete Schedule',
|
||||||
|
ptText: 'Agenda Completa',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuCardItem(
|
||||||
|
icon: Icons.inventory_2_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.packageOrder(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Minhas Encomendas',
|
||||||
|
enText: 'My Orders',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuCardItem(
|
||||||
|
icon: Icons.event_available,
|
||||||
|
action: () async {
|
||||||
|
await _model.reservation(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText: 'Reserva de Itens',
|
||||||
|
enText: 'Item Reservation',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MenuCardItem(
|
MenuCardItem(
|
||||||
|
@ -275,25 +465,69 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MenuCardItem(
|
MenuCardItem(
|
||||||
icon: Icons.people,
|
icon: Icons.groups,
|
||||||
action: () async {
|
action: () async {
|
||||||
await _model.peopleOnThePropertyAction(context);
|
await _model.peopleOnThePropertyAction(context);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Poeple on the Property',
|
enText: 'People on the Property',
|
||||||
ptText: 'Pessoas na Propriedade',
|
ptText: 'Pessoas na Propriedade',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MenuCardItem(
|
MenuCardItem(
|
||||||
icon: Icons.history_sharp,
|
icon: Icons.group_add_outlined,
|
||||||
action: () async {
|
action: () async {
|
||||||
await _model.liberationHistoryOptAction(context);
|
await _model.liberationHistoryAction(context);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Consult Histories',
|
enText: 'Liberations History',
|
||||||
ptText: 'Consultar Historicos',
|
ptText: 'Consultar Liberações',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuCardItem(
|
||||||
|
icon: Icons.key_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.accessHistoryAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Access History',
|
||||||
|
ptText: 'Consultar Acessos',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuCardItem(
|
||||||
|
icon: Icons.people_outline_sharp,
|
||||||
|
action: () async {
|
||||||
|
await _model.visitHistoryAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Visit History',
|
||||||
|
ptText: 'Consultar Visitas',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuCardItem(
|
||||||
|
icon: Icons.chat_outlined,
|
||||||
|
action: () async {
|
||||||
|
await _model.messageHistoryAction(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Message History',
|
||||||
|
ptText: 'Consultar Mensagens',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MenuCardItem(
|
||||||
|
icon: Icons.settings,
|
||||||
|
action: () async {
|
||||||
|
await _model.preferencesSettings(context);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
title: FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Preferences Settings',
|
||||||
|
ptText: 'Opções do Sistema',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MenuCardItem(
|
MenuCardItem(
|
||||||
|
@ -307,44 +541,14 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
ptText: 'Sair da Conta',
|
ptText: 'Sair da Conta',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
MenuCardItem(
|
MenuCardItem(icon: null, action: () {}, title: ''),
|
||||||
icon: Icons.inventory_2_rounded,
|
|
||||||
action: () async {
|
|
||||||
await _model.packageOrder(context);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
|
||||||
enText: 'Orders',
|
|
||||||
ptText: 'Encomendas',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
MenuCardItem(
|
|
||||||
icon: Icons.event_available,
|
|
||||||
action: () async {
|
|
||||||
await _model.reservation(context);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
|
||||||
enText: 'Reservations',
|
|
||||||
ptText: 'Reservas',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
MenuCardItem(
|
|
||||||
icon: Icons.settings,
|
|
||||||
action: () async {
|
|
||||||
await _model.preferencesSettings(context).then((value) => value);
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
title: FFLocalizations.of(context).getVariableText(
|
|
||||||
enText: 'Preferences Settings',
|
|
||||||
ptText: 'Preferências de Configuração',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
];
|
];
|
||||||
}();
|
}();
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
padding: const EdgeInsetsDirectional.only(
|
||||||
|
top: 10,
|
||||||
|
),
|
||||||
child: Builder(
|
child: Builder(
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
if (widget.style == MenuView.list_grid &&
|
if (widget.style == MenuView.list_grid &&
|
||||||
|
@ -352,10 +556,10 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
widget.item == MenuItem.button) {
|
widget.item == MenuItem.button) {
|
||||||
if (_model.isGrid == true) {
|
if (_model.isGrid == true) {
|
||||||
return wrapWithModel(
|
return wrapWithModel(
|
||||||
model: _model.menuListViewComponentModel,
|
model: _model.menuStaggeredViewComponentModel,
|
||||||
updateCallback: () => setState(() {}),
|
updateCallback: () => setState(() {}),
|
||||||
updateOnChange: true,
|
updateOnChange: true,
|
||||||
child: MenuListViewComponentWidget(
|
child: MenuStaggeredViewComponentWidget(
|
||||||
options: options,
|
options: options,
|
||||||
expandable: widget.expandable,
|
expandable: widget.expandable,
|
||||||
item: widget.item,
|
item: widget.item,
|
||||||
|
@ -363,6 +567,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
await _model.changeMenuStyle(context);
|
await _model.changeMenuStyle(context);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
|
isGrid: _model.isGrid,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -378,6 +583,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
||||||
await _model.changeMenuStyle(context);
|
await _model.changeMenuStyle(context);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
|
isGrid: _model.isGrid,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,20 +56,7 @@ class _MenuListViewComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Wrap(
|
return buildMenuItem(context);
|
||||||
spacing: 0.0,
|
|
||||||
runSpacing: 0.0,
|
|
||||||
alignment: WrapAlignment.start,
|
|
||||||
crossAxisAlignment: WrapCrossAlignment.start,
|
|
||||||
direction: Axis.horizontal,
|
|
||||||
runAlignment: WrapAlignment.start,
|
|
||||||
verticalDirection: VerticalDirection.down,
|
|
||||||
clipBehavior: Clip.none,
|
|
||||||
children: [
|
|
||||||
buildMenuItem(context),
|
|
||||||
if (widget.expandable) buildExpandableButton(context),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildMenuItem(BuildContext context) {
|
Widget buildMenuItem(BuildContext context) {
|
||||||
|
@ -115,9 +102,14 @@ class _MenuListViewComponentWidgetState
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case MenuItem.tile:
|
case MenuItem.tile:
|
||||||
|
return buildMenuList(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildMenuList(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: double.infinity,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: MediaQuery.of(context).size.height * 0.7,
|
height: MediaQuery.of(context).size.height,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
|
@ -126,8 +118,6 @@ class _MenuListViewComponentWidgetState
|
||||||
itemCount: widget.options.length,
|
itemCount: widget.options.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: MediaQuery.of(context).size.height * 0.08,
|
|
||||||
width: MediaQuery.of(context).size.width * 0.08,
|
|
||||||
child: widget.options[index],
|
child: widget.options[index],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -137,7 +127,6 @@ class _MenuListViewComponentWidgetState
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Row buildExpandableButton(BuildContext context) {
|
Row buildExpandableButton(BuildContext context) {
|
||||||
return Row(
|
return Row(
|
||||||
|
|
|
@ -1,29 +1,23 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
|
||||||
import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
|
|
||||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'package:hub/backend/schema/enums/enums.dart';
|
import 'package:hub/backend/schema/enums/enums.dart';
|
||||||
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
|
||||||
import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart';
|
import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart';
|
||||||
import 'package:hub/flutter_flow/custom_icons.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|
||||||
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';
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
|
||||||
|
|
||||||
class MenuStaggeredViewComponentWidget extends StatefulWidget {
|
class MenuStaggeredViewComponentWidget extends StatefulWidget {
|
||||||
const MenuStaggeredViewComponentWidget({
|
const MenuStaggeredViewComponentWidget(
|
||||||
super.key,
|
{super.key,
|
||||||
required this.changeMenuStyle,
|
required this.changeMenuStyle,
|
||||||
required this.expandable,
|
required this.expandable,
|
||||||
required this.item,
|
required this.item,
|
||||||
required this.options,
|
required this.options,
|
||||||
});
|
required this.isGrid});
|
||||||
|
|
||||||
final bool expandable;
|
final bool expandable;
|
||||||
final MenuItem item;
|
final MenuItem item;
|
||||||
|
final bool isGrid;
|
||||||
|
|
||||||
final List<MenuEntry> options;
|
final List<MenuEntry> options;
|
||||||
final Future Function()? changeMenuStyle;
|
final Future Function()? changeMenuStyle;
|
||||||
|
@ -58,46 +52,48 @@ class _MenuStaggeredViewComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Wrap(
|
return Column(
|
||||||
spacing: 0.0,
|
|
||||||
runSpacing: 0.0,
|
|
||||||
alignment: WrapAlignment.start,
|
|
||||||
crossAxisAlignment: WrapCrossAlignment.start,
|
|
||||||
direction: Axis.horizontal,
|
|
||||||
runAlignment: WrapAlignment.start,
|
|
||||||
verticalDirection: VerticalDirection.down,
|
|
||||||
clipBehavior: Clip.none,
|
|
||||||
children: [
|
children: [
|
||||||
Container(
|
GridView.builder(
|
||||||
width: double.infinity,
|
|
||||||
height: MediaQuery.sizeOf(context).height * 0.498,
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(14.0),
|
|
||||||
child: MasonryGridView.builder(
|
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
gridDelegate:
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
const SliverSimpleGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
),
|
|
||||||
crossAxisSpacing: 10.0,
|
crossAxisSpacing: 10.0,
|
||||||
mainAxisSpacing: 10.0,
|
mainAxisSpacing: 10.0,
|
||||||
itemCount: widget.options.length,
|
childAspectRatio: 1,
|
||||||
padding: const EdgeInsets.fromLTRB(
|
mainAxisExtent: 100,
|
||||||
0,
|
|
||||||
10.0,
|
|
||||||
0,
|
|
||||||
10.0,
|
|
||||||
),
|
),
|
||||||
|
itemCount: widget.options.length,
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return SizedBox(
|
return Container(
|
||||||
height: 100, width: 100, child: widget.options[index]);
|
height: MediaQuery.of(context).size.height,
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(0),
|
||||||
|
color: Colors.transparent,
|
||||||
|
boxShadow: const [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.transparent,
|
||||||
|
blurRadius: 4,
|
||||||
|
offset: Offset(0, 2),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Center(child: widget.options[index]),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
);
|
||||||
Align(
|
}
|
||||||
|
|
||||||
|
Widget collapseExpandMethod(BuildContext context) {
|
||||||
|
if (widget.isGrid == true) {
|
||||||
|
return Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
|
@ -147,8 +143,45 @@ class _MenuStaggeredViewComponentWidgetState
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Expand',
|
||||||
|
ptText: 'Expandir',
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).title1.override(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 12.0,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
fontStyle: FontStyle.normal,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
|
child: FlutterFlowIconButton(
|
||||||
|
borderColor: Colors.transparent,
|
||||||
|
borderRadius: 20.0,
|
||||||
|
borderWidth: 0.0,
|
||||||
|
buttonSize: 50.0,
|
||||||
|
fillColor: const Color(0x00FFFFFF),
|
||||||
|
icon: Icon(
|
||||||
|
Icons.keyboard_arrow_down_outlined,
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
await widget.changeMenuStyle?.call();
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,28 +1,24 @@
|
||||||
import 'dart:collection';
|
import 'dart:collection';
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:auto_size_text/auto_size_text.dart';
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.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';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'card_item_template_component_model.dart';
|
|
||||||
export 'card_item_template_component_model.dart';
|
|
||||||
|
|
||||||
///
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'card_item_template_component_model.dart';
|
||||||
|
|
||||||
|
export 'card_item_template_component_model.dart';
|
||||||
|
|
||||||
class CardItemTemplateComponentWidget extends StatefulWidget {
|
class CardItemTemplateComponentWidget extends StatefulWidget {
|
||||||
const CardItemTemplateComponentWidget({
|
const CardItemTemplateComponentWidget({
|
||||||
super.key,
|
Key? key,
|
||||||
required this.labelsHashMap,
|
required this.labelsHashMap,
|
||||||
required this.statusHashMap,
|
required this.statusHashMap,
|
||||||
required this.imagePath,
|
required this.imagePath,
|
||||||
required this.onTapCardItemAction,
|
required this.onTapCardItemAction,
|
||||||
});
|
}) : super(key: key);
|
||||||
|
|
||||||
final Map<String, String>? labelsHashMap;
|
final Map<String, String>? labelsHashMap;
|
||||||
final List<Map<String, Color>?> statusHashMap;
|
final List<Map<String, Color>?> statusHashMap;
|
||||||
|
@ -30,24 +26,24 @@ class CardItemTemplateComponentWidget extends StatefulWidget {
|
||||||
final Future Function()? onTapCardItemAction;
|
final Future Function()? onTapCardItemAction;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<CardItemTemplateComponentWidget> createState() => _CardItemTemplateComponentWidgetState();
|
State<CardItemTemplateComponentWidget> createState() =>
|
||||||
|
_CardItemTemplateComponentWidgetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateComponentWidget> {
|
class _CardItemTemplateComponentWidgetState
|
||||||
|
extends State<CardItemTemplateComponentWidget> {
|
||||||
late CardItemTemplateComponentModel _model;
|
late CardItemTemplateComponentModel _model;
|
||||||
LinkedHashMap<String, String> get labelsLinkedHashMap => LinkedHashMap.from(widget.labelsHashMap ?? {});
|
late LinkedHashMap<String, String> labelsLinkedHashMap;
|
||||||
List<LinkedHashMap<String, Color>> get statusLinkedHashMap => widget.statusHashMap.map((map) => LinkedHashMap<String, Color>.from(map ?? {})).toList();
|
late List<LinkedHashMap<String, Color>> statusLinkedHashMap;
|
||||||
|
|
||||||
@override
|
|
||||||
void setState(VoidCallback callback) {
|
|
||||||
super.setState(callback);
|
|
||||||
_model.onUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_model = createModel(context, () => CardItemTemplateComponentModel());
|
_model = createModel(context, () => CardItemTemplateComponentModel());
|
||||||
|
labelsLinkedHashMap = LinkedHashMap.from(widget.labelsHashMap ?? {});
|
||||||
|
statusLinkedHashMap = widget.statusHashMap
|
||||||
|
.map((map) => LinkedHashMap<String, Color>.from(map ?? {}))
|
||||||
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -61,13 +57,13 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _generateLabels() {
|
List<Widget> _generateLabels() {
|
||||||
List<Widget> labels = [];
|
return labelsLinkedHashMap.entries.map((entry) {
|
||||||
double width = MediaQuery.of(context).size.width;
|
final key = entry.key;
|
||||||
|
final text = entry.value.toString();
|
||||||
|
|
||||||
for (var key in labelsLinkedHashMap.keys) {
|
return Padding(
|
||||||
String text = labelsLinkedHashMap[key].toString();
|
padding: const EdgeInsets.symmetric(vertical: 2.0),
|
||||||
|
child: Row(
|
||||||
Widget widget = Row(
|
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
key,
|
key,
|
||||||
|
@ -75,13 +71,13 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
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(FlutterFlowTheme.of(context).bodyMediumFamily),
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2.5),
|
const SizedBox(width: 8),
|
||||||
SizedBox(
|
Expanded(
|
||||||
width: 225,
|
|
||||||
child: Text(
|
child: Text(
|
||||||
text,
|
text,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
|
@ -90,121 +86,119 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
fontSize: 12.5,
|
fontSize: 12.5,
|
||||||
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),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
}).toList();
|
||||||
labels.add(widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
return labels;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _generateImage() {
|
Widget _generateImage() {
|
||||||
return Container(
|
return ClipRRect(
|
||||||
width: 100,
|
|
||||||
height: 100,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
),
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
fadeInDuration: const Duration(milliseconds: 500),
|
fadeInDuration: const Duration(milliseconds: 500),
|
||||||
fadeOutDuration: const Duration(milliseconds: 500),
|
fadeOutDuration: const Duration(milliseconds: 500),
|
||||||
imageUrl: widget.imagePath ?? '',
|
imageUrl: widget.imagePath ?? '',
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
width: 90,
|
||||||
|
height: 90,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _generateStatus() {
|
List<Widget> _generateStatus() {
|
||||||
List<Widget> status = [];
|
return statusLinkedHashMap.expand((statusLinked) {
|
||||||
|
return statusLinked.entries.map((entry) {
|
||||||
|
final text = entry.key;
|
||||||
|
final color = entry.value;
|
||||||
|
|
||||||
statusLinkedHashMap.expand((statusLinked) {
|
return Container(
|
||||||
statusLinked.forEach((text, color) {
|
|
||||||
Widget widget = Container(
|
|
||||||
padding: const EdgeInsets.all(5),
|
padding: const EdgeInsets.all(5),
|
||||||
|
width: MediaQuery.of(context).size.width * 0.25,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: color,
|
color: color,
|
||||||
borderRadius: BorderRadius.circular(5)
|
borderRadius: BorderRadius.circular(5),
|
||||||
),
|
),
|
||||||
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
text,
|
text,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: FlutterFlowTheme.of(context).info,
|
color: FlutterFlowTheme.of(context).info,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
fontWeight: FontWeight.bold
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
status.add(widget);
|
|
||||||
});
|
|
||||||
|
|
||||||
return [];
|
|
||||||
}).toList();
|
}).toList();
|
||||||
|
}).toList();
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _smallScreen() {
|
Widget _buildContent() {
|
||||||
return Column(
|
return LayoutBuilder(
|
||||||
mainAxisSize: MainAxisSize.max,
|
builder: (context, constraints) {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
if (constraints.maxWidth > 360) {
|
||||||
children: [
|
|
||||||
_generateImage(),
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
..._generateLabels(),
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
Wrap(
|
|
||||||
spacing: 8,
|
|
||||||
runSpacing: 8,
|
|
||||||
children: _generateStatus(),
|
|
||||||
)
|
|
||||||
]
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _largeScreen() {
|
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Expanded(
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
..._generateLabels(),
|
..._generateLabels(),
|
||||||
const SizedBox(height: 5),
|
|
||||||
Wrap(
|
Wrap(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
runSpacing: 8,
|
runSpacing: 4,
|
||||||
children: _generateStatus(),
|
children: _generateStatus(),
|
||||||
)
|
|
||||||
]
|
|
||||||
),
|
),
|
||||||
_generateImage()
|
]
|
||||||
],
|
.addToEnd(const SizedBox(height: 5))
|
||||||
|
.divide(const SizedBox(height: 1))
|
||||||
|
.addToStart(const SizedBox(height: 5)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_generateImage(),
|
||||||
|
]
|
||||||
|
.addToEnd(const SizedBox(width: 10))
|
||||||
|
.addToStart(const SizedBox(width: 10)),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
_generateImage(),
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
..._generateLabels(),
|
||||||
|
Wrap(
|
||||||
|
spacing: 8,
|
||||||
|
runSpacing: 4,
|
||||||
|
children: _generateStatus(),
|
||||||
|
),
|
||||||
|
].divide(const SizedBox(height: 5)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(const SizedBox(height: 5)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double screenWidth = MediaQuery.of(context).size.width;
|
|
||||||
double screenHeight = MediaQuery.of(context).size.height;
|
|
||||||
|
|
||||||
context.watch<AppState>();
|
context.watch<AppState>();
|
||||||
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
|
@ -222,20 +216,7 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
child: Container(
|
child: _buildContent(),
|
||||||
width: double.infinity,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
),
|
|
||||||
padding: const EdgeInsets.all(8),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
screenWidth > 360 ? _largeScreen() : _smallScreen(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
import 'package:hub/backend/api_requests/api_manager.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|
||||||
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart';
|
import 'package:hub/backend/api_requests/api_manager.dart';
|
||||||
|
import 'package:hub/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart';
|
||||||
import '../../flutter_flow/internationalization.dart';
|
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||||
|
import 'package:hub/flutter_flow/internationalization.dart';
|
||||||
|
|
||||||
class ScheduleProvisionalVisitPageModel
|
class ScheduleProvisionalVisitPageModel
|
||||||
extends FlutterFlowModel<ScheduleProvisionalVisitPageWidget> {
|
extends FlutterFlowModel<ScheduleProvisionalVisitPageWidget> {
|
File diff suppressed because it is too large
Load Diff
|
@ -1,21 +1,21 @@
|
||||||
|
import 'package:easy_debounce/easy_debounce.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
|
import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
|
||||||
import 'package:hub/shared/components/atoms/atom_terms_of_use.dart';
|
import 'package:hub/shared/components/atoms/atom_terms_of_use.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.dart';
|
import 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
|
||||||
|
import '/actions/actions.dart' as action_blocks;
|
||||||
import '/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart';
|
import '/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart';
|
||||||
import '/flutter_flow/flutter_flow_animations.dart';
|
import '/flutter_flow/flutter_flow_animations.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import '/actions/actions.dart' as action_blocks;
|
|
||||||
import 'package:easy_debounce/easy_debounce.dart';
|
|
||||||
import 'package:flutter/gestures.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'sign_in_template_component_model.dart';
|
import 'sign_in_template_component_model.dart';
|
||||||
|
|
||||||
export 'sign_in_template_component_model.dart';
|
export 'sign_in_template_component_model.dart';
|
||||||
|
|
||||||
class SignInTemplateComponentWidget extends StatefulWidget {
|
class SignInTemplateComponentWidget extends StatefulWidget {
|
||||||
|
@ -869,8 +869,6 @@ class _SignInTemplateComponentWidgetState
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
||||||
// 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),
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
|
import 'package:easy_debounce/easy_debounce.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
|
import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
|
||||||
import 'package:hub/shared/components/atoms/atom_terms_of_use.dart';
|
import 'package:hub/shared/components/atoms/atom_terms_of_use.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.dart';
|
import 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '/actions/actions.dart' as action_blocks;
|
||||||
import '/flutter_flow/flutter_flow_animations.dart';
|
import '/flutter_flow/flutter_flow_animations.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import '/actions/actions.dart' as action_blocks;
|
|
||||||
import 'package:easy_debounce/easy_debounce.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
import 'sign_up_template_component_model.dart';
|
import 'sign_up_template_component_model.dart';
|
||||||
|
|
||||||
export 'sign_up_template_component_model.dart';
|
export 'sign_up_template_component_model.dart';
|
||||||
|
|
||||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||||
|
@ -101,8 +101,10 @@ class _SignUpTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double screenWidth = MediaQuery.of(context).size.width;
|
final MediaQueryData mediaQuery = MediaQuery.of(context);
|
||||||
double screenHeight = MediaQuery.of(context).size.height;
|
final double screenWidth = mediaQuery.size.width;
|
||||||
|
final double screenHeight = mediaQuery.size.height;
|
||||||
|
|
||||||
bool _isFormInvalid() {
|
bool _isFormInvalid() {
|
||||||
if (_model.nameRegisterFormTextController.text == '' ||
|
if (_model.nameRegisterFormTextController.text == '' ||
|
||||||
_model.emailRegisterFormTextController.text == '' ||
|
_model.emailRegisterFormTextController.text == '' ||
|
||||||
|
@ -233,7 +235,7 @@ class _SignUpTemplateComponentWidgetState
|
||||||
Form(
|
Form(
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode:
|
autovalidateMode:
|
||||||
AutovalidateMode.onUserInteraction,
|
AutovalidateMode.always,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -2,13 +2,13 @@ import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
import 'package:hub/pages/delivery_schedule_page/delivery_schedule_widget.dart';
|
||||||
import 'package:hub/pages/fast_pass_page/fast_pass_page_widget.dart';
|
import 'package:hub/pages/fast_pass_page/fast_pass_page_widget.dart';
|
||||||
import 'package:hub/pages/message_history_page/message_history_page_widget.dart';
|
import 'package:hub/pages/message_history_page/message_history_page_widget.dart';
|
||||||
import 'package:hub/pages/no_connection_page/no_connection_page.dart';
|
|
||||||
import 'package:hub/pages/package_order_page/package_order_page.dart';
|
import 'package:hub/pages/package_order_page/package_order_page.dart';
|
||||||
import 'package:hub/pages/reservation_page/reservation_page_widget.dart';
|
import 'package:hub/pages/provisional_schedule_page/provisional_schedule_widget.dart';
|
||||||
import 'package:hub/pages/preferences_settings_page/preferences_settings_widget.dart';
|
|
||||||
import 'package:hub/pages/reception_page/reception_page_widget.dart';
|
import 'package:hub/pages/reception_page/reception_page_widget.dart';
|
||||||
|
import 'package:hub/pages/reservation_page/reservation_page_widget.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '/backend/schema/structs/index.dart';
|
import '/backend/schema/structs/index.dart';
|
||||||
|
@ -72,7 +72,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
||||||
name: '_initialize',
|
name: '_initialize',
|
||||||
path: '/',
|
path: '/',
|
||||||
builder: (context, _) => AppState().isLogged
|
builder: (context, _) => AppState().isLogged
|
||||||
? AppState().haveLocal
|
? AppState().haveLocal == true
|
||||||
? const HomePageWidget()
|
? const HomePageWidget()
|
||||||
: const ReceptionPageWidget()
|
: const ReceptionPageWidget()
|
||||||
: const WelcomePageWidget(),
|
: const WelcomePageWidget(),
|
||||||
|
@ -112,10 +112,14 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
FFRoute(
|
FFRoute(
|
||||||
name: 'scheduleProvisionalVisitPage',
|
name: 'deliverySchedule',
|
||||||
path: '/scheduleProvisionalVisitPage',
|
path: '/deliverySchedule',
|
||||||
builder: (context, params) =>
|
builder: (context, params) => const DeliverySchedule(),
|
||||||
const ScheduleProvisionalVisitPageWidget(),
|
),
|
||||||
|
FFRoute(
|
||||||
|
name: 'provisionalSchedule',
|
||||||
|
path: '/provisionalSchedule',
|
||||||
|
builder: (context, params) => const ProvisionalSchedule(),
|
||||||
),
|
),
|
||||||
FFRoute(
|
FFRoute(
|
||||||
name: 'fastPassPage',
|
name: 'fastPassPage',
|
||||||
|
|
|
@ -1,27 +1,17 @@
|
||||||
export '/pages/home_page/home_page_widget.dart' show HomePageWidget;
|
|
||||||
|
|
||||||
export '/pages/register_visitor_page/register_visitor_page_widget.dart'
|
|
||||||
show RegisterVisitorPageWidget;
|
|
||||||
|
|
||||||
export '/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart'
|
|
||||||
show ScheduleCompleteVisitPageWidget;
|
|
||||||
|
|
||||||
export '/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart'
|
|
||||||
show ScheduleProvisionalVisitPageWidget;
|
|
||||||
|
|
||||||
export '/pages/people_on_the_property_page/people_on_the_property_page_widget.dart'
|
|
||||||
show PeopleOnThePropertyPageWidget;
|
|
||||||
|
|
||||||
export '/pages/acess_history_page/acess_history_page_widget.dart'
|
export '/pages/acess_history_page/acess_history_page_widget.dart'
|
||||||
show AcessHistoryPageWidget;
|
show AcessHistoryPageWidget;
|
||||||
|
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'
|
||||||
export '/pages/sign_in_page/sign_in_page_widget.dart' show SignInPageWidget;
|
show PeopleOnThePropertyPageWidget;
|
||||||
|
export '/pages/preferences_settings_page/preferences_settings_widget.dart'
|
||||||
export '/pages/sign_up_page/sign_up_page_widget.dart' show SignUpPageWidget;
|
show PreferencesPageWidget;
|
||||||
|
|
||||||
export '/pages/welcome_page/welcome_page_widget.dart' show WelcomePageWidget;
|
|
||||||
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/preferences_settings_page/preferences_settings_widget.dart' show PreferencesPageWidget;
|
export '/pages/register_visitor_page/register_visitor_page_widget.dart'
|
||||||
|
show RegisterVisitorPageWidget;
|
||||||
|
export '/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart'
|
||||||
|
show ScheduleCompleteVisitPageWidget;
|
||||||
|
export '/pages/sign_in_page/sign_in_page_widget.dart' show SignInPageWidget;
|
||||||
|
export '/pages/sign_up_page/sign_up_page_widget.dart' show SignUpPageWidget;
|
||||||
|
export '/pages/welcome_page/welcome_page_widget.dart' show WelcomePageWidget;
|
||||||
|
|
|
@ -90,6 +90,7 @@ class _AppState extends State<App> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
log("haveLocals: ${AppState().haveLocal}");
|
||||||
return MultiProvider(
|
return MultiProvider(
|
||||||
providers: [
|
providers: [
|
||||||
ChangeNotifierProvider(create: (_) => AppState()),
|
ChangeNotifierProvider(create: (_) => AppState()),
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
|
|
||||||
|
|
||||||
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/molecular_components/message_opt_modal/opt_modal_widget.dart';
|
import 'package:hub/components/molecular_components/message_opt_modal/opt_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:hub/flutter_flow/request_manager.dart';
|
import 'package:hub/flutter_flow/request_manager.dart';
|
||||||
import 'package:hub/pages/acess_history_page/acess_history_page_widget.dart';
|
import 'package:hub/pages/acess_history_page/acess_history_page_widget.dart';
|
||||||
import 'package:hub/pages/liberation_history/liberation_history_model.dart';
|
|
||||||
|
|
||||||
class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
||||||
final unfocusNode = FocusNode();
|
final unfocusNode = FocusNode();
|
||||||
|
|
|
@ -1,21 +1,14 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/app_state.dart';
|
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
import 'package:hub/backend/api_requests/api_manager.dart';
|
|
||||||
import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_widget.dart';
|
import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_widget.dart';
|
||||||
import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
|
import 'package:hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
|
||||||
|
|
||||||
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';
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
|
||||||
import 'package:hub/pages/acess_history_page/acess_history_page_model.dart';
|
import 'package:hub/pages/acess_history_page/acess_history_page_model.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:hub/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart';
|
||||||
|
import 'package:hub/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
|
||||||
|
class DeliverySchedule extends StatefulWidget {
|
||||||
|
const DeliverySchedule({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DeliverySchedule> createState() => _DeliveryScheduleState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DeliveryScheduleState extends State<DeliverySchedule> {
|
||||||
|
late ScheduleProvisionalVisitPageModel _model;
|
||||||
|
|
||||||
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_model = createModel(context, () => ScheduleProvisionalVisitPageModel());
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_model.dispose();
|
||||||
|
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
context.watch<AppState>();
|
||||||
|
return Scaffold(
|
||||||
|
key: scaffoldKey,
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
appBar: AppBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
forceMaterialTransparency: true,
|
||||||
|
leading: FlutterFlowIconButton(
|
||||||
|
borderColor: Colors.transparent,
|
||||||
|
borderRadius: 30.0,
|
||||||
|
borderWidth: 1.0,
|
||||||
|
buttonSize: 60.0,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.keyboard_arrow_left,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
size: 30.0,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Delivery Schedule',
|
||||||
|
ptText: 'Agendar Entregas',
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 15.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: const [],
|
||||||
|
centerTitle: true,
|
||||||
|
elevation: 0.0,
|
||||||
|
),
|
||||||
|
body: const SafeArea(
|
||||||
|
top: true, child: ScheduleProvisionalVisitPageWidget()));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +1,10 @@
|
||||||
import 'package:hub/app_state.dart';
|
import 'dart:io' show Platform;
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||||
|
import 'package:hub/app_state.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
import 'package:url_launcher/url_launcher_string.dart';
|
||||||
import 'package:webview_flutter/webview_flutter.dart';
|
import 'package:webview_flutter/webview_flutter.dart';
|
||||||
import 'dart:io' show Platform;
|
|
||||||
|
|
||||||
class FastPassPageWidget extends StatefulWidget {
|
class FastPassPageWidget extends StatefulWidget {
|
||||||
final String freToken = AppState().userUUID;
|
final String freToken = AppState().userUUID;
|
||||||
|
@ -54,9 +55,20 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
||||||
_controllerIOS = controller;
|
_controllerIOS = controller;
|
||||||
},
|
},
|
||||||
onLoadStop: (controller, url) async {
|
onLoadStop: (controller, url) async {
|
||||||
await controller.evaluateJavascript(source: "window.localStorage.setItem('fre-token', '\"${widget.freToken}\"')");
|
await controller.evaluateJavascript(
|
||||||
await controller.evaluateJavascript(source: "window.localStorage.setItem('fre-user-data', '${widget.freUserData}')");
|
source:
|
||||||
await controller.evaluateJavascript(source: "window.localStorage.setItem('enableBackButton', 'true')");
|
"window.localStorage.setItem('fre-token', '\"${widget.freToken}\"')");
|
||||||
|
await controller.evaluateJavascript(
|
||||||
|
source:
|
||||||
|
"window.localStorage.setItem('fre-user-data', '${widget.freUserData}')");
|
||||||
|
await controller.evaluateJavascript(
|
||||||
|
source:
|
||||||
|
"window.localStorage.setItem('enableBackButton', 'true')");
|
||||||
|
},
|
||||||
|
onUpdateVisitedHistory: (controller, uri, isVisited) {
|
||||||
|
if (uri.toString().contains('/hub/home')) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: WebViewWidget(
|
: WebViewWidget(
|
||||||
|
@ -69,9 +81,12 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
||||||
NavigationDelegate(
|
NavigationDelegate(
|
||||||
onProgress: (int progress) {},
|
onProgress: (int progress) {},
|
||||||
onPageStarted: (String url) {
|
onPageStarted: (String url) {
|
||||||
final String token = "localStorage.setItem('fre-token', '\"${widget.freToken}\"');";
|
final String token =
|
||||||
final String data = "localStorage.setItem('fre-user-data', '${widget.freUserData}');";
|
"localStorage.setItem('fre-token', '\"${widget.freToken}\"');";
|
||||||
const String backNavigation = "localStorage.setItem('enableBackButton', 'true');";
|
final String data =
|
||||||
|
"localStorage.setItem('fre-user-data', '${widget.freUserData}');";
|
||||||
|
const String backNavigation =
|
||||||
|
"localStorage.setItem('enableBackButton', 'true');";
|
||||||
|
|
||||||
_controllerAll.runJavaScript(token);
|
_controllerAll.runJavaScript(token);
|
||||||
_controllerAll.runJavaScript(data);
|
_controllerAll.runJavaScript(data);
|
||||||
|
@ -79,15 +94,19 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
||||||
},
|
},
|
||||||
onNavigationRequest: (NavigationRequest request) {
|
onNavigationRequest: (NavigationRequest request) {
|
||||||
if (request.url.startsWith('http') ||
|
if (request.url.startsWith('http') ||
|
||||||
request.url
|
request.url.startsWith(
|
||||||
.startsWith('https://api.whatsapp.com/send') ||
|
'https://api.whatsapp.com/send') ||
|
||||||
request.url.startsWith('https://wa.me')) {
|
request.url.startsWith('https://wa.me')) {
|
||||||
launchUrlString(request.url);
|
launchUrlString(request.url);
|
||||||
return NavigationDecision.prevent;
|
return NavigationDecision.prevent;
|
||||||
}
|
}
|
||||||
return NavigationDecision.prevent;
|
return NavigationDecision.prevent;
|
||||||
},
|
},
|
||||||
),
|
onUrlChange: (url) {
|
||||||
|
if (url.url.toString().contains('/hub/home')) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
..loadRequest(Uri.parse(url)),
|
..loadRequest(Uri.parse(url)),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'dart:developer';
|
||||||
|
|
||||||
|
import 'package:flutter/gestures.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';
|
||||||
import 'package:hub/actions/actions.dart';
|
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
import 'package:hub/backend/notifications/firebase_messaging_service.dart';
|
import 'package:hub/backend/notifications/firebase_messaging_service.dart';
|
||||||
import 'package:hub/backend/schema/enums/enums.dart';
|
import 'package:hub/backend/schema/enums/enums.dart';
|
||||||
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/components/organism_components/local_profile_component/local_profile_component_widget.dart';
|
import 'package:hub/components/organism_components/local_profile_component/local_profile_component_widget.dart';
|
||||||
import 'package:hub/components/organism_components/menu_component/menu_component_widget.dart';
|
import 'package:hub/components/organism_components/menu_component/menu_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/custom_functions.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
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';
|
||||||
import 'package:hub/pages/home_page/home_page_model.dart';
|
import 'package:hub/pages/home_page/home_page_model.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
import 'package:hub/shared/widgets/drawer_widget/drawer_widget.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class HomePageWidget extends StatefulWidget {
|
class HomePageWidget extends StatefulWidget {
|
||||||
|
@ -25,29 +26,12 @@ class HomePageWidget extends StatefulWidget {
|
||||||
|
|
||||||
class _HomePageWidgetState extends State<HomePageWidget> {
|
class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
late HomePageModel _model;
|
late HomePageModel _model;
|
||||||
bool localStatus = false;
|
|
||||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
LocalProfileComponentWidget _localProfileComponentWidget =
|
||||||
|
const LocalProfileComponentWidget();
|
||||||
|
|
||||||
Future<void> checkLocalStatus() async {
|
Future<void> checkData() async {
|
||||||
localStatus = await checkLocals(
|
try {
|
||||||
context: context,
|
|
||||||
model: _model,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_model = createModel(context, () => HomePageModel());
|
|
||||||
|
|
||||||
AppState().context = context;
|
|
||||||
|
|
||||||
() async {
|
|
||||||
await FirebaseMessagingService().updateDeviceToken();
|
|
||||||
}();
|
|
||||||
void fetchData() async {
|
|
||||||
bool success = false;
|
|
||||||
while (!success) {
|
|
||||||
final response = await PhpGroup.getDadosCall.call(
|
final response = await PhpGroup.getDadosCall.call(
|
||||||
devUUID: AppState().devUUID,
|
devUUID: AppState().devUUID,
|
||||||
userUUID: AppState().userUUID,
|
userUUID: AppState().userUUID,
|
||||||
|
@ -55,48 +39,84 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
atividade: 'getDados',
|
atividade: 'getDados',
|
||||||
);
|
);
|
||||||
|
|
||||||
switch (response.statusCode) {
|
if (response.statusCode == 200) {
|
||||||
case 200:
|
|
||||||
if (response.jsonBody['error'] == false) {
|
if (response.jsonBody['error'] == false) {
|
||||||
success = true;
|
|
||||||
AppState().whatsapp = response.jsonBody['whatsapp'];
|
AppState().whatsapp = response.jsonBody['whatsapp'];
|
||||||
AppState().provisional = response.jsonBody['provisional'];
|
AppState().provisional = response.jsonBody['provisional'];
|
||||||
}
|
AppState().name = response.jsonBody['visitado']['VDO_NOME'];
|
||||||
break;
|
safeSetState(() {});
|
||||||
default:
|
} else {
|
||||||
await DialogUtil.warningDefault(context);
|
final errorMsg = response.jsonBody['error_msg'];
|
||||||
|
if (errorMsg !=
|
||||||
|
r'''Usuario nao possui vinculo ativo com esse condominio''') {
|
||||||
|
log(errorMsg);
|
||||||
|
await DialogUtil.warningDefault(context)
|
||||||
|
.whenComplete(() => checkData());
|
||||||
safeSetState(() {});
|
safeSetState(() {});
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
await DialogUtil.warningDefault(context)
|
||||||
|
.whenComplete(() => checkData());
|
||||||
|
safeSetState(() {});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log('Error in checkData: $e');
|
||||||
|
await DialogUtil.warningDefault(context).whenComplete(() => checkData());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchData();
|
Future<void> checkLocal() async {
|
||||||
|
try {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
final response = await PhpGroup.getLocalsCall.call(
|
||||||
localStatus = await checkLocals(
|
devUUID: AppState().devUUID,
|
||||||
context: context,
|
userUUID: AppState().userUUID,
|
||||||
model: _model,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
List<dynamic> locals = response.jsonBody['locais'] ?? [];
|
||||||
|
final activeLocals =
|
||||||
|
locals.where((local) => local['CLU_STATUS'] == 'A').toList();
|
||||||
|
|
||||||
|
if (activeLocals.isEmpty || AppState().cliUUID.isEmpty) {
|
||||||
|
await showBottomSheet().then((_) => checkData());
|
||||||
|
}
|
||||||
if (AppState().cliUUID.isEmpty) {
|
if (AppState().cliUUID.isEmpty) {
|
||||||
showModalBottomSheet(
|
await showBottomSheet().then((_) => checkData());
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log('Error in checkLocal: $e');
|
||||||
|
await showBottomSheet().then((_) => checkData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> showBottomSheet() async {
|
||||||
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
enableDrag: false,
|
enableDrag: false,
|
||||||
isDismissible: false,
|
isDismissible: false,
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) => Padding(
|
||||||
return Padding(
|
|
||||||
padding: MediaQuery.viewInsetsOf(context),
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
child: const BottomArrowLinkedLocalsComponentWidget(),
|
child: const BottomArrowLinkedLocalsComponentWidget(),
|
||||||
);
|
),
|
||||||
},
|
).then((_) => safeSetState(() {
|
||||||
).then((value) => safeSetState(() {}));
|
_localProfileComponentWidget = const LocalProfileComponentWidget();
|
||||||
} else {
|
}));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
_model = createModel(context, () => HomePageModel());
|
||||||
|
|
||||||
|
AppState().context = context;
|
||||||
|
|
||||||
|
() async {
|
||||||
|
await checkLocal();
|
||||||
|
await FirebaseMessagingService().updateDeviceToken();
|
||||||
|
}();
|
||||||
|
|
||||||
_model.textController ??= TextEditingController();
|
_model.textController ??= TextEditingController();
|
||||||
_model.textFieldFocusNode ??= FocusNode();
|
_model.textFieldFocusNode ??= FocusNode();
|
||||||
|
@ -118,14 +138,63 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
: FocusScope.of(context).unfocus(),
|
: FocusScope.of(context).unfocus(),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
key: scaffoldKey,
|
key: scaffoldKey,
|
||||||
backgroundColor: FlutterFlowTheme.of(context).secondaryBackground,
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
drawer: buildDrawer(context),
|
// drawer: buildDrawer(context),
|
||||||
body: buildPage(context, localStatus),
|
drawerEnableOpenDragGesture: true,
|
||||||
|
drawerDragStartBehavior: DragStartBehavior.start,
|
||||||
|
drawer: CustomDrawer(model: _model),
|
||||||
|
appBar: AppBar(
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
leading: FlutterFlowIconButton(
|
||||||
|
borderRadius: 20.0,
|
||||||
|
borderWidth: 1.0,
|
||||||
|
buttonSize: 40.0,
|
||||||
|
fillColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.menu_rounded,
|
||||||
|
color: Colors.white,
|
||||||
|
size: 28.0,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
scaffoldKey.currentState!.openDrawer();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
title: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/logo.png',
|
||||||
|
width: 15.0,
|
||||||
|
height: 15.0,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'FRE ACCESS',
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
color: FlutterFlowTheme.of(context).info,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
|
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(const SizedBox(width: 8.0)),
|
||||||
|
),
|
||||||
|
actions: const [],
|
||||||
|
centerTitle: true,
|
||||||
|
elevation: 0.0,
|
||||||
|
),
|
||||||
|
body: buildPage(context),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Container buildPage(BuildContext context, bool localStatus) {
|
Container buildPage(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
@ -145,8 +214,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
verticalDirection: VerticalDirection.down,
|
verticalDirection: VerticalDirection.down,
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
createHeader(context),
|
createLocal(),
|
||||||
createLocal(localStatus),
|
|
||||||
createBody(),
|
createBody(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -156,18 +224,10 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Wrap createBody() {
|
Widget createBody() {
|
||||||
return Wrap(
|
return Container(
|
||||||
spacing: 0.0,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
runSpacing: 0.0,
|
child: wrapWithModel(
|
||||||
alignment: WrapAlignment.start,
|
|
||||||
crossAxisAlignment: WrapCrossAlignment.start,
|
|
||||||
direction: Axis.horizontal,
|
|
||||||
runAlignment: WrapAlignment.start,
|
|
||||||
verticalDirection: VerticalDirection.down,
|
|
||||||
clipBehavior: Clip.none,
|
|
||||||
children: [
|
|
||||||
wrapWithModel(
|
|
||||||
model: _model.menuComponentModel,
|
model: _model.menuComponentModel,
|
||||||
updateCallback: () => setState(() {}),
|
updateCallback: () => setState(() {}),
|
||||||
child: const MenuComponentWidget(
|
child: const MenuComponentWidget(
|
||||||
|
@ -176,366 +236,14 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
||||||
item: MenuItem.button,
|
item: MenuItem.button,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Align(
|
|
||||||
// alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
// child: Provider<MessageWellNotifier>(
|
|
||||||
// create: (_) => MessageWellNotifier(),
|
|
||||||
// child: wrapWithModel(
|
|
||||||
// model: _model.messageWellComponentModel,
|
|
||||||
// updateCallback: () => setState(() {}),
|
|
||||||
// child: const MessageWellComponentWidget(),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
//footer
|
|
||||||
const SizedBox(
|
|
||||||
height: 100,
|
|
||||||
width: double.infinity,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget createLocal(bool localStatus) {
|
Widget createLocal() {
|
||||||
return wrapWithModel(
|
return wrapWithModel(
|
||||||
model: _model.localComponentModel,
|
model: _model.localComponentModel,
|
||||||
updateCallback: () => safeSetState(() {}),
|
updateCallback: () => safeSetState(() {}),
|
||||||
child: LocalProfileComponentWidget(
|
child: _localProfileComponentWidget,
|
||||||
localStatus: localStatus,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Row createHeader(BuildContext context) {
|
|
||||||
return Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
width: 100.0,
|
|
||||||
height: 100.0,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Color(0xFF1AAB5F),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
|
||||||
child: Container(
|
|
||||||
height: 50.0,
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
child: Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: [
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
10.0, 0.0, 0.0, 0.0),
|
|
||||||
child: FlutterFlowIconButton(
|
|
||||||
borderRadius: 20.0,
|
|
||||||
borderWidth: 1.0,
|
|
||||||
buttonSize: 40.0,
|
|
||||||
fillColor: FlutterFlowTheme.of(context).primary,
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.menu_rounded,
|
|
||||||
color: Colors.white,
|
|
||||||
size: 28.0,
|
|
||||||
),
|
|
||||||
onPressed: () async {
|
|
||||||
scaffoldKey.currentState!.openDrawer();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
60.0, 15.0, 0.0, 0.0),
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/images/logo.png',
|
|
||||||
width: 50.0,
|
|
||||||
height: 200.0,
|
|
||||||
fit: BoxFit.none,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Align(
|
|
||||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
0.0, 15.0, 0.0, 0.0),
|
|
||||||
child: Text(
|
|
||||||
'FRE ACCESS',
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
color: FlutterFlowTheme.of(context).info,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// Align(
|
|
||||||
// alignment: const AlignmentDirectional(0.0, 1.0),
|
|
||||||
// child: Container(
|
|
||||||
// width: 100.0,
|
|
||||||
// height: 50.0,
|
|
||||||
// decoration: const BoxDecoration(),
|
|
||||||
// child: Align(
|
|
||||||
// alignment: const AlignmentDirectional(1.0, 1.0),
|
|
||||||
// child: FlutterFlowIconButton(
|
|
||||||
// borderRadius: 20.0,
|
|
||||||
// borderWidth: 1.0,
|
|
||||||
// buttonSize: 40.0,
|
|
||||||
// icon: Icon(
|
|
||||||
// Icons.notifications_sharp,
|
|
||||||
// color: FlutterFlowTheme.of(context).info,
|
|
||||||
// size: 24.0,
|
|
||||||
// ),
|
|
||||||
// onPressed: () {},
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
SizedBox buildDrawer(BuildContext context) {
|
|
||||||
return SizedBox(
|
|
||||||
width: MediaQuery.of(context).size.width * 0.8,
|
|
||||||
child: Drawer(
|
|
||||||
elevation: 16.0,
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
||||||
shape: BoxShape.rectangle,
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: double.infinity,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(5.0),
|
|
||||||
bottomRight: Radius.circular(5.0),
|
|
||||||
topLeft: Radius.circular(0.0),
|
|
||||||
topRight: Radius.circular(0.0),
|
|
||||||
),
|
|
||||||
shape: BoxShape.rectangle,
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(30, 30, 10, 0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Flexible(
|
|
||||||
child: Container(
|
|
||||||
width: double.infinity,
|
|
||||||
decoration: const BoxDecoration(),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 50.0,
|
|
||||||
height: 50.0,
|
|
||||||
clipBehavior: Clip.antiAlias,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
),
|
|
||||||
child: CachedNetworkImage(
|
|
||||||
imageUrl: valueOrDefault(
|
|
||||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
|
||||||
'assets/images/error_image.svg'),
|
|
||||||
width: 80.0,
|
|
||||||
height: 80.0,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
alignment: const Alignment(0.0, 0.0),
|
|
||||||
placeholder: (context, url) =>
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/error_image.svg'),
|
|
||||||
errorListener: (_) => Image.asset(
|
|
||||||
'assets/images/error_image.svg'),
|
|
||||||
errorWidget: (_, __, ___) => Image.asset(
|
|
||||||
'assets/images/error_image.svg'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 150.0,
|
|
||||||
child: Text(
|
|
||||||
valueOrDefault<String>(
|
|
||||||
convertToUppercase(AppState().local),
|
|
||||||
'NOME DO LOCAL',
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyLarge
|
|
||||||
.override(
|
|
||||||
fontFamily: 'Nunito Sans',
|
|
||||||
color: FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 14.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey('Nunito Sans'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
].divide(const SizedBox(width: 20.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.divide(const SizedBox(width: 0.0))
|
|
||||||
.around(const SizedBox(width: 0.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
].addToStart(const SizedBox(height: 30.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Flexible(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
||||||
8.0, 0.0, 8.0, 0.0),
|
|
||||||
child: TextFormField(
|
|
||||||
controller: _model.textController,
|
|
||||||
focusNode: _model.textFieldFocusNode,
|
|
||||||
autofocus: false,
|
|
||||||
obscureText: false,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
isDense: true,
|
|
||||||
labelStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).primaryText,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
alignLabelWithHint: false,
|
|
||||||
hintStyle: FlutterFlowTheme.of(context)
|
|
||||||
.labelMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey(FlutterFlowTheme.of(context)
|
|
||||||
.labelMediumFamily),
|
|
||||||
),
|
|
||||||
enabledBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context).customColor1,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(2.0),
|
|
||||||
),
|
|
||||||
focusedBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(2.0),
|
|
||||||
),
|
|
||||||
errorBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(2.0),
|
|
||||||
),
|
|
||||||
focusedErrorBorder: UnderlineInputBorder(
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: FlutterFlowTheme.of(context).error,
|
|
||||||
width: 0.5,
|
|
||||||
),
|
|
||||||
borderRadius: BorderRadius.circular(2.0),
|
|
||||||
),
|
|
||||||
prefixIcon: const Icon(
|
|
||||||
Icons.search_sharp,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
validator: _model.textControllerValidator
|
|
||||||
.asValidator(context),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
.addToStart(const SizedBox(width: 30.0))
|
|
||||||
.addToEnd(const SizedBox(width: 30.0)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: wrapWithModel(
|
|
||||||
model: _model.menuComponentModel,
|
|
||||||
updateCallback: () => setState(() {}),
|
|
||||||
child: const MenuComponentWidget(
|
|
||||||
expandable: false,
|
|
||||||
style: MenuView.list,
|
|
||||||
item: MenuItem.tile,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,8 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 17.0,
|
fontSize: 15.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
import 'dart:developer';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/app_state.dart';
|
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
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';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import 'package:hub/pages/message_history_page/message_history_page_model.dart';
|
import 'package:hub/pages/message_history_page/message_history_page_model.dart';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -177,7 +171,8 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 17.0,
|
fontSize: 15.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,21 +1,15 @@
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
|
||||||
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
|
||||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
|
||||||
import 'package:hub/pages/people_on_the_property_page/people_on_the_property_page_model.dart';
|
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
import 'package:hub/pages/people_on_the_property_page/people_on_the_property_page_model.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../../shared/utils/dialog_util.dart';
|
|
||||||
import '../../shared/utils/log_util.dart';
|
import '../../shared/utils/log_util.dart';
|
||||||
|
|
||||||
class PeopleOnThePropertyPageWidget extends StatefulWidget {
|
class PeopleOnThePropertyPageWidget extends StatefulWidget {
|
||||||
|
|
|
@ -313,8 +313,7 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
AppState().deleteCliUUID();
|
AppState().deleteCliUUID();
|
||||||
AppState().deleteLocal();
|
AppState().deleteLocal();
|
||||||
AppState().deleteOwnerUUID();
|
AppState().deleteOwnerUUID();
|
||||||
// Navigator.pop(context);
|
|
||||||
// Navigator.pop(context, true);
|
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'homePage',
|
'homePage',
|
||||||
extra: <String, dynamic>{
|
extra: <String, dynamic>{
|
||||||
|
|
|
@ -48,7 +48,7 @@ class PreferencesPageWidget extends StatelessWidget {
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: 'Nunito',
|
fontFamily: 'Nunito',
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 17.0,
|
fontSize: 15.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
),
|
),
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:hub/components/templates_components/provisional_schedule_template/provisional_schedule_template_model.dart';
|
||||||
|
import 'package:hub/components/templates_components/provisional_schedule_template/provisional_shcedule_template_widget.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
|
||||||
|
class ProvisionalSchedule extends StatefulWidget {
|
||||||
|
const ProvisionalSchedule({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ProvisionalSchedule> createState() => _ProvisionalScheduleState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ProvisionalScheduleState extends State<ProvisionalSchedule> {
|
||||||
|
late ScheduleProvisionalVisitPageModel _model;
|
||||||
|
|
||||||
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_model = createModel(context, () => ScheduleProvisionalVisitPageModel());
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_model.dispose();
|
||||||
|
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
context.watch<AppState>();
|
||||||
|
return Scaffold(
|
||||||
|
key: scaffoldKey,
|
||||||
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
appBar: AppBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
forceMaterialTransparency: true,
|
||||||
|
leading: FlutterFlowIconButton(
|
||||||
|
borderColor: Colors.transparent,
|
||||||
|
borderRadius: 30.0,
|
||||||
|
borderWidth: 1.0,
|
||||||
|
buttonSize: 60.0,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.keyboard_arrow_left,
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
size: 30.0,
|
||||||
|
),
|
||||||
|
onPressed: () async {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
FFLocalizations.of(context).getVariableText(
|
||||||
|
enText: 'Provisional Schedule',
|
||||||
|
ptText: 'Agendar Prestadores',
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
|
fontFamily: 'Nunito',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 15.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: const [],
|
||||||
|
centerTitle: true,
|
||||||
|
elevation: 0.0,
|
||||||
|
),
|
||||||
|
body: const SafeArea(
|
||||||
|
top: true, child: ScheduleProvisionalVisitPageWidget()));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,8 +1,12 @@
|
||||||
import 'dart:developer';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:barcode_widget/barcode_widget.dart';
|
import 'package:barcode_widget/barcode_widget.dart';
|
||||||
|
// import 'package:barcode_widget/barcode_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/scheduler.dart';
|
||||||
|
import 'package:flutter_animate/flutter_animate.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/actions/actions.dart';
|
import 'package:hub/actions/actions.dart';
|
||||||
|
|
||||||
import 'package:hub/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart';
|
import 'package:hub/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/custom_functions.dart';
|
import 'package:hub/flutter_flow/custom_functions.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_animations.dart';
|
import 'package:hub/flutter_flow/flutter_flow_animations.dart';
|
||||||
|
@ -10,18 +14,9 @@ import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
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';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
|
||||||
import 'package:hub/flutter_flow/internationalization.dart';
|
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
|
|
||||||
import 'package:hub/pages/qr_code_page/qr_code_page_model.dart';
|
import 'package:hub/pages/qr_code_page/qr_code_page_model.dart';
|
||||||
import 'package:percent_indicator/circular_percent_indicator.dart';
|
import 'package:percent_indicator/circular_percent_indicator.dart';
|
||||||
|
|
||||||
import 'dart:async';
|
|
||||||
// import 'package:barcode_widget/barcode_widget.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/scheduler.dart';
|
|
||||||
import 'package:flutter_animate/flutter_animate.dart';
|
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
|
||||||
// import 'package:percent_indicator/percent_indicator.dart';
|
// import 'package:percent_indicator/percent_indicator.dart';
|
||||||
|
|
||||||
import 'package:qr_flutter/qr_flutter.dart';
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
|
@ -466,7 +461,8 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
||||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 16.0,
|
fontSize: 15.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).headlineMediumFamily),
|
FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
|
import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
|
||||||
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import 'register_visitor_page_model.dart';
|
import 'register_visitor_page_model.dart';
|
||||||
|
|
||||||
export 'register_visitor_page_model.dart';
|
export 'register_visitor_page_model.dart';
|
||||||
|
|
||||||
class RegisterVisitorPageWidget extends StatefulWidget {
|
class RegisterVisitorPageWidget extends StatefulWidget {
|
||||||
|
@ -64,6 +66,7 @@ class _RegisterVisitorPageWidgetState extends State<RegisterVisitorPageWidget> {
|
||||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
fontSize: 15.0,
|
fontSize: 15.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||||
FlutterFlowTheme.of(context).headlineMediumFamily),
|
FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,16 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hub/flutter_flow/internationalization.dart';
|
||||||
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
|
|
||||||
|
export 'dialog_extensions.dart' show DialogUnavailable;
|
||||||
|
|
||||||
|
extension DialogUnavailable on DialogUtil {
|
||||||
|
static Future<dynamic> unavailableFeature(BuildContext context) {
|
||||||
|
final message = FFLocalizations.of(context).getVariableText(
|
||||||
|
ptText:
|
||||||
|
"Essa funcionalidade não está disponível para este local. Por favor, selecione outro local ou entre em contato com os responsáveis para alterar o plano de contrato para sua localidade.",
|
||||||
|
enText:
|
||||||
|
"This functionality is not available for this location. Please select another location or contact the responsible parties to change the contract plan for your location.");
|
||||||
|
return DialogUtil.warning(context, message);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,14 +1,22 @@
|
||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
|
||||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||||
|
|
||||||
class LogUtil {
|
class LogUtil {
|
||||||
static void requestAPIFailed(String url, String body, String reason,
|
static void requestAPIFailed(String url, String body, String reason, dynamic error, StackTrace stack) async {
|
||||||
dynamic error, StackTrace stack) async {
|
|
||||||
FirebaseCrashlytics.instance
|
|
||||||
.setCustomKey('URL', "${PhpGroup.getBaseUrl()}/$url");
|
|
||||||
FirebaseCrashlytics.instance.setCustomKey('Body', body);
|
|
||||||
|
|
||||||
await FirebaseCrashlytics.instance
|
log("URL: ${PhpGroup.getBaseUrl()}/$url");
|
||||||
.recordError(error, stack, reason: reason);
|
log("Body: $body");
|
||||||
|
log("Motivo: $reason");
|
||||||
|
log("Error: ${error.toString()}");
|
||||||
|
log("Stack: ${stack.toString()}");
|
||||||
|
|
||||||
|
// FirebaseCrashlytics.instance
|
||||||
|
// .setCustomKey('URL', "${PhpGroup.getBaseUrl()}/$url");
|
||||||
|
// FirebaseCrashlytics.instance.setCustomKey('Body', body);
|
||||||
|
//
|
||||||
|
// await FirebaseCrashlytics.instance
|
||||||
|
// .recordError(error, stack, reason: reason);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,178 @@
|
||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hub/backend/schema/enums/enums.dart';
|
||||||
|
import 'package:hub/components/organism_components/menu_component/menu_component_widget.dart';
|
||||||
|
import 'package:hub/flutter_flow/custom_functions.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import 'package:hub/pages/home_page/home_page_model.dart';
|
||||||
|
|
||||||
|
class CustomDrawer extends StatelessWidget {
|
||||||
|
const CustomDrawer({super.key, required this.model});
|
||||||
|
final HomePageModel model;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SafeArea(
|
||||||
|
child: SizedBox(
|
||||||
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
|
child: Drawer(
|
||||||
|
elevation: 16.0,
|
||||||
|
child: Container(
|
||||||
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
_buildDrawerHeader(context),
|
||||||
|
// _buildSearchBar(context),
|
||||||
|
_buildDrawerBody(),
|
||||||
|
].addToStart(const SizedBox(height: 20)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Container _buildDrawerHeader(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(5.0),
|
||||||
|
bottomRight: Radius.circular(5.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
Flexible(
|
||||||
|
fit: FlexFit.loose,
|
||||||
|
flex: 1,
|
||||||
|
child: Container(
|
||||||
|
width: 50.0,
|
||||||
|
height: 50.0,
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
imageUrl: valueOrDefault(
|
||||||
|
'assets/images/person.jpg',
|
||||||
|
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||||
|
),
|
||||||
|
width: 80.0,
|
||||||
|
height: 80.0,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
placeholder: (context, url) =>
|
||||||
|
Image.asset('assets/images/person.jpg'),
|
||||||
|
errorListener: (_) => Image.asset('assets/images/person.jpg'),
|
||||||
|
errorWidget: (_, __, ___) =>
|
||||||
|
Image.asset('assets/images/person.jpg'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
convertToUppercase(AppState().name) ?? '',
|
||||||
|
style: FlutterFlowTheme.of(context).bodyLarge.override(
|
||||||
|
fontFamily: 'Nunito Sans',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 14.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
Text(
|
||||||
|
AppState().email,
|
||||||
|
style: FlutterFlowTheme.of(context).bodySmall.override(
|
||||||
|
fontFamily: 'Nunito Sans',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 12.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Padding _buildSearchBar(BuildContext context) {
|
||||||
|
final theme = FlutterFlowTheme.of(context);
|
||||||
|
final errorColor = theme.error;
|
||||||
|
final primaryColor = theme.primary;
|
||||||
|
final customColor1 = theme.primaryText;
|
||||||
|
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||||
|
child: TextFormField(
|
||||||
|
controller: model.textController,
|
||||||
|
focusNode: model.textFieldFocusNode,
|
||||||
|
autofocus: false,
|
||||||
|
obscureText: false,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
labelText: 'Search',
|
||||||
|
labelStyle: TextStyle(color: customColor1),
|
||||||
|
prefixIcon: const Icon(Icons.search_sharp),
|
||||||
|
enabledBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: customColor1,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(2.0),
|
||||||
|
),
|
||||||
|
focusedBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: primaryColor,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(2.0),
|
||||||
|
),
|
||||||
|
errorBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: errorColor,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(2.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: UnderlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: errorColor,
|
||||||
|
width: 0.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(2.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: theme.bodyMedium.override(
|
||||||
|
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
),
|
||||||
|
validator: model.textControllerValidator.asValidator(context),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Expanded _buildDrawerBody() {
|
||||||
|
return Expanded(
|
||||||
|
child: wrapWithModel(
|
||||||
|
model: model.menuComponentModel,
|
||||||
|
updateCallback: () {},
|
||||||
|
child: const MenuComponentWidget(
|
||||||
|
expandable: false,
|
||||||
|
style: MenuView.list,
|
||||||
|
item: MenuItem.tile,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue