This commit is contained in:
Вячеслав Иванов 2024-09-24 22:27:49 +04:00
parent f80bc53118
commit 16f0f53745
11 changed files with 78 additions and 82 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
assets/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -10,28 +10,27 @@ 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),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Padding( Center(
padding: const EdgeInsets.only(bottom: 16.0),
child: Image.network( child: Image.network(
data.image ?? '', data.image ?? '',
), ),
), ),
Padding( const SizedBox(height: 20),
padding: const EdgeInsets.only(bottom: 4.0), Text(data.text,
child: Text( style:
data.text, const TextStyle(fontSize: 24, fontWeight: FontWeight.bold)),
style: Theme.of(context).textTheme.headlineLarge, const SizedBox(height: 10),
), Text(data.descriptionText,
), style: const TextStyle(fontSize: 22, color: Colors.black87)),
Text( // Add more details here as needed
data.descriptionText,
style: Theme.of(context).textTheme.bodyLarge,
)
], ],
), ),
),
); );
} }
} }

View File

@ -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,24 +59,22 @@ class _Card extends StatelessWidget {
), ),
], ],
), ),
child: IntrinsicHeight( child: Column(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
ClipRRect( ClipRRect(
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(20),
topLeft: Radius.circular(20), topLeft: Radius.circular(20),
topRight: Radius.circular(20),
), ),
child: SizedBox( child: SizedBox(
height: double.infinity, height: 160,
width: 120, width: double.infinity,
child: Stack( child: Stack(
children: [ children: [
Positioned.fill( Positioned.fill(
child: Image.network( child: Image.network(
image ?? '', image ?? '',
fit: BoxFit.cover, fit: BoxFit.contain,
errorBuilder: (_, __, ___) => const Placeholder(), errorBuilder: (_, __, ___) => const Placeholder(),
), ),
), ),
@ -84,22 +82,22 @@ class _Card extends StatelessWidget {
), ),
), ),
), ),
Expanded( Padding(
child: Padding( padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
padding: const EdgeInsets.only(left: 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( Text(
descriptionText, descriptionText,
style: Theme.of(context).textTheme.bodyLarge, style: Theme.of(context).textTheme.bodyLarge,
) textAlign: TextAlign.center,
],
), ),
],
), ),
), ),
Align( Align(
@ -127,7 +125,6 @@ class _Card extends StatelessWidget {
], ],
), ),
), ),
),
); );
} }
} }

View File

@ -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),
)); ));
}); });

View File

@ -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: