2024-10-03 01:00:26 +04:00
|
|
|
import 'package:flutter/material.dart';
|
2024-12-16 22:59:15 +04:00
|
|
|
import 'package:flutter_android_app/components/extensions/context_x.dart';
|
2024-10-03 01:00:26 +04:00
|
|
|
import 'package:flutter_android_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(
|
2024-12-16 22:59:15 +04:00
|
|
|
appBar: AppBar(
|
|
|
|
title: Text(context.locale.detailsPageAppBarTitle),
|
|
|
|
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
|
|
|
),
|
2024-10-03 01:00:26 +04:00
|
|
|
body: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(bottom: 16),
|
|
|
|
child: Image.network(data.imageUrl ?? ''),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(bottom: 4),
|
|
|
|
child: Text(data.title, style: Theme.of(context).textTheme.headlineLarge),
|
|
|
|
),
|
2024-12-15 23:23:00 +04:00
|
|
|
Text(data.currentPrice, style: Theme.of(context).textTheme.bodyLarge),
|
2024-10-03 01:00:26 +04:00
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|