feat:更新图片url路径
This commit is contained in:
@@ -31,17 +31,7 @@ class _RecipeTimeline extends State<RecipeTimeline> {
|
||||
}
|
||||
|
||||
Widget buildTimelineCard(BuildContext context, FoodRecord record) {
|
||||
final imageUrls = ['${AppConfig.baseApiUrl}/${record.imageUrl}'];
|
||||
|
||||
void imageTapClick() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder:
|
||||
(context) => ImagePreviewPage(images: imageUrls, initialIndex: 0),
|
||||
),
|
||||
);
|
||||
}
|
||||
final imageUrl = '${AppConfig.imageBaseUrl}${record.imageUrl}';
|
||||
|
||||
return buildCard(
|
||||
context: context,
|
||||
@@ -50,7 +40,10 @@ class _RecipeTimeline extends State<RecipeTimeline> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(Icons.date_range, color: Theme.of(context).colorScheme.primary),
|
||||
Icon(
|
||||
Icons.date_range,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
SizedBox(width: 5),
|
||||
Text(
|
||||
record.date,
|
||||
@@ -65,13 +58,7 @@ class _RecipeTimeline extends State<RecipeTimeline> {
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
GestureDetector(
|
||||
onTap: () => imageTapClick(),
|
||||
child: AspectRatio(
|
||||
aspectRatio: 1.5,
|
||||
child: buildNetworkImage(context, imageUrls.first),
|
||||
),
|
||||
),
|
||||
buildNetworkImage(context, imageUrl),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user