WIP
This commit is contained in:
parent
dc10abf4f9
commit
f800f91190
|
@ -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(
|
borderRadius: BorderRadius.circular(20),
|
||||||
width: 100,
|
child: CachedNetworkImage(
|
||||||
height: 100,
|
fadeInDuration: const Duration(milliseconds: 500),
|
||||||
child: ClipRRect(
|
fadeOutDuration: const Duration(milliseconds: 500),
|
||||||
borderRadius: BorderRadius.circular(20),
|
imageUrl: widget.imagePath ?? '',
|
||||||
child: CachedNetworkImage(
|
fit: BoxFit.cover,
|
||||||
fadeInDuration: const Duration(milliseconds: 500),
|
width: 90,
|
||||||
fadeOutDuration: const Duration(milliseconds: 500),
|
height: 90,
|
||||||
imageUrl: widget.imagePath ?? '',
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -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(
|
child: Column(
|
||||||
color: FlutterFlowTheme.of(context).error,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child: Column(
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.max,
|
children: [
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
..._generateLabels(),
|
||||||
children: [
|
Wrap(
|
||||||
..._generateLabels(),
|
spacing: 8,
|
||||||
const SizedBox(height: 5),
|
runSpacing: 4,
|
||||||
Wrap(
|
children: _generateStatus(),
|
||||||
spacing: 8,
|
),
|
||||||
runSpacing: 8,
|
]
|
||||||
children: _generateStatus(),
|
.addToEnd(const Flexible(child: SizedBox(height: 5)))
|
||||||
),
|
.divide(const Flexible(child: SizedBox(height: 1)))
|
||||||
],
|
.addToStart(const Flexible(child: SizedBox(height: 5))),
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
_generateImage(),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
_generateImage(),
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
Expanded(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
..._generateLabels(),
|
|
||||||
const SizedBox(height: 5),
|
|
||||||
Wrap(
|
|
||||||
spacing: 8,
|
|
||||||
runSpacing: 8,
|
|
||||||
children: _generateStatus(),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
_generateImage(),
|
||||||
),
|
]
|
||||||
],
|
.addToEnd(const SizedBox(width: 10))
|
||||||
);
|
.addToStart(const SizedBox(width: 10)),
|
||||||
}
|
);
|
||||||
|
} else {
|
||||||
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
children: [
|
||||||
|
_generateImage(),
|
||||||
|
Container(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
..._generateLabels(),
|
||||||
|
Wrap(
|
||||||
|
spacing: 8,
|
||||||
|
runSpacing: 4,
|
||||||
|
children: _generateStatus(),
|
||||||
|
),
|
||||||
|
].divide(const Flexible(child: SizedBox(height: 5))),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
].divide(const Flexible(child: SizedBox(height: 5))),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
Loading…
Reference in New Issue