PMU-PIbd-31-Potapov-N-S/lib/presentation/detail_pages/card_detail_page.dart

43 lines
1.1 KiB
Dart
Raw Normal View History

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:pmu/domain/card.dart';
class DetailPage extends StatelessWidget {
final CardPostData data;
const DetailPage(this.data, {super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 4.0),
child: Image.network(
data.imageUrl ?? '',
fit: BoxFit.cover,
width: double.infinity,
),
),
Padding(
padding: const EdgeInsets.all(4.0),
child: Text(
data.name,
style: const TextStyle(color: Colors.black, fontSize: 30),
),
),
Padding(
padding: const EdgeInsets.all(4.0),
child: Text(
data.description,
style: const TextStyle(color: Colors.black, fontSize: 20),
),
),
],
),
);
}
}