52 lines
1.6 KiB
Dart
52 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:pmu/domain/models/card.dart';
|
|
|
|
class DetailsPage extends StatelessWidget {
|
|
final CardData data;
|
|
|
|
const DetailsPage(this.data, {super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
backgroundColor: Colors.lightBlue, foregroundColor: Colors.white),
|
|
body: SingleChildScrollView(
|
|
child:Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
bottom: 4.0, top: 8.0, left: 8.0, right: 8.0),
|
|
child: Text(
|
|
data.text,
|
|
style: const TextStyle(
|
|
color: Colors.black,
|
|
fontWeight: FontWeight.w500,
|
|
fontSize: 26),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
bottom: 16.0, top: 8.0, left: 8.0, right: 8.0),
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
child: Image.network(
|
|
data.imageUrl ?? '',
|
|
fit: BoxFit.cover,
|
|
))),
|
|
Padding(
|
|
padding: const EdgeInsets.only(
|
|
bottom: 4.0, top: 8.0, left: 8.0, right: 8.0),
|
|
child: Text(
|
|
data.descText,
|
|
style: Theme.of(context).textTheme.bodyMedium,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|