PIbd-31-Makarov-DV-MobilePr.../lib/views/details_page/details_page.dart

51 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import '../../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: Theme.of(context).colorScheme.inversePrimary,
),
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
color: Theme.of(context).colorScheme.inversePrimary,
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 10, bottom: 10),
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(20)),
child: Image.network(data.imageUrl)),
),
),
),
Padding(
padding: const EdgeInsets.all(10),
child: Text(
data.name,
style: Theme.of(context).textTheme.headlineLarge,
),
),
Padding(
padding: const EdgeInsets.all(10),
child: Text(
data.descr,
style: Theme.of(context).textTheme.bodyLarge,
),
)
],
),
),
);
}
}