diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 1f9d87a2..bc29890e 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -44,8 +44,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 = ""; }; - 6436409227A31CD600820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409227A31CDA00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409127A31CD300820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409227A31CD300820AF7 /* 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 = ""; }; /* End PBXFileReference section */ @@ -225,8 +225,8 @@ 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 6436409227A31CD600820AF7 /* pt */, - 6436409227A31CDA00820AF7 /* en */, + 6436409127A31CD300820AF7 /* pt */, + 6436409227A31CD300820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart index 505e51d8..13b68aea 100644 --- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart @@ -1,4 +1,5 @@ import '/backend/api_requests/api_calls.dart'; +import '/flutter_flow/flutter_flow_icon_button.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import 'package:flutter/material.dart'; @@ -77,163 +78,206 @@ class _BottomArrowLinkedLocalsComponentWidgetState topRight: Radius.circular(0.0), ), ), - child: FutureBuilder( - future: PhpGroup.getLocalsCall.call( - devUUID: FFAppState().devUUID, - userUUID: FFAppState().userUUID, - ), - builder: (context, snapshot) { - // Customize what your widget looks like when it's loading. - if (!snapshot.hasData) { - return Center( - child: SizedBox( - width: 50.0, - height: 50.0, - child: SpinKitCircle( - color: FlutterFlowTheme.of(context).primary, - size: 50.0, - ), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: 100.0, + height: 100.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context) + .secondaryBackground, + ), + child: FlutterFlowIconButton( + borderRadius: 20.0, + borderWidth: 1.0, + buttonSize: 40.0, + fillColor: FlutterFlowTheme.of(context).accent1, + icon: Icon( + Icons.add, + color: FlutterFlowTheme.of(context).primary, + size: 24.0, ), - ); - } - final gridViewGetLocalsResponse = snapshot.data!; - - return Builder( - builder: (context) { - final eachLocals = PhpGroup.getLocalsCall - .locais( - gridViewGetLocalsResponse.jsonBody, - ) - ?.map((e) => e) - .toList() - .toList() ?? - []; - - return GridView.builder( - padding: EdgeInsets.zero, - gridDelegate: - const SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 1, - crossAxisSpacing: 10.0, - mainAxisSpacing: 0.0, - childAspectRatio: 1.0, - ), - scrollDirection: Axis.horizontal, - itemCount: eachLocals.length, - itemBuilder: (context, eachLocalsIndex) { - final eachLocalsItem = - eachLocals[eachLocalsIndex]; - return InkWell( - splashColor: Colors.transparent, - focusColor: Colors.transparent, - hoverColor: Colors.transparent, - highlightColor: Colors.transparent, - onTap: () async { - FFAppState().cliUUID = getJsonField( - eachLocalsItem, - r'''$.CLI_ID''', - ).toString(); - setState(() {}); - FFAppState().local = getJsonField( - eachLocalsItem, - r'''$.CLI_NOME''', - ).toString(); - setState(() {}); - FFAppState().ownerUUID = getJsonField( - eachLocalsItem, - r'''$.CLU_OWNER_ID''', - ).toString(); - setState(() {}); - Navigator.pop(context); - }, - child: Container( + onPressed: () { + print('IconButton pressed ...'); + }, + ), + ), + Expanded( + child: FutureBuilder( + future: PhpGroup.getLocalsCall.call( + devUUID: FFAppState().devUUID, + userUUID: FFAppState().userUUID, + ), + builder: (context, snapshot) { + // Customize what your widget looks like when it's loading. + if (!snapshot.hasData) { + return Center( + child: SizedBox( width: 50.0, - height: double.infinity, - decoration: const BoxDecoration(), - alignment: const AlignmentDirectional(0.0, 0.0), - child: Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Container( - width: 100.0, - height: 100.0, - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context) - .primaryText, - borderRadius: const BorderRadius.only( - bottomLeft: Radius.circular(25.0), - bottomRight: - Radius.circular(25.0), - topLeft: Radius.circular(25.0), - topRight: Radius.circular(25.0), - ), - border: Border.all( - color: - FlutterFlowTheme.of(context) - .secondaryText, - width: 3.0, - ), - ), - child: ClipRRect( - borderRadius: const BorderRadius.only( - bottomLeft: Radius.circular(25.0), - bottomRight: - Radius.circular(25.0), - topLeft: Radius.circular(25.0), - topRight: Radius.circular(25.0), - ), - child: Image.network( - 'https://freaccess.com.br/freaccess/Images/Clients/${getJsonField( - eachLocalsItem, - r'''$.CLI_ID''', - ).toString()}.png', - width: double.infinity, - height: double.infinity, - fit: BoxFit.fill, - alignment: const Alignment(0.0, 0.0), - ), - ), - ), - Padding( - padding: - const EdgeInsetsDirectional.fromSTEB( - 0.0, 10.0, 0.0, 0.0), - child: Text( - getJsonField( - eachLocalsItem, - r'''$.CLI_NOME''', - ).toString(), - 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), - ), - ), - ), - ], + height: 50.0, + child: SpinKitCircle( + color: + FlutterFlowTheme.of(context).primary, + size: 50.0, ), ), ); - }, - ); - }, - ); - }, + } + final gridViewGetLocalsResponse = snapshot.data!; + + return Builder( + builder: (context) { + final eachLocals = PhpGroup.getLocalsCall + .locais( + gridViewGetLocalsResponse.jsonBody, + ) + ?.map((e) => e) + .toList() + .toList() ?? + []; + + return GridView.builder( + padding: EdgeInsets.zero, + gridDelegate: + const SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 1, + crossAxisSpacing: 10.0, + mainAxisSpacing: 0.0, + childAspectRatio: 1.0, + ), + scrollDirection: Axis.horizontal, + itemCount: eachLocals.length, + itemBuilder: (context, eachLocalsIndex) { + final eachLocalsItem = + eachLocals[eachLocalsIndex]; + return InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + FFAppState().cliUUID = getJsonField( + eachLocalsItem, + r'''$.CLI_ID''', + ).toString(); + setState(() {}); + FFAppState().local = getJsonField( + eachLocalsItem, + r'''$.CLI_NOME''', + ).toString(); + setState(() {}); + FFAppState().ownerUUID = getJsonField( + eachLocalsItem, + r'''$.CLU_OWNER_ID''', + ).toString(); + setState(() {}); + Navigator.pop(context); + }, + child: Container( + width: 50.0, + height: double.infinity, + decoration: const BoxDecoration(), + alignment: + const AlignmentDirectional(0.0, 0.0), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Container( + width: 100.0, + height: 100.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of( + context) + .primaryText, + borderRadius: + const BorderRadius.only( + bottomLeft: + Radius.circular(25.0), + bottomRight: + Radius.circular(25.0), + topLeft: + Radius.circular(25.0), + topRight: + Radius.circular(25.0), + ), + border: Border.all( + color: FlutterFlowTheme.of( + context) + .secondaryText, + width: 3.0, + ), + ), + child: ClipRRect( + borderRadius: + const BorderRadius.only( + bottomLeft: + Radius.circular(25.0), + bottomRight: + Radius.circular(25.0), + topLeft: + Radius.circular(25.0), + topRight: + Radius.circular(25.0), + ), + child: Image.network( + 'https://freaccess.com.br/freaccess/Images/Clients/${getJsonField( + eachLocalsItem, + r'''$.CLI_ID''', + ).toString()}.png', + width: double.infinity, + height: double.infinity, + fit: BoxFit.fill, + alignment: + const Alignment(0.0, 0.0), + ), + ), + ), + Padding( + padding: const EdgeInsetsDirectional + .fromSTEB( + 0.0, 10.0, 0.0, 0.0), + child: Text( + getJsonField( + eachLocalsItem, + r'''$.CLI_NOME''', + ).toString(), + 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), + ), + ), + ), + ], + ), + ), + ); + }, + ); + }, + ); + }, + ), + ), + ].addToStart(const SizedBox(width: 20.0)), ), ), ], diff --git a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart index 5ff542ae..f4db990c 100644 --- a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart +++ b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart @@ -80,7 +80,7 @@ class _MenuStaggeredViewComponentWidgetState ), crossAxisSpacing: 10.0, mainAxisSpacing: 10.0, - itemCount: 8, + itemCount: 9, padding: const EdgeInsets.fromLTRB( 0, 10.0, @@ -1002,6 +1002,123 @@ de Liberação */ ), ), ), + () => InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + await widget.liberationHistoryOptAction?.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.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( + Icons.settings_rounded, + color: + FlutterFlowTheme.of(context) + .accent1, + size: 24.0, + ), + ), + ), + ), + ), + ], + ), + ), + Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Align( + alignment: + const AlignmentDirectional(0.0, 0.0), + child: Text( + FFLocalizations.of(context).getText( + 'dzk31zpc' /* Preferencias +do Sistema */ + , + ), + 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)), + ), + ), + ), + ), ][index](); }, ), diff --git a/lib/components/view_visit_detail/view_visit_detail_model.dart b/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart similarity index 100% rename from lib/components/view_visit_detail/view_visit_detail_model.dart rename to lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart diff --git a/lib/components/view_visit_detail/view_visit_detail_widget.dart b/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart similarity index 100% rename from lib/components/view_visit_detail/view_visit_detail_widget.dart rename to lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart diff --git a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart index f305c4de..a4052e41 100644 --- a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart +++ b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart @@ -1,5 +1,5 @@ import '/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart'; -import '/components/view_visit_detail/view_visit_detail_widget.dart'; +import '/components/templates_components/view_visit_detail/view_visit_detail_widget.dart'; import '/flutter_flow/flutter_flow_util.dart'; import 'visit_details_modal_template_component_widget.dart' show VisitDetailsModalTemplateComponentWidget; diff --git a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart index 889c76c2..7e668742 100644 --- a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart +++ b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart @@ -1,5 +1,5 @@ import '/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart'; -import '/components/view_visit_detail/view_visit_detail_widget.dart'; +import '/components/templates_components/view_visit_detail/view_visit_detail_widget.dart'; import '/flutter_flow/flutter_flow_util.dart'; import 'package:flutter/material.dart'; import 'visit_details_modal_template_component_model.dart'; diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart index b56429ba..dc120945 100644 --- a/lib/flutter_flow/internationalization.dart +++ b/lib/flutter_flow/internationalization.dart @@ -152,7 +152,7 @@ final kTranslationsMap = >>[ 'en': 'FREE ACCESS', }, 'mp6igsok': { - 'pt': 'Home', + 'pt': '', 'en': '', }, }, @@ -490,6 +490,28 @@ final kTranslationsMap = >>[ 'en': '', }, }, + // preferencesPage + { + '1vyj6y7n': { + 'pt': 'Preferencias', + 'en': '', + }, + 'uv1iug83': { + 'pt': '', + 'en': '', + }, + }, + // settingsPage + { + 'bc698859': { + 'pt': 'Preferencias', + 'en': '', + }, + '8fgc7z33': { + 'pt': '', + 'en': '', + }, + }, // visitorDetailsModalTemplateComponent { 'kqzf7nx2': { @@ -836,6 +858,10 @@ final kTranslationsMap = >>[ 'pt': 'Histórico\nde Liberação', 'en': 'Liberation\nHistory', }, + 'dzk31zpc': { + 'pt': 'Preferencias\ndo Sistema', + 'en': '', + }, }, // messageWellComponent { diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index fb4887f7..d6c54bca 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -6,6 +6,7 @@ import 'package:provider/provider.dart'; import '/backend/schema/structs/index.dart'; import '/index.dart'; +import '/main.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; @@ -62,7 +63,9 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter( FFRoute( name: 'homePage', path: '/homePage', - builder: (context, params) => const HomePageWidget(), + builder: (context, params) => params.isEmpty + ? const NavBarPage(initialPage: 'homePage') + : const HomePageWidget(), ), FFRoute( name: 'registerVisitorPage', @@ -147,6 +150,18 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter( name: 'qrCodePage', path: '/qrCodePage', builder: (context, params) => const QrCodePageWidget(), + ), + FFRoute( + name: 'preferencesPage', + path: '/preferencesPage', + builder: (context, params) => const PreferencesPageWidget(), + ), + FFRoute( + name: 'settingsPage', + path: '/settingsPage', + builder: (context, params) => params.isEmpty + ? const NavBarPage(initialPage: 'settingsPage') + : const SettingsPageWidget(), ) ].map((r) => r.toRoute(appStateNotifier)).toList(), ); diff --git a/lib/index.dart b/lib/index.dart index e7526939..996c7347 100644 --- a/lib/index.dart +++ b/lib/index.dart @@ -16,3 +16,6 @@ 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/qr_code_page/qr_code_page_widget.dart' show QrCodePageWidget; +export '/pages/preferences_page/preferences_page_widget.dart' + show PreferencesPageWidget; +export '/pages/settings_page/settings_page_widget.dart' show SettingsPageWidget; diff --git a/lib/main.dart b/lib/main.dart index 05c412f7..c8c93049 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,6 +6,7 @@ import 'package:flutter_web_plugins/url_strategy.dart'; import 'flutter_flow/flutter_flow_theme.dart'; import 'flutter_flow/flutter_flow_util.dart'; import 'flutter_flow/internationalization.dart'; +import 'index.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); @@ -119,3 +120,74 @@ class _MyAppState extends State { ); } } + +class NavBarPage extends StatefulWidget { + const NavBarPage({super.key, this.initialPage, this.page}); + + final String? initialPage; + final Widget? page; + + @override + _NavBarPageState createState() => _NavBarPageState(); +} + +/// This is the private State class that goes with NavBarPage. +class _NavBarPageState extends State { + String _currentPageName = 'homePage'; + late Widget? _currentPage; + + @override + void initState() { + super.initState(); + _currentPageName = widget.initialPage ?? _currentPageName; + _currentPage = widget.page; + } + + @override + Widget build(BuildContext context) { + final tabs = { + 'homePage': const HomePageWidget(), + 'settingsPage': const SettingsPageWidget(), + }; + final currentIndex = tabs.keys.toList().indexOf(_currentPageName); + + return Scaffold( + body: _currentPage ?? tabs[_currentPageName], + bottomNavigationBar: BottomNavigationBar( + currentIndex: currentIndex, + onTap: (i) => setState(() { + _currentPage = null; + _currentPageName = tabs.keys.toList()[i]; + }), + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + selectedItemColor: FlutterFlowTheme.of(context).primary, + unselectedItemColor: FlutterFlowTheme.of(context).primaryText, + showSelectedLabels: false, + showUnselectedLabels: false, + type: BottomNavigationBarType.fixed, + items: [ + BottomNavigationBarItem( + icon: const Icon( + Icons.home, + size: 24.0, + ), + label: FFLocalizations.of(context).getText( + 'mp6igsok' /* */, + ), + tooltip: '', + ), + BottomNavigationBarItem( + icon: const Icon( + Icons.settings_rounded, + size: 24.0, + ), + label: FFLocalizations.of(context).getText( + '8fgc7z33' /* */, + ), + tooltip: '', + ) + ], + ), + ); + } +} diff --git a/lib/pages/preferences_page/preferences_page_model.dart b/lib/pages/preferences_page/preferences_page_model.dart new file mode 100644 index 00000000..dfe2b66b --- /dev/null +++ b/lib/pages/preferences_page/preferences_page_model.dart @@ -0,0 +1,27 @@ +import '/flutter_flow/flutter_flow_util.dart'; +import 'preferences_page_widget.dart' show PreferencesPageWidget; +import 'package:flutter/material.dart'; + +class PreferencesPageModel extends FlutterFlowModel { + /// Local state fields for this page. + + bool fingerprint = false; + + bool? person; + + bool? changPass; + + bool? notify; + + /// State fields for stateful widgets in this page. + + final unfocusNode = FocusNode(); + + @override + void initState(BuildContext context) {} + + @override + void dispose() { + unfocusNode.dispose(); + } +} diff --git a/lib/pages/preferences_page/preferences_page_widget.dart b/lib/pages/preferences_page/preferences_page_widget.dart new file mode 100644 index 00000000..917b4a2a --- /dev/null +++ b/lib/pages/preferences_page/preferences_page_widget.dart @@ -0,0 +1,167 @@ +import '/flutter_flow/flutter_flow_icon_button.dart'; +import '/flutter_flow/flutter_flow_theme.dart'; +import '/flutter_flow/flutter_flow_util.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'preferences_page_model.dart'; +export 'preferences_page_model.dart'; + +class PreferencesPageWidget extends StatefulWidget { + const PreferencesPageWidget({super.key}); + + @override + State createState() => _PreferencesPageWidgetState(); +} + +class _PreferencesPageWidgetState extends State { + late PreferencesPageModel _model; + + final scaffoldKey = GlobalKey(); + + @override + void initState() { + super.initState(); + _model = createModel(context, () => PreferencesPageModel()); + } + + @override + void dispose() { + _model.dispose(); + + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () => _model.unfocusNode.canRequestFocus + ? FocusScope.of(context).requestFocus(_model.unfocusNode) + : FocusScope.of(context).unfocus(), + child: Scaffold( + key: scaffoldKey, + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + appBar: AppBar( + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + automaticallyImplyLeading: false, + title: Text( + FFLocalizations.of(context).getText( + '1vyj6y7n' /* Preferencias */, + ), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 17.0, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + ), + ), + actions: const [], + centerTitle: true, + elevation: 0.0, + ), + body: SafeArea( + top: true, + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 20.0, 0.0), + child: GridView( + padding: const EdgeInsets.fromLTRB( + 0, + 20.0, + 0, + 20.0, + ), + gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 3, + crossAxisSpacing: 10.0, + mainAxisSpacing: 10.0, + childAspectRatio: 1.0, + ), + shrinkWrap: true, + scrollDirection: Axis.vertical, + children: [ + FlutterFlowIconButton( + borderRadius: 20.0, + borderWidth: 1.0, + buttonSize: double.infinity, + fillColor: FlutterFlowTheme.of(context).primary, + disabledColor: FlutterFlowTheme.of(context).alternate, + disabledIconColor: FlutterFlowTheme.of(context).primary, + icon: Icon( + Icons.fingerprint, + color: FlutterFlowTheme.of(context).primaryBackground, + size: 40.0, + ), + onPressed: _model.fingerprint + ? null + : () { + print('IconButton pressed ...'); + }, + ), + FlutterFlowIconButton( + borderRadius: 20.0, + borderWidth: 1.0, + buttonSize: 40.0, + fillColor: FlutterFlowTheme.of(context).primary, + disabledColor: FlutterFlowTheme.of(context).alternate, + disabledIconColor: FlutterFlowTheme.of(context).primary, + icon: Icon( + Icons.person, + color: FlutterFlowTheme.of(context).primaryBackground, + size: 40.0, + ), + onPressed: _model.person! + ? null + : () { + print('IconButton pressed ...'); + }, + ), + FlutterFlowIconButton( + borderRadius: 20.0, + borderWidth: 1.0, + buttonSize: 40.0, + fillColor: FlutterFlowTheme.of(context).primary, + disabledColor: FlutterFlowTheme.of(context).alternate, + disabledIconColor: FlutterFlowTheme.of(context).primary, + icon: Icon( + Icons.notifications_active, + color: FlutterFlowTheme.of(context).primaryBackground, + size: 40.0, + ), + onPressed: _model.notify! + ? null + : () { + print('IconButton pressed ...'); + }, + ), + FlutterFlowIconButton( + borderRadius: 20.0, + borderWidth: 1.0, + buttonSize: 40.0, + fillColor: FlutterFlowTheme.of(context).primary, + disabledColor: FlutterFlowTheme.of(context).alternate, + disabledIconColor: FlutterFlowTheme.of(context).primary, + icon: Icon( + Icons.password_sharp, + color: FlutterFlowTheme.of(context).primaryBackground, + size: 40.0, + ), + onPressed: _model.changPass! + ? null + : () { + print('IconButton pressed ...'); + }, + ), + ], + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/settings_page/settings_page_model.dart b/lib/pages/settings_page/settings_page_model.dart new file mode 100644 index 00000000..1fa111cc --- /dev/null +++ b/lib/pages/settings_page/settings_page_model.dart @@ -0,0 +1,17 @@ +import '/flutter_flow/flutter_flow_util.dart'; +import 'settings_page_widget.dart' show SettingsPageWidget; +import 'package:flutter/material.dart'; + +class SettingsPageModel extends FlutterFlowModel { + /// State fields for stateful widgets in this page. + + final unfocusNode = FocusNode(); + + @override + void initState(BuildContext context) {} + + @override + void dispose() { + unfocusNode.dispose(); + } +} diff --git a/lib/pages/settings_page/settings_page_widget.dart b/lib/pages/settings_page/settings_page_widget.dart new file mode 100644 index 00000000..11227b96 --- /dev/null +++ b/lib/pages/settings_page/settings_page_widget.dart @@ -0,0 +1,71 @@ +import '/flutter_flow/flutter_flow_theme.dart'; +import '/flutter_flow/flutter_flow_util.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'settings_page_model.dart'; +export 'settings_page_model.dart'; + +class SettingsPageWidget extends StatefulWidget { + const SettingsPageWidget({super.key}); + + @override + State createState() => _SettingsPageWidgetState(); +} + +class _SettingsPageWidgetState extends State { + late SettingsPageModel _model; + + final scaffoldKey = GlobalKey(); + + @override + void initState() { + super.initState(); + _model = createModel(context, () => SettingsPageModel()); + } + + @override + void dispose() { + _model.dispose(); + + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () => _model.unfocusNode.canRequestFocus + ? FocusScope.of(context).requestFocus(_model.unfocusNode) + : FocusScope.of(context).unfocus(), + child: Scaffold( + key: scaffoldKey, + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + appBar: AppBar( + backgroundColor: FlutterFlowTheme.of(context).primary, + automaticallyImplyLeading: false, + title: Text( + FFLocalizations.of(context).getText( + 'bc698859' /* Preferencias */, + ), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: 'Nunito', + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 17.0, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + ), + ), + actions: const [], + centerTitle: true, + elevation: 0.0, + ), + body: const SafeArea( + top: true, + child: Column( + mainAxisSize: MainAxisSize.max, + children: [], + ), + ), + ), + ); + } +}