52 lines
1.5 KiB
Dart
52 lines
1.5 KiB
Dart
|
import 'package:flutter/cupertino.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: 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 == ""
|
||
|
? "https://loremflickr.com/150/150?random=1"
|
||
|
: data.imageUrl)),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
Padding(
|
||
|
padding: const EdgeInsets.all(10),
|
||
|
child: Text(
|
||
|
data.textData,
|
||
|
style: Theme.of(context).textTheme.headlineLarge,
|
||
|
),
|
||
|
),
|
||
|
Padding(
|
||
|
padding: const EdgeInsets.all(10),
|
||
|
child: Text(
|
||
|
"This is card with some picture and provided text",
|
||
|
style: Theme.of(context).textTheme.bodyLarge,
|
||
|
),
|
||
|
)
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|