Done?
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 8.8 KiB |
BIN
assets/logo.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
assets/logo.png
Before Width: | Height: | Size: 32 KiB |
@ -10,27 +10,26 @@ class DetailsPage extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(),
|
||||||
body: Column(
|
body: Padding(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: const EdgeInsets.all(20),
|
||||||
children: [
|
child: Column(
|
||||||
Padding(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
padding: const EdgeInsets.only(bottom: 16.0),
|
children: [
|
||||||
child: Image.network(
|
Center(
|
||||||
data.image ?? '',
|
child: Image.network(
|
||||||
|
data.image ?? '',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 20),
|
||||||
Padding(
|
Text(data.text,
|
||||||
padding: const EdgeInsets.only(bottom: 4.0),
|
style:
|
||||||
child: Text(
|
const TextStyle(fontSize: 24, fontWeight: FontWeight.bold)),
|
||||||
data.text,
|
const SizedBox(height: 10),
|
||||||
style: Theme.of(context).textTheme.headlineLarge,
|
Text(data.descriptionText,
|
||||||
),
|
style: const TextStyle(fontSize: 22, color: Colors.black87)),
|
||||||
),
|
// Add more details here as needed
|
||||||
Text(
|
],
|
||||||
data.descriptionText,
|
),
|
||||||
style: Theme.of(context).textTheme.bodyLarge,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,9 @@ class _Card extends StatelessWidget {
|
|||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: const EdgeInsets.all(16),
|
margin: const EdgeInsets.all(16),
|
||||||
constraints: const BoxConstraints(minHeight: 160),
|
constraints: const BoxConstraints(minHeight: 240),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white70,
|
color: Colors.white30,
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
@ -59,73 +59,70 @@ class _Card extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: IntrinsicHeight(
|
child: Column(
|
||||||
child: Row(
|
children: [
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
ClipRRect(
|
||||||
children: [
|
borderRadius: const BorderRadius.only(
|
||||||
ClipRRect(
|
topLeft: Radius.circular(20),
|
||||||
borderRadius: const BorderRadius.only(
|
topRight: Radius.circular(20),
|
||||||
bottomLeft: Radius.circular(20),
|
),
|
||||||
topLeft: Radius.circular(20),
|
child: SizedBox(
|
||||||
),
|
height: 160,
|
||||||
child: SizedBox(
|
width: double.infinity,
|
||||||
height: double.infinity,
|
child: Stack(
|
||||||
width: 120,
|
children: [
|
||||||
child: Stack(
|
Positioned.fill(
|
||||||
children: [
|
child: Image.network(
|
||||||
Positioned.fill(
|
image ?? '',
|
||||||
child: Image.network(
|
fit: BoxFit.contain,
|
||||||
image ?? '',
|
errorBuilder: (_, __, ___) => const Placeholder(),
|
||||||
fit: BoxFit.cover,
|
|
||||||
errorBuilder: (_, __, ___) => const Placeholder(),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
),
|
||||||
child: Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 16.0),
|
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
text,
|
text,
|
||||||
style: Theme.of(context).textTheme.headlineSmall,
|
style: Theme.of(context).textTheme.headlineSmall,
|
||||||
),
|
textAlign: TextAlign.center,
|
||||||
Text(
|
|
||||||
descriptionText,
|
|
||||||
style: Theme.of(context).textTheme.bodyLarge,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
Text(
|
||||||
|
descriptionText,
|
||||||
|
style: Theme.of(context).textTheme.bodyLarge,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Align(
|
),
|
||||||
alignment: Alignment.bottomRight,
|
Align(
|
||||||
child: Padding(
|
alignment: Alignment.bottomRight,
|
||||||
padding: const EdgeInsets.only(left: 8, right: 16, bottom: 16),
|
child: Padding(
|
||||||
child: GestureDetector(
|
padding: const EdgeInsets.only(left: 8, right: 16, bottom: 16),
|
||||||
onTap: () => onLike?.call(id, text, isLiked),
|
child: GestureDetector(
|
||||||
child: AnimatedSwitcher(
|
onTap: () => onLike?.call(id, text, isLiked),
|
||||||
duration: const Duration(milliseconds: 200),
|
child: AnimatedSwitcher(
|
||||||
child: isLiked
|
duration: const Duration(milliseconds: 200),
|
||||||
? const Icon(
|
child: isLiked
|
||||||
Icons.favorite,
|
? const Icon(
|
||||||
color: Colors.redAccent,
|
Icons.favorite,
|
||||||
key: ValueKey<int>(0),
|
color: Colors.redAccent,
|
||||||
)
|
key: ValueKey<int>(0),
|
||||||
: const Icon(
|
)
|
||||||
Icons.favorite_border,
|
: const Icon(
|
||||||
key: ValueKey<int>(1),
|
Icons.favorite_border,
|
||||||
),
|
key: ValueKey<int>(1),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -187,7 +187,7 @@ class _BodyState extends State<_Body> {
|
|||||||
'$title ${isLiked ? context.locale.liked : context.locale.disliked}',
|
'$title ${isLiked ? context.locale.liked : context.locale.disliked}',
|
||||||
style: Theme.of(context).textTheme.bodyLarge,
|
style: Theme.of(context).textTheme.bodyLarge,
|
||||||
),
|
),
|
||||||
backgroundColor: Colors.orangeAccent,
|
backgroundColor: Colors.white,
|
||||||
duration: const Duration(seconds: 1),
|
duration: const Duration(seconds: 1),
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -47,7 +47,7 @@ dev_dependencies:
|
|||||||
|
|
||||||
flutter_icons:
|
flutter_icons:
|
||||||
android: "ic_launcher"
|
android: "ic_launcher"
|
||||||
image_path: "assets/logo.png"
|
image_path: "assets/logo.jpg"
|
||||||
min_sdk_android: 21
|
min_sdk_android: 21
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
|