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)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
|
@ -557,11 +558,12 @@
|
|||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -599,10 +601,11 @@
|
|||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
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" : [
|
||||
{
|
||||
"filename" : "69.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "69 1.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "69 2.png",
|
||||
"idiom" : "universal",
|
||||
"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/backend/api_requests/api_calls.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/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/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:qr_flutter/qr_flutter.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
@ -139,29 +137,24 @@ Future singInLoginAction(
|
|||
AppState().userUUID = PhpGroup.loginCall.userUUID(
|
||||
(loginCall.jsonBody ?? ''),
|
||||
)!;
|
||||
|
||||
AppState().createdAt = dateTimeFormat(
|
||||
'd/M/y H:mm:ss',
|
||||
getCurrentTimestamp,
|
||||
locale: FFLocalizations.of(context).languageCode,
|
||||
);
|
||||
|
||||
AppState().updatedAt = '00/00/0000 00:00:00';
|
||||
|
||||
AppState().status =
|
||||
PhpGroup.loginCall.userStatus((loginCall.jsonBody ?? ''))!;
|
||||
|
||||
AppState().userDevUUID =
|
||||
PhpGroup.loginCall.userDeviceId((loginCall.jsonBody ?? ''))!;
|
||||
|
||||
AppState().name =
|
||||
PhpGroup.loginCall.userName((loginCall.jsonBody ?? ''))!;
|
||||
|
||||
PhpGroup.loginCall.userName((loginCall.jsonBody ?? ''))!;
|
||||
AppState().serialNumber = await getSerialNumber() ?? '';
|
||||
|
||||
AppState().isLogged = true;
|
||||
|
||||
AppState().haveLocal =
|
||||
await checkLocals(context: context, model: model);
|
||||
log('haveLocal in login: ${AppState().haveLocal}');
|
||||
toggleApp(context, AppState().haveLocal!);
|
||||
} else {
|
||||
if (PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')) == null) {
|
||||
DialogUtil.errorDefault(context);
|
||||
|
@ -306,6 +299,7 @@ Future toggleSignUpPage(BuildContext context) async {
|
|||
}
|
||||
|
||||
Future toggleApp(BuildContext context, bool haveLocal) async {
|
||||
log('haveLocal in toggleApp: $haveLocal');
|
||||
if (haveLocal == true)
|
||||
context.goNamed(
|
||||
'homePage',
|
||||
|
@ -398,24 +392,10 @@ Future<bool> checkLocals({
|
|||
return false;
|
||||
}
|
||||
List<dynamic> locals = response.jsonBody['locais'] ?? [];
|
||||
if (locals != null && locals.isEmpty) {
|
||||
await toggleApp(context, false);
|
||||
|
||||
if (locals.isEmpty) {
|
||||
return false;
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@ class AppState extends ChangeNotifier {
|
|||
await _safeInitAsync(() async {
|
||||
_devUUID = await secureStorage.getString('ff_devUUID') ?? _devUUID;
|
||||
});
|
||||
|
||||
await _safeInitAsync(() async {
|
||||
_email = await secureStorage.getString('ff_email') ?? _email;
|
||||
});
|
||||
|
@ -215,6 +216,17 @@ class AppState extends ChangeNotifier {
|
|||
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 get fingerprintPass => _fingerprintPass;
|
||||
set fingerprintPass(String value) {
|
||||
|
@ -297,6 +309,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteSerialNumber() {
|
||||
secureStorage.delete(key: 'ff_serialNumber');
|
||||
AppState().serialNumber = '';
|
||||
}
|
||||
|
||||
String _cliUUID = '';
|
||||
|
@ -308,6 +321,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteCliUUID() {
|
||||
secureStorage.delete(key: 'ff_cliUUID');
|
||||
AppState().cliUUID = '';
|
||||
}
|
||||
|
||||
String _userDevUUID = '';
|
||||
|
@ -319,6 +333,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteRemoteId() {
|
||||
secureStorage.delete(key: 'ff_user_dev_id');
|
||||
AppState().userDevUUID = '';
|
||||
}
|
||||
|
||||
String? _tokenAPNS = '';
|
||||
|
@ -336,6 +351,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteTokenAPNS() {
|
||||
secureStorage.delete(key: 'ff_tokenAPNS');
|
||||
AppState().tokenAPNS = '';
|
||||
}
|
||||
|
||||
String _ownerUUID = '';
|
||||
|
@ -347,6 +363,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteOwnerUUID() {
|
||||
secureStorage.delete(key: 'ff_ownerUUID');
|
||||
AppState().ownerUUID = '';
|
||||
}
|
||||
|
||||
String _userUUID = '';
|
||||
|
@ -358,6 +375,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteUserUUID() {
|
||||
secureStorage.delete(key: 'ff_userUUID');
|
||||
AppState().userUUID = '';
|
||||
}
|
||||
|
||||
String _devUUID = '';
|
||||
|
@ -369,6 +387,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteDevUUID() {
|
||||
secureStorage.delete(key: 'ff_devUUID');
|
||||
AppState().devUUID = '';
|
||||
}
|
||||
|
||||
String _email = '';
|
||||
|
@ -380,6 +399,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteEmail() {
|
||||
secureStorage.delete(key: 'ff_email');
|
||||
AppState().email = '';
|
||||
}
|
||||
|
||||
String _passwd = '';
|
||||
|
@ -391,6 +411,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deletePasswd() {
|
||||
secureStorage.delete(key: 'ff_passwd');
|
||||
AppState().passwd = '';
|
||||
}
|
||||
|
||||
String _device = '';
|
||||
|
@ -402,6 +423,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteDevice() {
|
||||
secureStorage.delete(key: 'ff_device');
|
||||
AppState().device = '';
|
||||
}
|
||||
|
||||
bool _isLogged = false;
|
||||
|
@ -411,13 +433,6 @@ class AppState extends ChangeNotifier {
|
|||
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() {
|
||||
secureStorage.delete(key: 'ff_isLogged');
|
||||
}
|
||||
|
@ -431,6 +446,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteLocal() {
|
||||
secureStorage.delete(key: 'ff_local');
|
||||
AppState().local = '';
|
||||
}
|
||||
|
||||
String _token = '';
|
||||
|
@ -442,6 +458,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteToken() {
|
||||
secureStorage.delete(key: 'ff_token');
|
||||
AppState().token = '';
|
||||
}
|
||||
|
||||
String _createdAt = '';
|
||||
|
@ -453,6 +470,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteCreatedAt() {
|
||||
secureStorage.delete(key: 'ff_createdAt');
|
||||
AppState().createdAt = '';
|
||||
}
|
||||
|
||||
String _updatedAt = '';
|
||||
|
@ -464,6 +482,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteUpdatedAt() {
|
||||
secureStorage.delete(key: 'ff_updatedAt');
|
||||
AppState().updatedAt = '';
|
||||
}
|
||||
|
||||
String _status = '';
|
||||
|
@ -475,6 +494,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteStatus() {
|
||||
secureStorage.delete(key: 'ff_status');
|
||||
AppState().status = '';
|
||||
}
|
||||
|
||||
String _name = '';
|
||||
|
@ -486,6 +506,7 @@ class AppState extends ChangeNotifier {
|
|||
|
||||
void deleteName() {
|
||||
secureStorage.delete(key: 'ff_name');
|
||||
AppState().name = '';
|
||||
}
|
||||
|
||||
void deleteAll() {
|
||||
|
@ -548,7 +569,7 @@ extension FlutterSecureStorageExtensions on FlutterSecureStorage {
|
|||
await writeSync(key: key, value: value);
|
||||
|
||||
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());
|
||||
|
||||
Future<int?> getInt(String key) async =>
|
||||
|
|
|
@ -510,6 +510,11 @@ class ApiManager {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -297,7 +297,6 @@ class NotificationService {
|
|||
|
||||
break;
|
||||
default:
|
||||
log('default');
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:google_fonts/google_fonts.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_util.dart';
|
||||
|
||||
class MenuButtonWidget extends MenuEntry {
|
||||
const MenuButtonWidget({
|
||||
|
@ -33,93 +32,69 @@ class _MenuButtonWidgetState extends State<MenuButtonWidget> {
|
|||
onTap: () async {
|
||||
await widget.action?.call();
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 0),
|
||||
child: Container(
|
||||
width: 120.0,
|
||||
height: 100.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
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(
|
||||
widget.icon,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(0.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (widget.icon != null)
|
||||
Container(
|
||||
alignment: Alignment.topLeft,
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
size: 24.0,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0),
|
||||
child: Text(
|
||||
widget.title ?? '',
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
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(
|
||||
widget.title ?? '',
|
||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:google_fonts/google_fonts.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_util.dart';
|
||||
|
||||
class MenuCardItem extends MenuEntry {
|
||||
const MenuCardItem({
|
||||
|
@ -36,54 +35,47 @@ class _MenuCardItemState extends State<MenuCardItem> {
|
|||
child: Card(
|
||||
elevation: 0,
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 10.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(
|
||||
widget.icon,
|
||||
fill: null,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 10.0, 0.0),
|
||||
child: Container(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
widget.title ?? '',
|
||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
fill: null,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(
|
||||
widget.title ?? '',
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
style: FlutterFlowTheme.of(context).titleLarge.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/form_field_controller.dart';
|
||||
import 'opt_modal_widget.dart' show OptModalWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
||||
/// State fields for stateful widgets in this component.
|
||||
|
@ -29,4 +29,4 @@ class OptModalModel extends FlutterFlowModel<OptModalWidget> {
|
|||
textFieldFocusNode?.dispose();
|
||||
textController?.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
import 'dart:ffi';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.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_util.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
|
||||
class OptModalWidget extends StatefulWidget {
|
||||
final String defaultPersonType;
|
||||
|
@ -85,7 +81,8 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
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(
|
||||
children: [
|
||||
Row(
|
||||
|
@ -145,13 +142,13 @@ class _OptModalWidgetState extends State<OptModalWidget> {
|
|||
checkboxShape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
),
|
||||
|
||||
enableFeedback: true,
|
||||
side: BorderSide(
|
||||
width: 5,
|
||||
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 {
|
||||
const LocalProfileComponentWidget({required bool localStatus, super.key});
|
||||
const LocalProfileComponentWidget({super.key});
|
||||
|
||||
@override
|
||||
State<LocalProfileComponentWidget> createState() =>
|
||||
|
@ -59,9 +59,9 @@ class _LocalProfileComponentWidgetState
|
|||
width: double.infinity,
|
||||
height: 119.0,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1AAB5F),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
border: Border.all(
|
||||
color: const Color(0xFF1AAB5F),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
|
@ -72,44 +72,53 @@ class _LocalProfileComponentWidgetState
|
|||
child: Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: const Color(0x00FFFFFF),
|
||||
context: context,
|
||||
enableDrag: false,
|
||||
isDismissible: false,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const SizedBox(
|
||||
height: double.infinity,
|
||||
child: BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: ClipRRect(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: const Color(0x00FFFFFF),
|
||||
context: context,
|
||||
enableDrag: false,
|
||||
isDismissible: false,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const SizedBox(
|
||||
height: double.infinity,
|
||||
child:
|
||||
BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(200.0),
|
||||
child: CachedNetworkImage(
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: imageProvider,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
imageUrl: valueOrDefault(
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${AppState().cliUUID}.png',
|
||||
'assets/images/error_image.svg'),
|
||||
'assets/images/home.png'),
|
||||
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'),
|
||||
Image.asset('assets/images/home.png'),
|
||||
errorListener: (_) =>
|
||||
Image.asset('assets/images/error_image.svg'),
|
||||
Image.asset('assets/images/home.png'),
|
||||
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: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/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/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
|
||||
|
@ -42,36 +41,97 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
isGrid = !isGrid;
|
||||
}
|
||||
|
||||
Future scheduleVisitOptAction(BuildContext context) async {
|
||||
final isWpp = AppState().whatsapp;
|
||||
final isProvisional = AppState().provisional;
|
||||
log("isWpp ${isWpp ? 1 : 0}");
|
||||
|
||||
final routesListStr = <String>[
|
||||
Future scheduleCompleteVisitAction(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'scheduleCompleteVisitPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
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',
|
||||
if (isProvisional) 'scheduleProvisionalVisitPage',
|
||||
if (isWpp) 'fastPassPage',
|
||||
];
|
||||
final iconsListIcon = <IconData>[
|
||||
Icons.date_range_rounded,
|
||||
if (isProvisional) Icons.date_range_rounded,
|
||||
if (isWpp) Icons.date_range_rounded,
|
||||
Icons.date_range_rounded,
|
||||
Icons.date_range_rounded,
|
||||
];
|
||||
final nameListStr = <String>[
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nProvisória',
|
||||
enText: 'Provisional\nSchedule',
|
||||
),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nRápida',
|
||||
enText: 'Fast\nSchedule',
|
||||
),
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nCompleta',
|
||||
enText: 'Complete\nSchedule',
|
||||
),
|
||||
if (isProvisional)
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nProvisória',
|
||||
enText: 'Provisional\nSchedule',
|
||||
),
|
||||
if (isWpp)
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: 'Visita\nRápida',
|
||||
enText: 'Fast\nSchedule',
|
||||
),
|
||||
];
|
||||
|
||||
await showAdaptiveDialog(
|
||||
|
@ -123,7 +183,6 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
ptText: 'Tem certeza',
|
||||
), () async {
|
||||
AppState().deleteAll();
|
||||
// setState(() {});
|
||||
|
||||
context.goNamed(
|
||||
'welcomePage',
|
||||
|
@ -165,10 +224,11 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
}
|
||||
|
||||
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(
|
||||
// isScrollControlled: true,
|
||||
// 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 {
|
||||
context.pushNamed(
|
||||
'qrCodePage',
|
||||
|
|
|
@ -55,97 +55,232 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
Widget build(BuildContext context) {
|
||||
final options = () {
|
||||
if (widget.item == MenuItem.button) {
|
||||
return <MenuEntry>[
|
||||
MenuButtonWidget(
|
||||
icon: FFIcons.kvector1,
|
||||
action: () async {
|
||||
await _model.scheduleVisitOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Schedule\nVisit',
|
||||
ptText: 'Agendar\nVisita',
|
||||
if (_model.isGrid == true)
|
||||
return <MenuEntry>[
|
||||
MenuButtonWidget(
|
||||
icon: FFIcons.kvector1,
|
||||
action: () async {
|
||||
await _model.scheduleVisitOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Schedule\nVisit',
|
||||
ptText: 'Agendar\nVisita',
|
||||
),
|
||||
),
|
||||
),
|
||||
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: 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.qr_code,
|
||||
action: () async {
|
||||
await _model.accessQRCodeOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'QRCode\nAccess',
|
||||
ptText: 'QRCode\nde Acesso',
|
||||
),
|
||||
),
|
||||
),
|
||||
MenuButtonWidget(
|
||||
icon: Icons.people,
|
||||
action: () async {
|
||||
await _model.peopleOnThePropertyAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Poeple on\nthe Property',
|
||||
ptText: 'Pessoas na\nPropriedade',
|
||||
MenuButtonWidget(
|
||||
icon: Icons.people,
|
||||
action: () async {
|
||||
await _model.peopleOnThePropertyAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'People on\nthe Property',
|
||||
ptText: 'Pessoas na\nPropriedade',
|
||||
),
|
||||
),
|
||||
),
|
||||
MenuButtonWidget(
|
||||
icon: Icons.history_sharp,
|
||||
action: () async {
|
||||
await _model.liberationHistoryOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Consult\nHistories',
|
||||
ptText: 'Consultar\nHistóricos',
|
||||
MenuButtonWidget(
|
||||
icon: Icons.history_sharp,
|
||||
action: () async {
|
||||
await _model.consultHistoriesAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Consult\nHistories',
|
||||
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.settings,
|
||||
action: () async {
|
||||
await _model.preferencesSettings(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Preferences\nSettings',
|
||||
ptText: 'Opções\ndo Sistema',
|
||||
),
|
||||
),
|
||||
),
|
||||
MenuButtonWidget(
|
||||
icon: Icons.event_available,
|
||||
action: () async {
|
||||
await _model.reservation(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Reservations',
|
||||
ptText: 'Reservas',
|
||||
];
|
||||
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.settings,
|
||||
action: () async {
|
||||
await _model.preferencesSettings(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Preferences\nSettings',
|
||||
ptText: 'Preferências \nde Configurações',
|
||||
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) {
|
||||
return <MenuEntry>[
|
||||
|
@ -189,14 +324,14 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Poeple on\nthe Property',
|
||||
enText: 'People on\nthe Property',
|
||||
ptText: 'Pessoas\nna Propriedade',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.history_sharp,
|
||||
action: () async {
|
||||
await _model.liberationHistoryOptAction(context);
|
||||
await _model.consultHistoriesAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
|
@ -242,14 +377,69 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
// if (MenuItem.tile)
|
||||
return <MenuEntry>[
|
||||
MenuCardItem(
|
||||
icon: FFIcons.kvector1,
|
||||
icon: Icons.engineering_outlined,
|
||||
action: () async {
|
||||
await _model.scheduleVisitOptAction(context);
|
||||
await _model.provisionalSchedule(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Schedule Visit',
|
||||
ptText: 'Agendar Visita',
|
||||
enText: 'Provisional Schedule',
|
||||
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(
|
||||
|
@ -275,25 +465,69 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.people,
|
||||
icon: Icons.groups,
|
||||
action: () async {
|
||||
await _model.peopleOnThePropertyAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Poeple on the Property',
|
||||
enText: 'People on the Property',
|
||||
ptText: 'Pessoas na Propriedade',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
icon: Icons.history_sharp,
|
||||
icon: Icons.group_add_outlined,
|
||||
action: () async {
|
||||
await _model.liberationHistoryOptAction(context);
|
||||
await _model.liberationHistoryAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
title: FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Consult Histories',
|
||||
ptText: 'Consultar Historicos',
|
||||
enText: 'Liberations History',
|
||||
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(
|
||||
|
@ -307,44 +541,14 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
ptText: 'Sair da Conta',
|
||||
),
|
||||
),
|
||||
MenuCardItem(
|
||||
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',
|
||||
),
|
||||
),
|
||||
MenuCardItem(icon: null, action: () {}, title: ''),
|
||||
];
|
||||
}();
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.only(
|
||||
top: 10,
|
||||
),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
if (widget.style == MenuView.list_grid &&
|
||||
|
@ -352,10 +556,10 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
widget.item == MenuItem.button) {
|
||||
if (_model.isGrid == true) {
|
||||
return wrapWithModel(
|
||||
model: _model.menuListViewComponentModel,
|
||||
model: _model.menuStaggeredViewComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: MenuListViewComponentWidget(
|
||||
child: MenuStaggeredViewComponentWidget(
|
||||
options: options,
|
||||
expandable: widget.expandable,
|
||||
item: widget.item,
|
||||
|
@ -363,6 +567,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
await _model.changeMenuStyle(context);
|
||||
setState(() {});
|
||||
},
|
||||
isGrid: _model.isGrid,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
@ -378,6 +583,7 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
await _model.changeMenuStyle(context);
|
||||
setState(() {});
|
||||
},
|
||||
isGrid: _model.isGrid,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -56,20 +56,7 @@ class _MenuListViewComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Wrap(
|
||||
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),
|
||||
],
|
||||
);
|
||||
return buildMenuItem(context);
|
||||
}
|
||||
|
||||
Widget buildMenuItem(BuildContext context) {
|
||||
|
@ -115,30 +102,32 @@ class _MenuListViewComponentWidgetState
|
|||
),
|
||||
);
|
||||
case MenuItem.tile:
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.of(context).size.height * 0.7,
|
||||
child: ListView.separated(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
shrinkWrap: true,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: widget.options.length,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
height: MediaQuery.of(context).size.height * 0.08,
|
||||
width: MediaQuery.of(context).size.width * 0.08,
|
||||
child: widget.options[index],
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return const Divider(thickness: 0.2);
|
||||
},
|
||||
),
|
||||
);
|
||||
return buildMenuList(context);
|
||||
}
|
||||
}
|
||||
|
||||
Widget buildMenuList(BuildContext context) {
|
||||
return SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: ListView.separated(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
shrinkWrap: true,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: widget.options.length,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
child: widget.options[index],
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return const Divider(thickness: 0.2);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Row buildExpandableButton(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
|
|
|
@ -1,29 +1,23 @@
|
|||
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/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/flutter_flow/custom_icons.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_util.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
|
||||
class MenuStaggeredViewComponentWidget extends StatefulWidget {
|
||||
const MenuStaggeredViewComponentWidget({
|
||||
super.key,
|
||||
required this.changeMenuStyle,
|
||||
required this.expandable,
|
||||
required this.item,
|
||||
required this.options,
|
||||
});
|
||||
const MenuStaggeredViewComponentWidget(
|
||||
{super.key,
|
||||
required this.changeMenuStyle,
|
||||
required this.expandable,
|
||||
required this.item,
|
||||
required this.options,
|
||||
required this.isGrid});
|
||||
|
||||
final bool expandable;
|
||||
final MenuItem item;
|
||||
final bool isGrid;
|
||||
|
||||
final List<MenuEntry> options;
|
||||
final Future Function()? changeMenuStyle;
|
||||
|
@ -58,97 +52,136 @@ class _MenuStaggeredViewComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Wrap(
|
||||
spacing: 0.0,
|
||||
runSpacing: 0.0,
|
||||
alignment: WrapAlignment.start,
|
||||
crossAxisAlignment: WrapCrossAlignment.start,
|
||||
direction: Axis.horizontal,
|
||||
runAlignment: WrapAlignment.start,
|
||||
verticalDirection: VerticalDirection.down,
|
||||
clipBehavior: Clip.none,
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
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(),
|
||||
gridDelegate:
|
||||
const SliverSimpleGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
),
|
||||
crossAxisSpacing: 10.0,
|
||||
mainAxisSpacing: 10.0,
|
||||
itemCount: widget.options.length,
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
0,
|
||||
10.0,
|
||||
0,
|
||||
10.0,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
height: 100, width: 100, child: widget.options[index]);
|
||||
},
|
||||
),
|
||||
GridView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
crossAxisSpacing: 10.0,
|
||||
mainAxisSpacing: 10.0,
|
||||
childAspectRatio: 1,
|
||||
mainAxisExtent: 100,
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(0.0),
|
||||
topRight: Radius.circular(0.0),
|
||||
itemCount: widget.options.length,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
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),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Minimize',
|
||||
ptText: 'Minimizar',
|
||||
),
|
||||
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: 1.0,
|
||||
buttonSize: 50.0,
|
||||
fillColor: const Color(0x00FFFFFF),
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_up_sharp,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
onPressed: () async {
|
||||
await widget.changeMenuStyle?.call();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Center(child: widget.options[index]),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget collapseExpandMethod(BuildContext context) {
|
||||
if (widget.isGrid == true) {
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(0.0),
|
||||
topRight: Radius.circular(0.0),
|
||||
),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
enText: 'Minimize',
|
||||
ptText: 'Minimizar',
|
||||
),
|
||||
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: 1.0,
|
||||
buttonSize: 50.0,
|
||||
fillColor: const Color(0x00FFFFFF),
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_up_sharp,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
onPressed: () async {
|
||||
await widget.changeMenuStyle?.call();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
} 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: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:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.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 {
|
||||
const CardItemTemplateComponentWidget({
|
||||
super.key,
|
||||
Key? key,
|
||||
required this.labelsHashMap,
|
||||
required this.statusHashMap,
|
||||
required this.imagePath,
|
||||
required this.onTapCardItemAction,
|
||||
});
|
||||
}) : super(key: key);
|
||||
|
||||
final Map<String, String>? labelsHashMap;
|
||||
final List<Map<String, Color>?> statusHashMap;
|
||||
|
@ -30,24 +26,24 @@ class CardItemTemplateComponentWidget extends StatefulWidget {
|
|||
final Future Function()? onTapCardItemAction;
|
||||
|
||||
@override
|
||||
State<CardItemTemplateComponentWidget> createState() => _CardItemTemplateComponentWidgetState();
|
||||
State<CardItemTemplateComponentWidget> createState() =>
|
||||
_CardItemTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateComponentWidget> {
|
||||
class _CardItemTemplateComponentWidgetState
|
||||
extends State<CardItemTemplateComponentWidget> {
|
||||
late CardItemTemplateComponentModel _model;
|
||||
LinkedHashMap<String, String> get labelsLinkedHashMap => LinkedHashMap.from(widget.labelsHashMap ?? {});
|
||||
List<LinkedHashMap<String, Color>> get statusLinkedHashMap => widget.statusHashMap.map((map) => LinkedHashMap<String, Color>.from(map ?? {})).toList();
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
late LinkedHashMap<String, String> labelsLinkedHashMap;
|
||||
late List<LinkedHashMap<String, Color>> statusLinkedHashMap;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => CardItemTemplateComponentModel());
|
||||
labelsLinkedHashMap = LinkedHashMap.from(widget.labelsHashMap ?? {});
|
||||
statusLinkedHashMap = widget.statusHashMap
|
||||
.map((map) => LinkedHashMap<String, Color>.from(map ?? {}))
|
||||
.toList();
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -61,150 +57,148 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
}
|
||||
|
||||
List<Widget> _generateLabels() {
|
||||
List<Widget> labels = [];
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
return labelsLinkedHashMap.entries.map((entry) {
|
||||
final key = entry.key;
|
||||
final text = entry.value.toString();
|
||||
|
||||
for (var key in labelsLinkedHashMap.keys) {
|
||||
String text = labelsLinkedHashMap[key].toString();
|
||||
|
||||
Widget widget = Row(
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 2.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
key,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 2.5),
|
||||
SizedBox(
|
||||
width: 225,
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
text,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: 12.5,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontSize: 12.5,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
labels.add(widget);
|
||||
}
|
||||
|
||||
return labels;
|
||||
),
|
||||
);
|
||||
}).toList();
|
||||
}
|
||||
|
||||
Widget _generateImage() {
|
||||
return Container(
|
||||
width: 100,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 500),
|
||||
fadeOutDuration: const Duration(milliseconds: 500),
|
||||
imageUrl: widget.imagePath ?? '',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration: const Duration(milliseconds: 500),
|
||||
fadeOutDuration: const Duration(milliseconds: 500),
|
||||
imageUrl: widget.imagePath ?? '',
|
||||
fit: BoxFit.cover,
|
||||
width: 90,
|
||||
height: 90,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
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) {
|
||||
statusLinked.forEach((text, color) {
|
||||
Widget widget = Container(
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(5),
|
||||
width: MediaQuery.of(context).size.width * 0.25,
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
borderRadius: BorderRadius.circular(5)
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: Text(
|
||||
text,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold
|
||||
child: Center(
|
||||
child: Text(
|
||||
text,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
status.add(widget);
|
||||
});
|
||||
|
||||
return [];
|
||||
}).toList();
|
||||
}).toList();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
Widget _smallScreen() {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
_generateImage(),
|
||||
const SizedBox(height: 5),
|
||||
Column(
|
||||
Widget _buildContent() {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
if (constraints.maxWidth > 360) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
..._generateLabels(),
|
||||
const SizedBox(height: 5),
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
children: _generateStatus(),
|
||||
)
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
..._generateLabels(),
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 4,
|
||||
children: _generateStatus(),
|
||||
),
|
||||
]
|
||||
.addToEnd(const SizedBox(height: 5))
|
||||
.divide(const SizedBox(height: 1))
|
||||
.addToStart(const SizedBox(height: 5)),
|
||||
),
|
||||
),
|
||||
_generateImage(),
|
||||
]
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _largeScreen() {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
.addToEnd(const SizedBox(width: 10))
|
||||
.addToStart(const SizedBox(width: 10)),
|
||||
);
|
||||
} else {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
..._generateLabels(),
|
||||
const SizedBox(height: 5),
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
children: _generateStatus(),
|
||||
)
|
||||
]
|
||||
),
|
||||
_generateImage()
|
||||
],
|
||||
_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
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
double screenHeight = MediaQuery.of(context).size.height;
|
||||
|
||||
context.watch<AppState>();
|
||||
|
||||
return InkWell(
|
||||
|
@ -222,20 +216,7 @@ class _CardItemTemplateComponentWidgetState extends State<CardItemTemplateCompon
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
child: Container(
|
||||
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(),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: _buildContent(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -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:hub/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart';
|
||||
|
||||
import '../../flutter_flow/internationalization.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 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
|
||||
class ScheduleProvisionalVisitPageModel
|
||||
extends FlutterFlowModel<ScheduleProvisionalVisitPageWidget> {
|
||||
|
@ -93,4 +90,4 @@ class ScheduleProvisionalVisitPageModel
|
|||
notesFocusNode?.dispose();
|
||||
notesTextController?.dispose();
|
||||
}
|
||||
}
|
||||
}
|
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/shared/components/atoms/atom_terms_of_use.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/log_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 '/flutter_flow/flutter_flow_animations.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.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';
|
||||
|
||||
export 'sign_in_template_component_model.dart';
|
||||
|
||||
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: const EdgeInsetsDirectional
|
||||
.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/shared/components/atoms/atom_terms_of_use.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_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.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';
|
||||
|
||||
export 'sign_up_template_component_model.dart';
|
||||
|
||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||
|
@ -101,8 +101,10 @@ class _SignUpTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double screenWidth = MediaQuery.of(context).size.width;
|
||||
double screenHeight = MediaQuery.of(context).size.height;
|
||||
final MediaQueryData mediaQuery = MediaQuery.of(context);
|
||||
final double screenWidth = mediaQuery.size.width;
|
||||
final double screenHeight = mediaQuery.size.height;
|
||||
|
||||
bool _isFormInvalid() {
|
||||
if (_model.nameRegisterFormTextController.text == '' ||
|
||||
_model.emailRegisterFormTextController.text == '' ||
|
||||
|
@ -233,7 +235,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
Form(
|
||||
key: _model.formKey,
|
||||
autovalidateMode:
|
||||
AutovalidateMode.onUserInteraction,
|
||||
AutovalidateMode.always,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
|
|
|
@ -2,13 +2,13 @@ import 'dart:async';
|
|||
|
||||
import 'package:flutter/material.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/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/reservation_page/reservation_page_widget.dart';
|
||||
import 'package:hub/pages/preferences_settings_page/preferences_settings_widget.dart';
|
||||
import 'package:hub/pages/provisional_schedule_page/provisional_schedule_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 '/backend/schema/structs/index.dart';
|
||||
|
@ -72,7 +72,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
name: '_initialize',
|
||||
path: '/',
|
||||
builder: (context, _) => AppState().isLogged
|
||||
? AppState().haveLocal
|
||||
? AppState().haveLocal == true
|
||||
? const HomePageWidget()
|
||||
: const ReceptionPageWidget()
|
||||
: const WelcomePageWidget(),
|
||||
|
@ -112,10 +112,14 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'scheduleProvisionalVisitPage',
|
||||
path: '/scheduleProvisionalVisitPage',
|
||||
builder: (context, params) =>
|
||||
const ScheduleProvisionalVisitPageWidget(),
|
||||
name: 'deliverySchedule',
|
||||
path: '/deliverySchedule',
|
||||
builder: (context, params) => const DeliverySchedule(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'provisionalSchedule',
|
||||
path: '/provisionalSchedule',
|
||||
builder: (context, params) => const ProvisionalSchedule(),
|
||||
),
|
||||
FFRoute(
|
||||
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'
|
||||
show AcessHistoryPageWidget;
|
||||
|
||||
export '/pages/home_page/home_page_widget.dart' show HomePageWidget;
|
||||
export '/pages/liberation_history/liberation_history_widget.dart'
|
||||
show LiberationHistoryWidget;
|
||||
|
||||
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;
|
||||
export '/pages/people_on_the_property_page/people_on_the_property_page_widget.dart'
|
||||
show PeopleOnThePropertyPageWidget;
|
||||
export '/pages/preferences_settings_page/preferences_settings_widget.dart'
|
||||
show PreferencesPageWidget;
|
||||
export '/pages/qr_code_page/qr_code_page_widget.dart' show QrCodePageWidget;
|
||||
export '/pages/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
|
||||
Widget build(BuildContext context) {
|
||||
log("haveLocals: ${AppState().haveLocal}");
|
||||
return MultiProvider(
|
||||
providers: [
|
||||
ChangeNotifierProvider(create: (_) => AppState()),
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
|
||||
|
||||
import 'package:flutter/material.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/option_selection_modal/option_selection_modal_widget.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_model.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/liberation_history/liberation_history_model.dart';
|
||||
|
||||
class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
||||
final unfocusNode = FocusNode();
|
||||
|
@ -57,4 +53,4 @@ class AcessHistoryPageModel extends FlutterFlowModel<AcessHistoryPageWidget> {
|
|||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,14 @@
|
|||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_spinkit/flutter_spinkit.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_manager.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/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_util.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.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/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_inappwebview/flutter_inappwebview.dart';
|
||||
import 'package:hub/app_state.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
import 'package:webview_flutter/webview_flutter.dart';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
class FastPassPageWidget extends StatefulWidget {
|
||||
final String freToken = AppState().userUUID;
|
||||
|
@ -54,9 +55,20 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
|||
_controllerIOS = controller;
|
||||
},
|
||||
onLoadStop: (controller, url) async {
|
||||
await controller.evaluateJavascript(source: "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')");
|
||||
await controller.evaluateJavascript(
|
||||
source:
|
||||
"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(
|
||||
|
@ -67,27 +79,34 @@ class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
|||
..setBackgroundColor(const Color(0x00000000))
|
||||
..setNavigationDelegate(
|
||||
NavigationDelegate(
|
||||
onProgress: (int progress) {},
|
||||
onPageStarted: (String url) {
|
||||
final String token = "localStorage.setItem('fre-token', '\"${widget.freToken}\"');";
|
||||
final String data = "localStorage.setItem('fre-user-data', '${widget.freUserData}');";
|
||||
const String backNavigation = "localStorage.setItem('enableBackButton', 'true');";
|
||||
onProgress: (int progress) {},
|
||||
onPageStarted: (String url) {
|
||||
final String token =
|
||||
"localStorage.setItem('fre-token', '\"${widget.freToken}\"');";
|
||||
final String data =
|
||||
"localStorage.setItem('fre-user-data', '${widget.freUserData}');";
|
||||
const String backNavigation =
|
||||
"localStorage.setItem('enableBackButton', 'true');";
|
||||
|
||||
_controllerAll.runJavaScript(token);
|
||||
_controllerAll.runJavaScript(data);
|
||||
_controllerAll.runJavaScript(backNavigation);
|
||||
},
|
||||
onNavigationRequest: (NavigationRequest request) {
|
||||
if (request.url.startsWith('http') ||
|
||||
request.url
|
||||
.startsWith('https://api.whatsapp.com/send') ||
|
||||
request.url.startsWith('https://wa.me')) {
|
||||
launchUrlString(request.url);
|
||||
_controllerAll.runJavaScript(token);
|
||||
_controllerAll.runJavaScript(data);
|
||||
_controllerAll.runJavaScript(backNavigation);
|
||||
},
|
||||
onNavigationRequest: (NavigationRequest request) {
|
||||
if (request.url.startsWith('http') ||
|
||||
request.url.startsWith(
|
||||
'https://api.whatsapp.com/send') ||
|
||||
request.url.startsWith('https://wa.me')) {
|
||||
launchUrlString(request.url);
|
||||
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)),
|
||||
),
|
||||
|
|
|
@ -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:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/actions/actions.dart';
|
||||
import 'package:hub/backend/api_requests/api_calls.dart';
|
||||
import 'package:hub/backend/notifications/firebase_messaging_service.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/local_profile_component/local_profile_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_theme.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:hub/pages/home_page/home_page_model.dart';
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/widgets/drawer_widget/drawer_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class HomePageWidget extends StatefulWidget {
|
||||
|
@ -25,78 +26,97 @@ class HomePageWidget extends StatefulWidget {
|
|||
|
||||
class _HomePageWidgetState extends State<HomePageWidget> {
|
||||
late HomePageModel _model;
|
||||
bool localStatus = false;
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
LocalProfileComponentWidget _localProfileComponentWidget =
|
||||
const LocalProfileComponentWidget();
|
||||
|
||||
Future<void> checkLocalStatus() async {
|
||||
localStatus = await checkLocals(
|
||||
Future<void> checkData() async {
|
||||
try {
|
||||
final response = await PhpGroup.getDadosCall.call(
|
||||
devUUID: AppState().devUUID,
|
||||
userUUID: AppState().userUUID,
|
||||
cliUUID: AppState().cliUUID,
|
||||
atividade: 'getDados',
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
if (response.jsonBody['error'] == false) {
|
||||
AppState().whatsapp = response.jsonBody['whatsapp'];
|
||||
AppState().provisional = response.jsonBody['provisional'];
|
||||
AppState().name = response.jsonBody['visitado']['VDO_NOME'];
|
||||
safeSetState(() {});
|
||||
} else {
|
||||
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(() {});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
await DialogUtil.warningDefault(context)
|
||||
.whenComplete(() => checkData());
|
||||
safeSetState(() {});
|
||||
}
|
||||
} catch (e) {
|
||||
log('Error in checkData: $e');
|
||||
await DialogUtil.warningDefault(context).whenComplete(() => checkData());
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> checkLocal() async {
|
||||
try {
|
||||
final response = await PhpGroup.getLocalsCall.call(
|
||||
devUUID: AppState().devUUID,
|
||||
userUUID: AppState().userUUID,
|
||||
);
|
||||
|
||||
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) {
|
||||
await showBottomSheet().then((_) => checkData());
|
||||
}
|
||||
} catch (e) {
|
||||
log('Error in checkLocal: $e');
|
||||
await showBottomSheet().then((_) => checkData());
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> showBottomSheet() async {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
isDismissible: false,
|
||||
context: context,
|
||||
model: _model,
|
||||
);
|
||||
builder: (context) => Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
).then((_) => safeSetState(() {
|
||||
_localProfileComponentWidget = const LocalProfileComponentWidget();
|
||||
}));
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
_model = createModel(context, () => HomePageModel());
|
||||
|
||||
AppState().context = context;
|
||||
|
||||
() async {
|
||||
await checkLocal();
|
||||
await FirebaseMessagingService().updateDeviceToken();
|
||||
}();
|
||||
void fetchData() async {
|
||||
bool success = false;
|
||||
while (!success) {
|
||||
final response = await PhpGroup.getDadosCall.call(
|
||||
devUUID: AppState().devUUID,
|
||||
userUUID: AppState().userUUID,
|
||||
cliUUID: AppState().cliUUID,
|
||||
atividade: 'getDados',
|
||||
);
|
||||
|
||||
switch (response.statusCode) {
|
||||
case 200:
|
||||
if (response.jsonBody['error'] == false) {
|
||||
success = true;
|
||||
AppState().whatsapp = response.jsonBody['whatsapp'];
|
||||
AppState().provisional = response.jsonBody['provisional'];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
await DialogUtil.warningDefault(context);
|
||||
safeSetState(() {});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fetchData();
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
localStatus = await checkLocals(
|
||||
context: context,
|
||||
model: _model,
|
||||
);
|
||||
|
||||
if (AppState().cliUUID.isEmpty) {
|
||||
showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
isDismissible: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const BottomArrowLinkedLocalsComponentWidget(),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
_model.textController ??= TextEditingController();
|
||||
_model.textFieldFocusNode ??= FocusNode();
|
||||
|
@ -118,14 +138,63 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
: FocusScope.of(context).unfocus(),
|
||||
child: Scaffold(
|
||||
key: scaffoldKey,
|
||||
backgroundColor: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
drawer: buildDrawer(context),
|
||||
body: buildPage(context, localStatus),
|
||||
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
// drawer: buildDrawer(context),
|
||||
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(
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
|
@ -145,8 +214,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
verticalDirection: VerticalDirection.down,
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
createHeader(context),
|
||||
createLocal(localStatus),
|
||||
createLocal(),
|
||||
createBody(),
|
||||
],
|
||||
),
|
||||
|
@ -156,386 +224,26 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
);
|
||||
}
|
||||
|
||||
Wrap createBody() {
|
||||
return Wrap(
|
||||
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: [
|
||||
wrapWithModel(
|
||||
model: _model.menuComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: const MenuComponentWidget(
|
||||
expandable: true,
|
||||
style: MenuView.list_grid,
|
||||
item: MenuItem.button,
|
||||
),
|
||||
Widget createBody() {
|
||||
return Container(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
child: wrapWithModel(
|
||||
model: _model.menuComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
child: const MenuComponentWidget(
|
||||
expandable: true,
|
||||
style: MenuView.list_grid,
|
||||
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(
|
||||
model: _model.localComponentModel,
|
||||
updateCallback: () => safeSetState(() {}),
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
child: _localProfileComponentWidget,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,7 +121,8 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 17.0,
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:hub/app_state.dart';
|
||||
import 'package:flutter/material.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/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/log_util.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -177,7 +171,8 @@ class _MessageHistoryPageWidgetState extends State<MessageHistoryPageWidget>
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 17.0,
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 0.0,
|
||||
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:flutter/material.dart';
|
||||
import 'package:flutter_spinkit/flutter_spinkit.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 '../../shared/utils/dialog_util.dart';
|
||||
import '../../shared/utils/log_util.dart';
|
||||
|
||||
class PeopleOnThePropertyPageWidget extends StatefulWidget {
|
||||
|
|
|
@ -313,8 +313,7 @@ class PreferencesPageModel with ChangeNotifier {
|
|||
AppState().deleteCliUUID();
|
||||
AppState().deleteLocal();
|
||||
AppState().deleteOwnerUUID();
|
||||
// Navigator.pop(context);
|
||||
// Navigator.pop(context, true);
|
||||
|
||||
context.goNamed(
|
||||
'homePage',
|
||||
extra: <String, dynamic>{
|
||||
|
|
|
@ -48,7 +48,7 @@ class PreferencesPageWidget extends StatelessWidget {
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 17.0,
|
||||
fontSize: 15.0,
|
||||
letterSpacing: 0.0,
|
||||
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: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/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/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_util.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/pages/qr_code_page/qr_code_page_model.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:qr_flutter/qr_flutter.dart';
|
||||
|
@ -466,7 +461,8 @@ class _QrCodePageWidgetState extends State<QrCodePageWidget>
|
|||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 16.0,
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).headlineMediumFamily),
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
import 'package:flutter/material.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/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_theme.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 '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'register_visitor_page_model.dart';
|
||||
|
||||
export 'register_visitor_page_model.dart';
|
||||
|
||||
class RegisterVisitorPageWidget extends StatefulWidget {
|
||||
|
@ -64,6 +66,7 @@ class _RegisterVisitorPageWidgetState extends State<RegisterVisitorPageWidget> {
|
|||
fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
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:hub/backend/api_requests/api_calls.dart';
|
||||
|
||||
class LogUtil {
|
||||
static void requestAPIFailed(String url, String body, String reason,
|
||||
dynamic error, StackTrace stack) async {
|
||||
FirebaseCrashlytics.instance
|
||||
.setCustomKey('URL', "${PhpGroup.getBaseUrl()}/$url");
|
||||
FirebaseCrashlytics.instance.setCustomKey('Body', body);
|
||||
static void requestAPIFailed(String url, String body, String reason, dynamic error, StackTrace stack) async {
|
||||
|
||||
await FirebaseCrashlytics.instance
|
||||
.recordError(error, stack, reason: reason);
|
||||
log("URL: ${PhpGroup.getBaseUrl()}/$url");
|
||||
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