Skip to content

Commit

Permalink
design : fix details
Browse files Browse the repository at this point in the history
  • Loading branch information
cho4u4o committed Oct 23, 2024
1 parent 05fbf86 commit 4e55d25
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 33 deletions.
16 changes: 9 additions & 7 deletions lib/widgets/carousel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:saphy/utils/colors.dart';
import 'package:saphy/utils/textstyles.dart';

class Carousel extends StatelessWidget {
const Carousel({super.key});
Expand All @@ -13,13 +14,14 @@ class Carousel extends StatelessWidget {
link:
"https://i.pinimg.com/736x/cf/aa/d7/cfaad78b35a7b752054dd564b77f1f10.jpg",
type: "Phone",
content: "iPhone 15도\nSaphy에서.",
content: "IPhone 16도\nSaphy에서.",
color: Colors.white,
),
(
link: "https://pbs.twimg.com/media/FQVX7vKX0AcgiRB.jpg",
type: "Collaboration",
content: "전 세계를 홀린\nKirby와의 콜라보!",
link:
"https://i.pinimg.com/736x/9d/e8/08/9de808527966126e0d92397b346fb06e.jpg",
type: "Phone",
content: "더욱 새로워진\nGalaxy S24.",
color: Colors.white
),
];
Expand Down Expand Up @@ -60,14 +62,14 @@ class Carousel extends StatelessWidget {
fit: BoxFit.cover),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 30),
padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 30),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
type,
style: TextStyle(color: color, fontSize: 25),
style: textStyle(25, false, white),
),
Text(
content,
Expand All @@ -76,7 +78,7 @@ class Carousel extends StatelessWidget {
fontFamily: 'Pretendard',
fontWeight: FontWeight.bold,
fontSize: 50,
height: 1.2),
height: 1.1),
),
const SizedBox(height: 20)
],
Expand Down
32 changes: 6 additions & 26 deletions lib/widgets/product_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:saphy/screens/products/product_detail_page.dart';
import 'package:saphy/utils/colors.dart';
import 'package:saphy/utils/number_format.dart';
import 'package:saphy/utils/textstyles.dart';
import "package:saphy/models/product.dart";
Expand All @@ -27,7 +28,7 @@ class ProductCard extends StatelessWidget {
},
child: Container(
width: (screenWidth - 55) / 2,
height: 240,
height: 230,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
Expand All @@ -49,33 +50,12 @@ class ProductCard extends StatelessWidget {
padding: const EdgeInsets.only(top: 10.0, left: 5.0),
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(product.name, style: bodyBoldText()),
Text(
product.brand,
style: const TextStyle(
fontFamily: "Pretendard",
fontSize: 10,
),
),
],
),
const SizedBox(
height: 4,
),
Text(
"${numberFormat.format(product.price)}원",
style: const TextStyle(
fontWeight: FontWeight.w800,
fontFamily: "Pretendard",
fontSize: 20,
),
),
Text("${numberFormat.format(product.price)}원",
style: textStyle(20, true, black)),
Text(product.name, style: textStyle(16, false, gray800)),
],
),
)
Expand Down

0 comments on commit 4e55d25

Please sign in to comment.