45 lines
1.2 KiB
Dart
45 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:app/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(),
|
|
body: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
SizedBox(
|
|
width: double.infinity,
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(bottom: 16.0),
|
|
child: Image.network(
|
|
data.imageUrl ?? '',
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left:5.0, bottom: 4.0),
|
|
child: Text(
|
|
data.text,
|
|
style: Theme.of(context).textTheme.headlineLarge,
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.all(9.0),
|
|
child: Text(
|
|
data.descriptionText,
|
|
style: Theme.of(context).textTheme.bodyLarge,
|
|
),
|
|
)
|
|
],
|
|
));
|
|
}
|
|
}
|