Skip to content

Commit

Permalink
shopping screens ui issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nathansdev committed Jun 19, 2020
1 parent 139b392 commit 55ca7a0
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 83 deletions.
5 changes: 1 addition & 4 deletions lib/blog/blog_card_type_three.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class BlogCardTypeThree extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
flex: 2,
child: Row(
children: <Widget>[
Expanded(
Expand All @@ -142,9 +142,6 @@ class BlogCardTypeThree extends StatelessWidget {
],
),
),
SizedBox(
width: 20,
),
Expanded(
flex: 1,
child: Row(
Expand Down
2 changes: 1 addition & 1 deletion lib/blog/blog_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class _BlogDetailPageState extends State<BlogDetailPage> {
height: MediaQuery.of(context).size.height,
alignment: Alignment.topCenter,
child: CustomAppBar(
height: 150 - statusBarHeight,
height: kToolbarHeight + statusBarHeight + statusBarHeight,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expand Down
1 change: 1 addition & 0 deletions lib/custom_widgets/button_plain.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ButtonPlain extends StatelessWidget {
textColor: textColor,
child: Text(
text,
maxLines: 1,
style: TextStyle(
fontSize: textSize != null ? textSize : 12,
fontWeight: FontWeight.w800),
Expand Down
3 changes: 2 additions & 1 deletion lib/custom_widgets/chips_filter_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class _ChipsFilterWidgetState extends State<ChipsFilterWidget> {
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(right: 16.0, top: 16.0),
padding: const EdgeInsets.only(left: 12.0),
child: Wrap(
alignment: WrapAlignment.start,
spacing: 12,
runSpacing: 12,
children: List<Widget>.generate(
Expand Down
39 changes: 18 additions & 21 deletions lib/custom_widgets/pager_image_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class _PagerImageViewState extends State<PagerImageView> {
return Column(
children: <Widget>[
Container(
height: 310,
height: 300,
padding: EdgeInsets.symmetric(horizontal: 16),
child: PageView.builder(
physics: ClampingScrollPhysics(),
Expand All @@ -67,26 +67,23 @@ class _PagerImageViewState extends State<PagerImageView> {
controller: _pageController,
),
),
Padding(
padding: const EdgeInsets.all(24.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
for (int i = 0; i < _cards.length; i++)
if (i == currentPageValue) ...[
CircleDotWidget(
isActive: true,
color: white,
borderColor: white,
)
] else
CircleDotWidget(
isActive: false,
color: flamingo,
borderColor: wood_smoke,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
for (int i = 0; i < _cards.length; i++)
if (i == currentPageValue) ...[
CircleDotWidget(
isActive: true,
color: white,
borderColor: white,
)
] else
CircleDotWidget(
isActive: false,
color: flamingo,
borderColor: wood_smoke,
),
],
),
],
);
Expand Down
85 changes: 42 additions & 43 deletions lib/shopping/shop_grid_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,51 @@ class ShopGridItemWidget extends StatelessWidget {
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
decoration: ShapeDecoration(
color: shopItem.bgColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(16)),
side: BorderSide(color: wood_smoke, width: 2))),
child: SvgPicture.asset(
shopItem.image,
width: 155,
height: 170,
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
decoration: ShapeDecoration(
color: shopItem.bgColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(16)),
side: BorderSide(color: wood_smoke, width: 2))),
child: SvgPicture.asset(
shopItem.image,
width: 155,
height: 170,
),
SizedBox(
height: 2,
),
SizedBox(
height: 2,
),
Container(
alignment: Alignment.centerLeft,
child: Text(
shopItem.name,
maxLines: 2,
textAlign: TextAlign.start,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: wood_smoke, fontSize: 17, fontWeight: FontWeight.bold),
),
Container(
alignment: Alignment.centerLeft,
child: Text(
shopItem.name,
maxLines: 2,
textAlign: TextAlign.start,
style: TextStyle(
color: wood_smoke,
fontSize: 17,
fontWeight: FontWeight.bold),
),
),
SizedBox(
height: 2,
),
Container(
alignment: Alignment.centerLeft,
child: Text(
"\$" + shopItem.price,
textAlign: TextAlign.start,
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
color: trout, fontSize: 18, fontWeight: FontWeight.w800),
),
SizedBox(
height: 2,
),
Container(
alignment: Alignment.centerLeft,
child: Text(
"\$" + shopItem.price,
textAlign: TextAlign.start,
style: TextStyle(
color: trout, fontSize: 18, fontWeight: FontWeight.w800),
),
),
],
),
),
],
),
);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/shopping/shopping_card_pager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ class _ShoppingCardPagerState extends State<ShoppingCardPager> {
categoryBig: CategoryBig(
bgColor: lightening_yellow,
startColor: lightening_yellow,
name: "Summer Collection",
name: "Summer \nCollection",
image: "assets/images/shopping/peep_glass.svg"),
),
ShoppingCardPagerItem(
categoryBig: CategoryBig(
bgColor: lightening_yellow,
startColor: lightening_yellow,
name: "Tee Shirts",
name: "Tee \nShirts",
image: "assets/images/shopping/peep_glass.svg"),
),
ShoppingCardPagerItem(
categoryBig: CategoryBig(
bgColor: lightening_yellow,
startColor: lightening_yellow,
name: "Formal Pants",
name: "Formal \nPants",
image: "assets/images/shopping/peep_glass.svg"),
)
];
Expand Down
15 changes: 10 additions & 5 deletions lib/shopping/shopping_card_pager_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ShoppingCardPagerItem extends StatelessWidget {
child: Row(
children: <Widget>[
Expanded(
flex: 2,
flex: 4,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
Expand All @@ -31,6 +31,8 @@ class ShoppingCardPagerItem extends StatelessWidget {
padding: const EdgeInsets.only(left: 24.0, top: 24),
child: Text(
categoryBig.name,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: wood_smoke,
fontSize: 22,
Expand All @@ -53,10 +55,13 @@ class ShoppingCardPagerItem extends StatelessWidget {
],
),
),
SvgPicture.asset(
categoryBig.image,
width: 210,
height: 230,
Expanded(
flex: 4,
child: SvgPicture.asset(
categoryBig.image,
width: 210,
height: 230,
),
),
],
),
Expand Down
9 changes: 7 additions & 2 deletions lib/shopping/shopping_list_page_type_one.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class _ShoppingListPageOneState extends State<ShoppingListPageOne> {
_filters.add("Small");
_filters.add("Medium");
_filters.add("Shirt");
_filters.add("Shirt");
_filters.add("Shirt");
_filters.add("Tee");
_items.add(ShopItem(
image: "assets/images/shopping/coat_fur.svg",
Expand Down Expand Up @@ -122,8 +124,11 @@ class _ShoppingListPageOneState extends State<ShoppingListPageOne> {
body: SingleChildScrollView(
child: Column(
children: [
ChipsFilterWidget(
filters: _filters,
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: ChipsFilterWidget(
filters: _filters,
),
),
ListView.builder(
shrinkWrap: true,
Expand Down
11 changes: 8 additions & 3 deletions lib/shopping/shopping_list_page_type_two.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ class _ShoppingListPageTwoState extends State<ShoppingListPageTwo> {
child: Text(
" Summer \n Collection",
textAlign: TextAlign.start,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: white,
fontSize: 36,
Expand All @@ -125,15 +127,18 @@ class _ShoppingListPageTwoState extends State<ShoppingListPageTwo> {
),
],
),
ChipsFilterWidget(
filters: _filters,
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: ChipsFilterWidget(
filters: _filters,
),
),
GridView.builder(
padding: EdgeInsets.all(24),
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 16,
childAspectRatio: (1 / 1.5),
childAspectRatio: (1 / 1.7),
),
controller: new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
Expand Down

0 comments on commit 55ca7a0

Please sign in to comment.