This commit is contained in:
jantunesmesias 2024-08-26 17:36:58 -03:00
parent dc10abf4f9
commit f800f91190
1 changed files with 68 additions and 69 deletions

View File

@ -61,8 +61,8 @@ class _CardItemTemplateComponentWidgetState
final key = entry.key; final key = entry.key;
final text = entry.value.toString(); final text = entry.value.toString();
return Container( return Padding(
color: FlutterFlowTheme.of(context).primary, padding: const EdgeInsets.symmetric(vertical: 2.0),
child: Row( child: Row(
children: [ children: [
Text( Text(
@ -76,6 +76,7 @@ class _CardItemTemplateComponentWidgetState
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
), ),
), ),
const SizedBox(width: 8),
Expanded( Expanded(
child: Text( child: Text(
text, text,
@ -89,27 +90,23 @@ class _CardItemTemplateComponentWidgetState
FlutterFlowTheme.of(context).bodyMediumFamily), FlutterFlowTheme.of(context).bodyMediumFamily),
), ),
), ),
) ),
].divide(const Flexible(child: SizedBox(width: 25))), ],
), ),
); );
}).toList(); }).toList();
} }
Widget _generateImage() { Widget _generateImage() {
return Flexible( return ClipRRect(
child: SizedBox(
width: 100,
height: 100,
child: ClipRRect(
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
child: CachedNetworkImage( child: CachedNetworkImage(
fadeInDuration: const Duration(milliseconds: 500), fadeInDuration: const Duration(milliseconds: 500),
fadeOutDuration: const Duration(milliseconds: 500), fadeOutDuration: const Duration(milliseconds: 500),
imageUrl: widget.imagePath ?? '', imageUrl: widget.imagePath ?? '',
fit: BoxFit.cover, fit: BoxFit.cover,
), width: 90,
), height: 90,
), ),
); );
} }
@ -141,59 +138,61 @@ class _CardItemTemplateComponentWidgetState
} }
Widget _buildContent() { Widget _buildContent() {
final screenWidth = MediaQuery.of(context).size.width; return LayoutBuilder(
builder: (context, constraints) {
if (screenWidth > 360) { if (constraints.maxWidth > 360) {
return Row( return Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Expanded( Expanded(
child: Container(
color: FlutterFlowTheme.of(context).error,
child: Column( child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [ children: [
..._generateLabels(), ..._generateLabels(),
const SizedBox(height: 5),
Wrap( Wrap(
spacing: 8, spacing: 8,
runSpacing: 8, runSpacing: 4,
children: _generateStatus(), children: _generateStatus(),
), ),
], ]
), .addToEnd(const Flexible(child: SizedBox(height: 5)))
.divide(const Flexible(child: SizedBox(height: 1)))
.addToStart(const Flexible(child: SizedBox(height: 5))),
), ),
), ),
_generateImage(), _generateImage(),
], ]
.addToEnd(const SizedBox(width: 10))
.addToStart(const SizedBox(width: 10)),
); );
} else { } else {
return Column( return Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
_generateImage(), _generateImage(),
const SizedBox(height: 5), Container(
Expanded( color: FlutterFlowTheme.of(context).error,
padding: const EdgeInsets.all(8),
child: Column( child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [ children: [
..._generateLabels(), ..._generateLabels(),
const SizedBox(height: 5),
Wrap( Wrap(
spacing: 8, spacing: 8,
runSpacing: 8, runSpacing: 4,
children: _generateStatus(), children: _generateStatus(),
), ),
], ].divide(const Flexible(child: SizedBox(height: 5))),
), ),
), ),
], ].divide(const Flexible(child: SizedBox(height: 5))),
); );
} }
},
);
} }
@override @override