34 lines
870 B
Dart
34 lines
870 B
Dart
import 'package:flutter/material.dart';
|
||
|
||
class DetailPage extends StatelessWidget {
|
||
final String info;
|
||
final String? imgUrl;
|
||
|
||
const DetailPage({super.key, required this.info, this.imgUrl});
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Scaffold(
|
||
appBar: AppBar(
|
||
title: const Text('Информация о продукции'),
|
||
),
|
||
body: Padding(
|
||
padding: const EdgeInsets.all(16.0),
|
||
child: Column(
|
||
children: [
|
||
Text(
|
||
info,
|
||
style: const TextStyle(fontSize: 18.0),
|
||
),
|
||
Image.network(
|
||
imgUrl ?? 'https://hlebzavod3.ru/images/virtuemart/product/011_IMG_9657.jpg',
|
||
fit: BoxFit.cover,
|
||
height: 150.0,
|
||
width: double.infinity,
|
||
),
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}
|
||
} |