diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index ce483104..68574d4b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -51,8 +51,8 @@ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 6436409627A31CDB00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409827A31CDD00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409727A31CD700820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409927A31CD900820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C1B4A503715BC7B0F8826983 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -301,8 +301,8 @@ 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 6436409627A31CDB00820AF7 /* pt */, - 6436409827A31CDD00820AF7 /* en */, + 6436409727A31CD700820AF7 /* pt */, + 6436409927A31CD900820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart index 8a3db936..af88a4ae 100644 --- a/lib/flutter_flow/internationalization.dart +++ b/lib/flutter_flow/internationalization.dart @@ -326,7 +326,7 @@ final kTranslationsMap = >>[ }, '8d3679lf': { 'pt': 'Propriedade', - 'en': '', + 'en': 'Property', }, 'z6aawgqa': { 'pt': 'Dados da Visita', diff --git a/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_model.dart b/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_model.dart index faa4e378..b01b75b7 100644 --- a/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_model.dart +++ b/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_model.dart @@ -73,16 +73,6 @@ class ScheduleProvisionalVisitPageModel FocusNode? notesFocusNode; TextEditingController? notesTextController; String? Function(BuildContext, String?)? notesTextControllerValidator; - String? _notesTextControllerValidator(BuildContext context, String? val) { - if (val == null || val.isEmpty) { - return FFLocalizations.of(context).getText( - 'j14it3wp' /* Field is required */, - ); - } - - return null; - } - // Stores action output result for [Backend Call - API (postProvVisitScheduling)] action in btnSend widget. ApiCallResponse? provVisitSchedule; @@ -90,7 +80,6 @@ class ScheduleProvisionalVisitPageModel void initState(BuildContext context) { personNameTextControllerValidator = _personNameTextControllerValidator; dateTimeTextControllerValidator = _dateTimeTextControllerValidator; - notesTextControllerValidator = _notesTextControllerValidator; } @override diff --git a/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart b/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart index 4a8dd378..921cdc4e 100644 --- a/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart +++ b/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart @@ -103,152 +103,45 @@ class _ScheduleProvisionalVisitPageWidgetState Form( key: _model.formKey, autovalidateMode: AutovalidateMode.always, - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - Align( - alignment: const AlignmentDirectional(-1.0, 0.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 24.0, 24.0, 0.0, 24.0), - child: Text( - FFLocalizations.of(context).getText( - 'uj8acuab' /* Preencha os Campos Abaixo: */, + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Align( + alignment: const AlignmentDirectional(-1.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 24.0, 0.0, 24.0), + child: Text( + FFLocalizations.of(context).getText( + 'uj8acuab' /* Preencha os Campos Abaixo: */, + ), + textAlign: TextAlign.start, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, + fontSize: 16.0, + letterSpacing: 0.0, + fontWeight: FontWeight.bold, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), ), - textAlign: TextAlign.start, - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: FlutterFlowTheme.of(context) - .bodyMediumFamily, - fontSize: 16.0, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap() - .containsKey( - FlutterFlowTheme.of(context) - .bodyMediumFamily), - ), ), ), - ), - Container( - width: double.infinity, - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context) - .secondaryBackground, - ), - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Align( - alignment: const AlignmentDirectional(-1.0, 0.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 24.0, 0.0, 0.0, 0.0), - child: Text( - FFLocalizations.of(context).getText( - '8d3679lf' /* Propriedade */, - ), - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of(context) - .bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey( - FlutterFlowTheme.of(context) - .bodyMediumFamily), - ), - ), - ), - ), - Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 24.0, 10.0, 24.0, 10.0), - child: Container( - width: double.infinity, - height: 50.0, - decoration: BoxDecoration( - borderRadius: const BorderRadius.only( - bottomLeft: Radius.circular(50.0), - bottomRight: Radius.circular(50.0), - topLeft: Radius.circular(50.0), - topRight: Radius.circular(50.0), - ), - border: Border.all( - color: FlutterFlowTheme.of(context) - .customColor5, - ), - ), - child: Padding( - padding: const EdgeInsets.all(5.0), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - ClipRRect( - borderRadius: const BorderRadius.only( - bottomLeft: Radius.circular(50.0), - bottomRight: Radius.circular(50.0), - topLeft: Radius.circular(50.0), - topRight: Radius.circular(50.0), - ), - child: CachedNetworkImage( - fadeInDuration: - const Duration(milliseconds: 200), - fadeOutDuration: - const Duration(milliseconds: 200), - imageUrl: - 'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png', - width: 35.0, - height: 35.0, - fit: BoxFit.contain, - memCacheWidth: 35, - memCacheHeight: 35, - ), - ), - Padding( - padding: - const EdgeInsetsDirectional.fromSTEB( - 15.0, 0.0, 0.0, 0.0), - child: Text( - FFAppState().local, - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of( - context) - .bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - FlutterFlowTheme.of( - context) - .bodyMediumFamily), - ), - ), - ), - ], - ), - ), - ), - ), - ], - ), - ), - Container( - decoration: const BoxDecoration(), - child: SingleChildScrollView( + Container( + width: double.infinity, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context) + .secondaryBackground, + ), child: Column( mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Align( alignment: const AlignmentDirectional(-1.0, 0.0), @@ -257,7 +150,7 @@ class _ScheduleProvisionalVisitPageWidgetState 24.0, 0.0, 0.0, 0.0), child: Text( FFLocalizations.of(context).getText( - 'z6aawgqa' /* Dados da Visita */, + '8d3679lf' /* Propriedade */, ), style: FlutterFlowTheme.of(context) .bodyMedium @@ -274,225 +167,59 @@ class _ScheduleProvisionalVisitPageWidgetState ), ), ), - Column( - mainAxisSize: MainAxisSize.max, - children: [ - Container( - height: 80.0, - decoration: const BoxDecoration(), - alignment: const AlignmentDirectional(0.0, 0.0), - child: Padding( - padding: const EdgeInsetsDirectional.fromSTEB( - 24.0, 0.0, 24.0, 0.0), - child: SizedBox( - width: double.infinity, - child: TextFormField( - controller: - _model.personNameTextController, - focusNode: - _model.personNameFocusNode, - onChanged: (_) => - EasyDebounce.debounce( - '_model.personNameTextController', - const Duration(milliseconds: 500), - () => setState(() {}), - ), - autofocus: false, - textInputAction: - TextInputAction.next, - obscureText: false, - decoration: InputDecoration( - isDense: false, - labelText: - FFLocalizations.of(context) - .getText( - 'wehvxbz4' /* Nome / Apelido do Visitante */, - ), - hintStyle: - FlutterFlowTheme.of(context) - .labelMedium - .override( - fontFamily: - FlutterFlowTheme.of( - context) - .labelMediumFamily, - color: - FlutterFlowTheme.of( - context) - .primaryText, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - FlutterFlowTheme.of( - context) - .labelMediumFamily), - ), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of( - context) - .customColor5, - width: 0.5, - ), - borderRadius: - BorderRadius.circular(10.0), - ), - focusedBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of( - context) - .primary, - width: 0.5, - ), - borderRadius: - BorderRadius.circular(10.0), - ), - errorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of( - context) - .error, - width: 0.5, - ), - borderRadius: - BorderRadius.circular(10.0), - ), - focusedErrorBorder: - OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of( - context) - .error, - width: 0.5, - ), - borderRadius: - BorderRadius.circular(10.0), - ), - suffixIcon: Icon( - Icons.person, - color: - FlutterFlowTheme.of(context) - .accent1, - ), - ), - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of( - context) - .bodyMediumFamily, - color: FlutterFlowTheme.of( - context) - .primaryText, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - FlutterFlowTheme.of( - context) - .bodyMediumFamily), - ), - textAlign: TextAlign.start, - maxLines: null, - validator: _model - .personNameTextControllerValidator - .asValidator(context), - ), - ), + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 10.0, 24.0, 10.0), + child: Container( + width: double.infinity, + height: 50.0, + decoration: BoxDecoration( + borderRadius: const BorderRadius.only( + bottomLeft: Radius.circular(50.0), + bottomRight: Radius.circular(50.0), + topLeft: Radius.circular(50.0), + topRight: Radius.circular(50.0), + ), + border: Border.all( + color: FlutterFlowTheme.of(context) + .customColor5, ), ), - ], - ), - Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 80.0, - child: Stack( - alignment: - const AlignmentDirectional(0.0, 0.0), + child: Padding( + padding: const EdgeInsets.all(5.0), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.start, children: [ + ClipRRect( + borderRadius: const BorderRadius.only( + bottomLeft: Radius.circular(50.0), + bottomRight: + Radius.circular(50.0), + topLeft: Radius.circular(50.0), + topRight: Radius.circular(50.0), + ), + child: CachedNetworkImage( + fadeInDuration: + const Duration(milliseconds: 200), + fadeOutDuration: + const Duration(milliseconds: 200), + imageUrl: + 'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png', + width: 35.0, + height: 35.0, + fit: BoxFit.contain, + memCacheWidth: 35, + memCacheHeight: 35, + ), + ), Padding( padding: const EdgeInsetsDirectional.fromSTEB( - 24.0, 0.0, 24.0, 0.0), - child: TextFormField( - controller: - _model.dateTimeTextController, - focusNode: - _model.dateTimeFocusNode, - onChanged: (_) => - EasyDebounce.debounce( - '_model.dateTimeTextController', - const Duration(milliseconds: 500), - () => setState(() {}), - ), - autofocus: false, - obscureText: false, - decoration: InputDecoration( - isDense: false, - labelText: - FFLocalizations.of(context) - .getText( - '8zgsw5so' /* Data / Hora Limite da Visita */, - ), - enabledBorder: - OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of( - context) - .customColor5, - width: 0.5, - ), - borderRadius: - BorderRadius.circular( - 8.0), - ), - focusedBorder: - OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of( - context) - .primary, - width: 0.5, - ), - borderRadius: - BorderRadius.circular( - 8.0), - ), - errorBorder: OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of( - context) - .error, - width: 0.5, - ), - borderRadius: - BorderRadius.circular( - 8.0), - ), - focusedErrorBorder: - OutlineInputBorder( - borderSide: BorderSide( - color: FlutterFlowTheme.of( - context) - .error, - width: 0.5, - ), - borderRadius: - BorderRadius.circular( - 8.0), - ), - suffixIcon: Icon( - Icons.date_range, - color: FlutterFlowTheme.of( - context) - .accent1, - ), - ), + 15.0, 0.0, 0.0, 0.0), + child: Text( + FFAppState().local, style: FlutterFlowTheme.of(context) .bodyMedium @@ -509,99 +236,363 @@ class _ScheduleProvisionalVisitPageWidgetState context) .bodyMediumFamily), ), - textAlign: TextAlign.center, + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + Container( + decoration: const BoxDecoration(), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + children: [ + Align( + alignment: const AlignmentDirectional(-1.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 0.0, 0.0), + child: Text( + FFLocalizations.of(context).getText( + 'z6aawgqa' /* Dados da Visita */, + ), + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of(context) + .bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + ), + ), + ), + ), + Column( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + height: 80.0, + decoration: const BoxDecoration(), + alignment: + const AlignmentDirectional(0.0, 0.0), + child: Padding( + padding: + const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), + child: SizedBox( + width: double.infinity, + child: TextFormField( + controller: _model + .personNameTextController, + focusNode: + _model.personNameFocusNode, + onChanged: (_) => + EasyDebounce.debounce( + '_model.personNameTextController', + const Duration(milliseconds: 500), + () => setState(() {}), + ), + autofocus: false, + textInputAction: + TextInputAction.next, + obscureText: false, + decoration: InputDecoration( + isDense: false, + labelText: + FFLocalizations.of(context) + .getText( + 'wehvxbz4' /* Nome / Apelido do Visitante */, + ), + labelStyle: + FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyMediumFamily, + color: FlutterFlowTheme + .of(context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + ), + hintStyle: + FlutterFlowTheme.of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .labelMediumFamily, + color: FlutterFlowTheme + .of(context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .labelMediumFamily), + ), + enabledBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of( + context) + .customColor5, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 10.0), + ), + focusedBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of( + context) + .primary, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 10.0), + ), + errorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of( + context) + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 10.0), + ), + focusedErrorBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of( + context) + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 10.0), + ), + suffixIcon: Icon( + Icons.person, + color: FlutterFlowTheme.of( + context) + .accent1, + ), + ), + style: + FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyMediumFamily, + color: + FlutterFlowTheme.of( + context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + ), + textAlign: TextAlign.start, + maxLines: null, validator: _model - .dateTimeTextControllerValidator + .personNameTextControllerValidator .asValidator(context), ), ), - Padding( - padding: - const EdgeInsetsDirectional.fromSTEB( - 24.0, 0.0, 24.0, 0.0), - child: InkWell( - splashColor: Colors.transparent, - focusColor: Colors.transparent, - hoverColor: Colors.transparent, - highlightColor: - Colors.transparent, - onTap: () async { - final datePickedDate = - await showDatePicker( - context: context, - initialDate: - getCurrentTimestamp, - firstDate: - (getCurrentTimestamp ?? - DateTime(1900)), - lastDate: DateTime(2050), - builder: (context, child) { - return wrapInMaterialDatePickerTheme( - context, - child!, - headerBackgroundColor: - FlutterFlowTheme.of( - context) - .primary, - headerForegroundColor: - FlutterFlowTheme.of( - context) - .info, - headerTextStyle: - FlutterFlowTheme.of( - context) - .headlineLarge - .override( - fontFamily: FlutterFlowTheme.of( + ), + ), + ], + ), + Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: 80.0, + child: Stack( + alignment: + const AlignmentDirectional(0.0, 0.0), + children: [ + Padding( + padding: const EdgeInsetsDirectional + .fromSTEB( + 24.0, 0.0, 24.0, 0.0), + child: TextFormField( + controller: _model + .dateTimeTextController, + focusNode: + _model.dateTimeFocusNode, + onChanged: (_) => + EasyDebounce.debounce( + '_model.dateTimeTextController', + const Duration(milliseconds: 500), + () => setState(() {}), + ), + autofocus: false, + obscureText: false, + decoration: InputDecoration( + isDense: false, + labelText: FFLocalizations.of( + context) + .getText( + '8zgsw5so' /* Data / Hora Limite da Visita */, + ), + labelStyle: + FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( context) - .headlineLargeFamily, - fontSize: 32.0, - letterSpacing: - 0.0, - fontWeight: - FontWeight - .w600, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - FlutterFlowTheme.of(context) - .headlineLargeFamily), - ), - pickerBackgroundColor: + .bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + ), + enabledBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of( context) - .secondaryBackground, - pickerForegroundColor: - FlutterFlowTheme.of( - context) - .primaryText, - selectedDateTimeBackgroundColor: + .customColor5, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 8.0), + ), + focusedBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of( context) .primary, - selectedDateTimeForegroundColor: + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 8.0), + ), + errorBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of( context) - .info, - actionButtonForegroundColor: + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 8.0), + ), + focusedErrorBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of( context) - .primaryText, - iconSize: 24.0, - ); - }, - ); - - TimeOfDay? datePickedTime; - if (datePickedDate != null) { - datePickedTime = - await showTimePicker( + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 8.0), + ), + suffixIcon: Icon( + Icons.date_range, + color: FlutterFlowTheme.of( + context) + .accent1, + ), + ), + style: + FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + ), + textAlign: TextAlign.start, + validator: _model + .dateTimeTextControllerValidator + .asValidator(context), + ), + ), + Padding( + padding: const EdgeInsetsDirectional + .fromSTEB( + 24.0, 0.0, 24.0, 0.0), + child: InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: + Colors.transparent, + onTap: () async { + final datePickedDate = + await showDatePicker( context: context, - initialTime: - TimeOfDay.fromDateTime( - getCurrentTimestamp), + initialDate: + getCurrentTimestamp, + firstDate: + (getCurrentTimestamp ?? + DateTime(1900)), + lastDate: DateTime(2050), builder: (context, child) { - return wrapInMaterialTimePickerTheme( + return wrapInMaterialDatePickerTheme( context, child!, headerBackgroundColor: @@ -657,173 +648,165 @@ class _ScheduleProvisionalVisitPageWidgetState ); }, ); - } - if (datePickedDate != null && - datePickedTime != null) { - safeSetState(() { - _model.datePicked = - DateTime( - datePickedDate.year, - datePickedDate.month, - datePickedDate.day, - datePickedTime!.hour, - datePickedTime.minute, + TimeOfDay? datePickedTime; + if (datePickedDate != null) { + datePickedTime = + await showTimePicker( + context: context, + initialTime: TimeOfDay + .fromDateTime( + getCurrentTimestamp), + builder: + (context, child) { + return wrapInMaterialTimePickerTheme( + context, + child!, + headerBackgroundColor: + FlutterFlowTheme.of( + context) + .primary, + headerForegroundColor: + FlutterFlowTheme.of( + context) + .info, + headerTextStyle: + FlutterFlowTheme.of( + context) + .headlineLarge + .override( + fontFamily: + FlutterFlowTheme.of(context) + .headlineLargeFamily, + fontSize: + 32.0, + letterSpacing: + 0.0, + fontWeight: + FontWeight + .w600, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of(context).headlineLargeFamily), + ), + pickerBackgroundColor: + FlutterFlowTheme.of( + context) + .secondaryBackground, + pickerForegroundColor: + FlutterFlowTheme.of( + context) + .primaryText, + selectedDateTimeBackgroundColor: + FlutterFlowTheme.of( + context) + .primary, + selectedDateTimeForegroundColor: + FlutterFlowTheme.of( + context) + .info, + actionButtonForegroundColor: + FlutterFlowTheme.of( + context) + .primaryText, + iconSize: 24.0, + ); + }, ); + } + + if (datePickedDate != null && + datePickedTime != null) { + safeSetState(() { + _model.datePicked = + DateTime( + datePickedDate.year, + datePickedDate.month, + datePickedDate.day, + datePickedTime!.hour, + datePickedTime.minute, + ); + }); + } + setState(() { + _model + .dateTimeTextController + ?.text = dateTimeFormat( + "dd/MM/yyyy HH:mm:ss", + _model.datePicked, + locale: + FFLocalizations.of( + context) + .languageCode, + ); + _model.dateTimeTextController + ?.selection = + TextSelection.collapsed( + offset: _model + .dateTimeTextController! + .text + .length); }); - } - setState(() { - _model.dateTimeTextController - ?.text = dateTimeFormat( - "dd/MM/yyyy HH:mm:ss", - _model.datePicked, - locale: FFLocalizations.of( - context) - .languageCode, - ); - _model.dateTimeTextController - ?.selection = - TextSelection.collapsed( - offset: _model - .dateTimeTextController! - .text - .length); - }); - }, - child: Container( - width: double.infinity, - height: 50.0, - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular( - 8.0), + }, + child: Container( + width: double.infinity, + height: 50.0, + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular( + 8.0), + ), + alignment: + const AlignmentDirectional( + 0.0, 0.0), ), - alignment: const AlignmentDirectional( - 0.0, 0.0), ), ), - ), - ], + ], + ), ), - ), - ], - ), - Column( - mainAxisSize: MainAxisSize.max, - children: [ - Align( - alignment: const AlignmentDirectional(0.0, 0.0), - child: Container( - height: 80.0, - decoration: const BoxDecoration(), + ], + ), + Column( + mainAxisSize: MainAxisSize.max, + children: [ + Align( alignment: const AlignmentDirectional(0.0, 0.0), - child: Align( + child: Container( + height: 80.0, + decoration: const BoxDecoration(), alignment: const AlignmentDirectional(0.0, 0.0), - child: Padding( - padding: - const EdgeInsetsDirectional.fromSTEB( - 24.0, 0.0, 24.0, 0.0), - child: SizedBox( - width: double.infinity, - child: TextFormField( - controller: - _model.notesTextController, - focusNode: - _model.notesFocusNode, - autofocus: false, - textInputAction: - TextInputAction.next, - obscureText: false, - decoration: InputDecoration( - isDense: false, - labelText: FFLocalizations.of( - context) - .getText( - 'cw8b3tbb' /* Observação da Visita */, - ), - hintStyle: FlutterFlowTheme - .of(context) - .labelMedium - .override( - fontFamily: - FlutterFlowTheme.of( - context) - .labelMediumFamily, - color: - FlutterFlowTheme.of( - context) - .primaryText, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - FlutterFlowTheme.of( - context) - .labelMediumFamily), - ), - enabledBorder: - OutlineInputBorder( - borderSide: BorderSide( - color: - FlutterFlowTheme.of( - context) - .customColor5, - width: 0.5, + child: Align( + alignment: + const AlignmentDirectional(0.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional + .fromSTEB( + 24.0, 0.0, 24.0, 0.0), + child: SizedBox( + width: double.infinity, + child: TextFormField( + controller: _model + .notesTextController, + focusNode: + _model.notesFocusNode, + autofocus: false, + textInputAction: + TextInputAction.next, + obscureText: false, + decoration: InputDecoration( + isDense: false, + labelText: + FFLocalizations.of( + context) + .getText( + 'cw8b3tbb' /* Observação da Visita */, ), - borderRadius: - BorderRadius.circular( - 10.0), - ), - focusedBorder: - OutlineInputBorder( - borderSide: BorderSide( - color: - FlutterFlowTheme.of( - context) - .primary, - width: 0.5, - ), - borderRadius: - BorderRadius.circular( - 10.0), - ), - errorBorder: - OutlineInputBorder( - borderSide: BorderSide( - color: - FlutterFlowTheme.of( - context) - .error, - width: 0.5, - ), - borderRadius: - BorderRadius.circular( - 10.0), - ), - focusedErrorBorder: - OutlineInputBorder( - borderSide: BorderSide( - color: - FlutterFlowTheme.of( - context) - .error, - width: 0.5, - ), - borderRadius: - BorderRadius.circular( - 10.0), - ), - suffixIcon: Icon( - Icons.text_fields, - color: FlutterFlowTheme.of( - context) - .accent1, - ), - ), - style: - FlutterFlowTheme.of(context) + labelStyle: FlutterFlowTheme + .of(context) .bodyMedium .override( fontFamily: @@ -841,108 +824,212 @@ class _ScheduleProvisionalVisitPageWidgetState context) .bodyMediumFamily), ), - textAlign: TextAlign.start, - maxLines: null, - maxLength: 100, - maxLengthEnforcement: - MaxLengthEnforcement - .enforced, - validator: _model - .notesTextControllerValidator - .asValidator(context), + hintStyle: FlutterFlowTheme + .of(context) + .labelMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .labelMediumFamily, + color: FlutterFlowTheme + .of(context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .labelMediumFamily), + ), + enabledBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: + FlutterFlowTheme.of( + context) + .customColor5, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 10.0), + ), + focusedBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: + FlutterFlowTheme.of( + context) + .primary, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 10.0), + ), + errorBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: + FlutterFlowTheme.of( + context) + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 10.0), + ), + focusedErrorBorder: + OutlineInputBorder( + borderSide: BorderSide( + color: + FlutterFlowTheme.of( + context) + .error, + width: 0.5, + ), + borderRadius: + BorderRadius.circular( + 10.0), + ), + suffixIcon: Icon( + Icons.text_fields, + color: + FlutterFlowTheme.of( + context) + .accent1, + ), + ), + style: FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: + FlutterFlowTheme.of( + context) + .bodyMediumFamily, + color: + FlutterFlowTheme.of( + context) + .primaryText, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts + .asMap() + .containsKey( + FlutterFlowTheme.of( + context) + .bodyMediumFamily), + ), + textAlign: TextAlign.start, + maxLines: 5, + maxLength: 100, + maxLengthEnforcement: + MaxLengthEnforcement + .enforced, + validator: _model + .notesTextControllerValidator + .asValidator(context), + ), ), ), ), ), ), - ), - ], - ), - ], + ], + ), + ], + ), ), ), - ), - FFButtonWidget( - onPressed: () async { - _model.provVisitSchedule = - await PhpGroup.postProvVisitSchedulingCall.call( - devUUID: FFAppState().devUUID, - userUUID: FFAppState().userUUID, - cliID: FFAppState().cliUUID, - atividade: 'putAgendamentoProv', - data: _model.dateTimeTextController.text, - motivo: _model.notesTextController.text, - nome: _model.personNameTextController.text, - proID: FFAppState().ownerUUID, - ); + FFButtonWidget( + onPressed: () async { + _model.provVisitSchedule = await PhpGroup + .postProvVisitSchedulingCall + .call( + devUUID: FFAppState().devUUID, + userUUID: FFAppState().userUUID, + cliID: FFAppState().cliUUID, + atividade: 'putAgendamentoProv', + data: _model.dateTimeTextController.text, + motivo: _model.notesTextController.text, + nome: _model.personNameTextController.text, + proID: FFAppState().ownerUUID, + ); - if (PhpGroup.postProvVisitSchedulingCall.error( - (_model.provVisitSchedule?.jsonBody ?? ''), - ) == - false) { - setState(() { - _model.dateTimeTextController?.clear(); - _model.personNameTextController?.clear(); - _model.notesTextController?.clear(); - }); - } else { - await showModalBottomSheet( - isScrollControlled: true, - backgroundColor: Colors.transparent, - enableDrag: false, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => - FocusScope.of(context).unfocus(), - child: Padding( - padding: MediaQuery.viewInsetsOf(context), - child: ThrowExceptionWidget( - msg: PhpGroup - .postProvVisitSchedulingCall - .msg( - (_model.provVisitSchedule?.jsonBody ?? - ''), - )!, + if (PhpGroup.postProvVisitSchedulingCall.error( + (_model.provVisitSchedule?.jsonBody ?? ''), + ) == + false) { + setState(() { + _model.dateTimeTextController?.clear(); + _model.personNameTextController?.clear(); + _model.notesTextController?.clear(); + }); + } else { + await showModalBottomSheet( + isScrollControlled: true, + backgroundColor: Colors.transparent, + enableDrag: false, + context: context, + builder: (context) { + return GestureDetector( + onTap: () => + FocusScope.of(context).unfocus(), + child: Padding( + padding: + MediaQuery.viewInsetsOf(context), + child: ThrowExceptionWidget( + msg: PhpGroup + .postProvVisitSchedulingCall + .msg( + (_model.provVisitSchedule + ?.jsonBody ?? + ''), + )!, + ), ), - ), - ); - }, - ).then((value) => safeSetState(() {})); - } + ); + }, + ).then((value) => safeSetState(() {})); + } - setState(() {}); - }, - text: FFLocalizations.of(context).getText( - 'bv5fg9sv' /* Enviar */, - ), - options: FFButtonOptions( - height: 40.0, - padding: const EdgeInsetsDirectional.fromSTEB( - 24.0, 0.0, 24.0, 0.0), - iconPadding: const EdgeInsetsDirectional.fromSTEB( - 0.0, 0.0, 0.0, 0.0), - color: FlutterFlowTheme.of(context).primary, - textStyle: FlutterFlowTheme.of(context) - .titleSmall - .override( - fontFamily: FlutterFlowTheme.of(context) - .titleSmallFamily, - color: Colors.white, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context) - .titleSmallFamily), - ), - elevation: 3.0, - borderSide: const BorderSide( - color: Colors.transparent, - width: 1.0, + setState(() {}); + }, + text: FFLocalizations.of(context).getText( + 'bv5fg9sv' /* Enviar */, + ), + options: FFButtonOptions( + height: 40.0, + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), + iconPadding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 0.0, 0.0), + color: FlutterFlowTheme.of(context).primary, + textStyle: FlutterFlowTheme.of(context) + .titleSmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .titleSmallFamily, + color: Colors.white, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .titleSmallFamily), + ), + elevation: 3.0, + borderSide: const BorderSide( + color: Colors.transparent, + width: 1.0, + ), + borderRadius: BorderRadius.circular(8.0), ), - borderRadius: BorderRadius.circular(8.0), ), - ), - ], + ], + ), ), ), ],