diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index e6234fd9..32db0a7c 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 = ""; }; - 6436409127A31CD500820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409D27A31CDC00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409F27A31CD400820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409C27A31CDE00820AF7 /* 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 = ( - 6436409127A31CD500820AF7 /* pt */, - 6436409D27A31CDC00820AF7 /* en */, + 6436409F27A31CD400820AF7 /* pt */, + 6436409C27A31CDE00820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart new file mode 100644 index 00000000..3f35acf9 --- /dev/null +++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart @@ -0,0 +1,13 @@ +import '/flutter_flow/flutter_flow_util.dart'; +import 'card_item_template_component_widget.dart' + show CardItemTemplateComponentWidget; +import 'package:flutter/material.dart'; + +class CardItemTemplateComponentModel + extends FlutterFlowModel { + @override + void initState(BuildContext context) {} + + @override + void dispose() {} +} diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart new file mode 100644 index 00000000..a3312e64 --- /dev/null +++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart @@ -0,0 +1,348 @@ +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'; + +class CardItemTemplateComponentWidget extends StatefulWidget { + const CardItemTemplateComponentWidget({ + super.key, + required this.labelsKeyValues, + required this.statusKeyValue, + required this.imageKeyValue, + required this.onTapCardItemAction, + }); + + final List? labelsKeyValues; + final List? statusKeyValue; + final String? imageKeyValue; + final Future Function()? onTapCardItemAction; + + @override + State createState() => + _CardItemTemplateComponentWidgetState(); +} + +class _CardItemTemplateComponentWidgetState + extends State { + late CardItemTemplateComponentModel _model; + + @override + void setState(VoidCallback callback) { + super.setState(callback); + _model.onUpdate(); + } + + @override + void initState() { + super.initState(); + _model = createModel(context, () => CardItemTemplateComponentModel()); + } + + @override + void dispose() { + _model.maybeDispose(); + + super.dispose(); + } + + @override + Widget build(BuildContext context) { + context.watch(); + + return InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + await widget.onTapCardItemAction?.call(); + }, + child: Card( + clipBehavior: Clip.antiAliasWithSaveLayer, + color: FlutterFlowTheme.of(context).secondaryBackground, + elevation: 5.0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8.0), + ), + child: Container( + width: 350.0, + height: 115.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).secondaryBackground, + ), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Container( + width: 100.0, + height: 100.0, + decoration: const BoxDecoration(), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Column( + mainAxisSize: MainAxisSize.max, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Text( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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), + ), + ), + Text( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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), + ), + ), + ] + .divide(const SizedBox(width: 1.0)) + .addToStart(const SizedBox(width: 10.0)), + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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), + ), + ), + Text( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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), + ), + ), + ] + .divide(const SizedBox(width: 1.0)) + .addToStart(const SizedBox(width: 10.0)), + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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), + ), + ), + Text( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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), + ), + ), + ] + .divide(const SizedBox(width: 1.0)) + .addToStart(const SizedBox(width: 10.0)), + ), + ].divide(const SizedBox(height: 1.0)), + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Container( + width: 200.0, + height: 27.0, + decoration: BoxDecoration( + color: valueOrDefault( + () { + if (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) { + return FlutterFlowTheme.of(context) + .success; + } else if ((widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last)) { + return FlutterFlowTheme.of(context).error; + } else if ((widget.statusKeyValue?.first == + widget.statusKeyValue?.first) == + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last)) { + return FlutterFlowTheme.of(context) + .warning; + } else { + return FlutterFlowTheme.of(context) + .primary; + } + }(), + FlutterFlowTheme.of(context).primary, + ), + borderRadius: BorderRadius.circular(5.0), + ), + child: Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Text( + () { + if (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) { + return FFLocalizations.of(context) + .getVariableText( + ptText: 'Ativo', + enText: 'Active', + ); + } else if ((widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last)) { + return FFLocalizations.of(context) + .getVariableText( + ptText: 'Cancelado', + enText: 'Canceled', + ); + } else { + return FFLocalizations.of(context) + .getVariableText( + ptText: 'Pendente', + enText: 'Pending', + ); + } + }(), + 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(height: 5.0)), + ), + ), + ), + Padding( + padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 10.0, 10.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(22.0), + child: CachedNetworkImage( + fadeInDuration: const Duration(milliseconds: 500), + fadeOutDuration: const Duration(milliseconds: 500), + imageUrl: valueOrDefault( + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.imageKeyValue}&tipo=${widget.imageKeyValue}', + 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg', + ), + fit: BoxFit.cover, + ), + ), + ), + ], + ), + ), + ), + ); + } +}