39 lines
1.0 KiB
Dart
39 lines
1.0 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../../domain/models/card.dart';
|
|
import '../../presentation/home_page/home_page.dart';
|
|
|
|
class DetailPage extends StatelessWidget {
|
|
final CardData 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: 16.0),
|
|
child: Image.network(data.image ?? ''),),
|
|
|
|
Padding(padding: const EdgeInsets.only(bottom: 4.0),
|
|
child: Text(data.word,
|
|
style: Theme
|
|
.of(context)
|
|
.textTheme
|
|
.headlineLarge,)),
|
|
|
|
Text(data.translation,
|
|
style: Theme
|
|
.of(context)
|
|
.textTheme
|
|
.bodyLarge,)
|
|
],
|
|
)
|
|
);
|
|
}
|
|
}
|