item for sale ui improvements & translation added.

merge-requests/1/merge
Sikander Saleem 3 years ago
parent f647b32c65
commit 7eadd97869

@ -370,6 +370,20 @@
"offerAndDiscounts": "العروض والخصومات", "offerAndDiscounts": "العروض والخصومات",
"offerValid": "العرض صالح", "offerValid": "العرض صالح",
"offerExpired": "انتهى العرض", "offerExpired": "انتهى العرض",
"whatAreYouOffering": "ما الذي تعرضه؟",
"selectCategory": "اختر الفئة",
"inProgress": "في تَقَدم",
"locked": "مقفل",
"addDetails": "أضف التفاصيل",
"reviewAndSell": "مراجعة وبيع",
"itemTitle": "عنوان البند",
"itemCondition": "حالة السلعة",
"used": "تستخدم",
"region": "منطقة",
"selectRegion": "اختر المنطقة",
"itemPrice": "سعر السلعة",
"itemPhotos": "صور البند",
"itemInfo": "معلومات العنصر",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -370,6 +370,20 @@
"offerAndDiscounts": "Offer & Discounts", "offerAndDiscounts": "Offer & Discounts",
"offerValid": "Offer Valid", "offerValid": "Offer Valid",
"offerExpired": "Offer Expired", "offerExpired": "Offer Expired",
"whatAreYouOffering": "What are you offering?",
"selectCategory": "Select Category",
"inProgress": "InProgress",
"locked": "Locked",
"addDetails": "Add Details",
"reviewAndSell": "Review & Sell",
"itemTitle": "Item Title",
"itemCondition": "Item Condition",
"used": "Used",
"region": "Region",
"selectRegion": "Select Region",
"itemPrice": "Item Price",
"itemPhotos": "Item Photos",
"itemInfo": "Item Info",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -386,6 +386,20 @@ class CodegenLoader extends AssetLoader{
"offerAndDiscounts": "العروض والخصومات", "offerAndDiscounts": "العروض والخصومات",
"offerValid": "العرض صالح", "offerValid": "العرض صالح",
"offerExpired": "انتهى العرض", "offerExpired": "انتهى العرض",
"whatAreYouOffering": "ما الذي تعرضه؟",
"selectCategory": "اختر الفئة",
"inProgress": "في تَقَدم",
"locked": "مقفل",
"addDetails": "أضف التفاصيل",
"reviewAndSell": "مراجعة وبيع",
"itemTitle": "عنوان البند",
"itemCondition": "حالة السلعة",
"used": "تستخدم",
"region": "منطقة",
"selectRegion": "اختر المنطقة",
"itemPrice": "سعر السلعة",
"itemPhotos": "صور البند",
"itemInfo": "معلومات العنصر",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",
@ -792,6 +806,20 @@ static const Map<String,dynamic> en_US = {
"offerAndDiscounts": "Offer & Discounts", "offerAndDiscounts": "Offer & Discounts",
"offerValid": "Offer Valid", "offerValid": "Offer Valid",
"offerExpired": "Offer Expired", "offerExpired": "Offer Expired",
"whatAreYouOffering": "What are you offering?",
"selectCategory": "Select Category",
"inProgress": "InProgress",
"locked": "Locked",
"addDetails": "Add Details",
"reviewAndSell": "Review & Sell",
"itemTitle": "Item Title",
"itemCondition": "Item Condition",
"used": "Used",
"region": "Region",
"selectRegion": "Select Region",
"itemPrice": "Item Price",
"itemPhotos": "Item Photos",
"itemInfo": "Item Info",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -371,6 +371,20 @@ abstract class LocaleKeys {
static const offerAndDiscounts = 'offerAndDiscounts'; static const offerAndDiscounts = 'offerAndDiscounts';
static const offerValid = 'offerValid'; static const offerValid = 'offerValid';
static const offerExpired = 'offerExpired'; static const offerExpired = 'offerExpired';
static const whatAreYouOffering = 'whatAreYouOffering';
static const selectCategory = 'selectCategory';
static const inProgress = 'inProgress';
static const locked = 'locked';
static const addDetails = 'addDetails';
static const reviewAndSell = 'reviewAndSell';
static const itemTitle = 'itemTitle';
static const itemCondition = 'itemCondition';
static const used = 'used';
static const region = 'region';
static const selectRegion = 'selectRegion';
static const itemPrice = 'itemPrice';
static const itemPhotos = 'itemPhotos';
static const itemInfo = 'itemInfo';
static const profile_reset_password_label = 'profile.reset_password.label'; static const profile_reset_password_label = 'profile.reset_password.label';
static const profile_reset_password_username = 'profile.reset_password.username'; static const profile_reset_password_username = 'profile.reset_password.username';
static const profile_reset_password_password = 'profile.reset_password.password'; static const profile_reset_password_password = 'profile.reset_password.password';

@ -240,7 +240,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
], ],
).paddingOnly(left: 21, right: 21, top: 7), ).paddingOnly(left: 21, right: 21, top: 7),
ServicesWidget(), ServicesWidget(),
8.height, // 8.height,
Container( Container(
width: double.infinity, width: double.infinity,
padding: const EdgeInsets.only(top: 31), padding: const EdgeInsets.only(top: 31),

@ -33,9 +33,9 @@ class ServicesWidget extends StatelessWidget {
return data.isServicesMenusLoading return data.isServicesMenusLoading
? whileLoading() ? whileLoading()
: ListView.separated( : ListView.separated(
padding: const EdgeInsets.only(top: 21),
itemBuilder: (context, parentIndex) { itemBuilder: (context, parentIndex) {
return Container( return Column(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
@ -95,7 +95,6 @@ class ServicesWidget extends StatelessWidget {
itemCount: data.homeMenus![parentIndex].menuEntiesList.length), itemCount: data.homeMenus![parentIndex].menuEntiesList.length),
), ),
], ],
),
); );
}, },
separatorBuilder: (context, index) { separatorBuilder: (context, index) {
@ -149,7 +148,7 @@ class ServicesWidget extends StatelessWidget {
Widget whileLoading() { Widget whileLoading() {
return Column( return Column(
children: [ children: [
ServicesHeaderShimmer().paddingOnly(left: 21, right: 21), ServicesHeaderShimmer().paddingOnly(left: 21, right: 21, top: 21),
SizedBox( SizedBox(
height: 105 + 26, height: 105 + 26,
child: ListView.separated( child: ListView.separated(

@ -1,8 +1,11 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/items_for_sale/items_for_sale_api_client.dart'; import 'package:mohem_flutter_app/api/items_for_sale/items_for_sale_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/items_for_sale/get_sale_categories_list.dart'; import 'package:mohem_flutter_app/models/items_for_sale/get_sale_categories_list.dart';
import 'package:mohem_flutter_app/models/items_for_sale/item_review_model.dart'; import 'package:mohem_flutter_app/models/items_for_sale/item_review_model.dart';
import 'package:mohem_flutter_app/ui/screens/items_for_sale/fragments/add_details_fragment.dart'; import 'package:mohem_flutter_app/ui/screens/items_for_sale/fragments/add_details_fragment.dart';
@ -43,62 +46,27 @@ class _AddNewItemForSaleState extends State<AddNewItemForSale> {
getRequestID(); getRequestID();
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: AppBarWidget( appBar: AppBarWidget(context, title: LocaleKeys.itemsForSale.tr(), showHomeButton: true),
context,
// title: LocaleKeys.mowadhafhiRequest.tr(),
title: "Items for sale",
showHomeButton: true,
),
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
AspectRatio( Row(
aspectRatio: 335 / 118,
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
),
child: Row(
children: [ children: [
Expanded( showProgress(
child: showProgress( title: LocaleKeys.selectCategory.tr(),
title: "Select Category", status: _currentIndex == 0 ? LocaleKeys.inProgress.tr() : (_currentIndex > 0 ? LocaleKeys.completed.tr() : LocaleKeys.locked.tr()),
status: _currentIndex == 0
? "InProgress"
: _currentIndex > 0
? "Completed"
: "Locked",
color: _currentIndex == 0 ? MyColors.orange : MyColors.greenColor, color: _currentIndex == 0 ? MyColors.orange : MyColors.greenColor,
pageIndex: 0, pageIndex: 0,
), ).expanded,
), showProgress(
Expanded( title: LocaleKeys.addDetails.tr(),
child: showProgress( status: _currentIndex == 1 ? LocaleKeys.inProgress.tr() : (_currentIndex > 1 ? LocaleKeys.completed.tr() : LocaleKeys.locked.tr()),
title: "Add Details", color: _currentIndex == 1 ? MyColors.orange : (_currentIndex > 1 ? MyColors.greenColor : MyColors.lightGrayColor),
status: _currentIndex == 1
? "InProgress"
: _currentIndex > 1
? "Completed"
: "Locked",
color: _currentIndex == 1
? MyColors.orange
: _currentIndex > 1
? MyColors.greenColor
: MyColors.lightGrayColor,
pageIndex: 1, pageIndex: 1,
), ).expanded,
),
showProgress( showProgress(
title: "Review & Sell", title: LocaleKeys.reviewAndSell.tr(),
status: _currentIndex == 2 ? "InProgress" : "Locked", status: _currentIndex == 2 ? LocaleKeys.inProgress.tr() : LocaleKeys.locked.tr(),
color: _currentIndex == 2 color: _currentIndex == 2
? MyColors.orange ? MyColors.orange
: _currentIndex > 3 : _currentIndex > 3
@ -108,12 +76,9 @@ class _AddNewItemForSaleState extends State<AddNewItemForSale> {
pageIndex: 2, pageIndex: 2,
), ),
], ],
).paddingAll(21), ).paddingAll(21).objectContainerView(disablePadding: true).paddingAll(21),
).paddingOnly(left: 21, right: 21, top: 21), PageView(
), physics: const NeverScrollableScrollPhysics(),
Expanded(
child: PageView(
physics: NeverScrollableScrollPhysics(),
controller: _controller, controller: _controller,
onPageChanged: (index) { onPageChanged: (index) {
setState(() { setState(() {
@ -126,8 +91,7 @@ class _AddNewItemForSaleState extends State<AddNewItemForSale> {
getSaleCategoriesList.isNotEmpty ? AddItemDetailsFragment(changePageViewIndex: changePageViewIndex, selectedSaleCategory: getSaleCategoriesList[0]) : Container(), getSaleCategoriesList.isNotEmpty ? AddItemDetailsFragment(changePageViewIndex: changePageViewIndex, selectedSaleCategory: getSaleCategoriesList[0]) : Container(),
ItemReviewFragment(changePageViewIndex: changePageViewIndex), ItemReviewFragment(changePageViewIndex: changePageViewIndex),
], ],
), ).expanded,
),
], ],
), ),
); );
@ -139,9 +103,6 @@ class _AddNewItemForSaleState extends State<AddNewItemForSale> {
if (_currentIndex > pageIndex!) changePageViewIndex(pageIndex); if (_currentIndex > pageIndex!) changePageViewIndex(pageIndex);
}, },
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
@ -161,21 +122,15 @@ class _AddNewItemForSaleState extends State<AddNewItemForSale> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Utils.mDivider(Colors.grey), child: Utils.mDivider(Colors.grey),
)),
],
), ),
Utils.mHeight(8),
Text(
title!,
style: const TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
letterSpacing: -0.44,
), ),
],
), ),
Utils.mHeight(8),
title!.toText11(),
Utils.mHeight(2), Utils.mHeight(2),
Container( Container(
padding: EdgeInsets.all(5), padding: const EdgeInsets.only(left: 8, right: 8, top: 4, bottom: 4),
decoration: Utils.containerRadius(color.withOpacity(0.2), 4), decoration: Utils.containerRadius(color.withOpacity(0.2), 4),
child: Text( child: Text(
status!, status!,
@ -188,8 +143,6 @@ class _AddNewItemForSaleState extends State<AddNewItemForSale> {
), ),
), ),
], ],
)
],
), ),
); );
} }

@ -51,17 +51,19 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SingleChildScrollView( return Column(
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, ListView(
padding: const EdgeInsets.only(left: 21, right: 21, bottom: 21),
children: [ children: [
"Add details".toText20(isBold: true).paddingOnly(top: 24, left: 21, right: 21), LocaleKeys.addDetails.tr().toText20(),
12.height,
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
DynamicTextFieldWidget( DynamicTextFieldWidget(
"Title", LocaleKeys.title.tr(),
itemTitle.isEmpty ? "Item title" : itemTitle, itemTitle.isEmpty ? LocaleKeys.itemTitle.tr() : itemTitle,
isEnable: true, isEnable: true,
suffixIconData: Icons.search, suffixIconData: Icons.search,
isPopup: false, isPopup: false,
@ -71,10 +73,10 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
onChange: (String value) { onChange: (String value) {
itemTitle = value; itemTitle = value;
}, },
).paddingOnly(), ),
DynamicTextFieldWidget( DynamicTextFieldWidget(
"Description", LocaleKeys.description.tr(),
itemDescription.isEmpty ? "Item description" : itemDescription, itemDescription.isEmpty ? LocaleKeys.itemDescription.tr() : itemDescription,
isEnable: true, isEnable: true,
suffixIconData: Icons.search, suffixIconData: Icons.search,
isPopup: false, isPopup: false,
@ -85,15 +87,15 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
itemDescription = value; itemDescription = value;
}, },
).paddingOnly(top: 12), ).paddingOnly(top: 12),
"Item Condition".toText14(isBold: true).paddingOnly(top: 21), LocaleKeys.itemCondition.tr().toText14().paddingOnly(top: 21),
Row( Row(
children: [ children: [
ShowRadio(title: "New", value: "new", groupValue: selectedItemCondition, selectedColor: MyColors.gradiantStartColor).onPress(() { ShowRadio(title: LocaleKeys.newString.tr(), value: "new", groupValue: selectedItemCondition, selectedColor: MyColors.gradiantStartColor).onPress(() {
selectedItemCondition = "new"; selectedItemCondition = "new";
setState(() {}); setState(() {});
}), }),
12.width, 12.width,
ShowRadio(title: "Used", value: "used", groupValue: selectedItemCondition, selectedColor: MyColors.gradiantStartColor).onPress(() { ShowRadio(title: LocaleKeys.used.tr(), value: "used", groupValue: selectedItemCondition, selectedColor: MyColors.gradiantStartColor).onPress(() {
selectedItemCondition = "used"; selectedItemCondition = "used";
setState(() {}); setState(() {});
}), }),
@ -101,8 +103,8 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
).paddingOnly(top: 12), ).paddingOnly(top: 12),
PopupMenuButton( PopupMenuButton(
child: DynamicTextFieldWidget( child: DynamicTextFieldWidget(
"Region", LocaleKeys.region.tr(),
selectedRegion.regionName ?? "Select Region", selectedRegion.regionName ?? LocaleKeys.selectRegion.tr(),
isEnable: false, isEnable: false,
isPopup: true, isPopup: true,
isInputTypeNum: true, isInputTypeNum: true,
@ -117,8 +119,8 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
}, },
).paddingOnly(top: 21), ).paddingOnly(top: 21),
DynamicTextFieldWidget( DynamicTextFieldWidget(
"Item Price", LocaleKeys.itemPrice.tr(),
itemPrice == 0 ? "Price" : itemPrice.toString(), itemPrice == 0 ? LocaleKeys.price.tr() : itemPrice.toString(),
isEnable: true, isEnable: true,
suffixIconData: Icons.search, suffixIconData: Icons.search,
isPopup: false, isPopup: false,
@ -129,8 +131,13 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
itemPrice = num.parse(value); itemPrice = num.parse(value);
}, },
).paddingOnly(top: 12), ).paddingOnly(top: 12),
"Item Photos".toText14(isBold: true).paddingOnly(top: 16), LocaleKeys.itemPhotos.tr().toText14().paddingOnly(top: 21),
attachmentView("Attachments").paddingOnly(top: 12), attachmentView(LocaleKeys.attachments.tr()).paddingOnly(top: 12),
],
).objectContainerView(title: LocaleKeys.itemInfo.tr()),
],
).expanded,
1.divider,
Row( Row(
children: [ children: [
DefaultButton( DefaultButton(
@ -140,7 +147,7 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
}, },
colors: const [Color(0xffD02127), Color(0xffD02127)], colors: const [Color(0xffD02127), Color(0xffD02127)],
).expanded, ).expanded,
12.width, 8.width,
DefaultButton( DefaultButton(
LocaleKeys.next.tr(), LocaleKeys.next.tr(),
isButtonDisabled() isButtonDisabled()
@ -152,11 +159,8 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
disabledColor: MyColors.lightGrayColor, disabledColor: MyColors.lightGrayColor,
).expanded ).expanded
], ],
).paddingOnly(top: 21), ).insideContainer
], ],
).objectContainerView(title: "Item Info").paddingAll(21),
],
),
); );
} }
@ -174,20 +178,7 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
} }
Widget attachmentView(String title) { Widget attachmentView(String title) {
return Container( return Column(
padding: const EdgeInsets.only(top: 15, bottom: 15, left: 14, right: 14),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
@ -237,7 +228,8 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
child: Icon( child: Icon(
Icons.delete_sharp, Icons.delete_sharp,
color: Colors.red[300], color: Colors.red[300],
)) ),
)
], ],
), ),
); );
@ -245,11 +237,11 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
separatorBuilder: (cxt, index) => 6.height, separatorBuilder: (cxt, index) => 6.height,
itemCount: images.length), itemCount: images.length),
], ],
), ).objectContainerView();
);
} }
void getAdDetails() async { Future<void> getAdDetails() async {
// todo need to change this method later , its not a good approach to do it like this.
String details = await Utils.getStringFromPrefs(SharedPrefsConsts.editItemForSale); String details = await Utils.getStringFromPrefs(SharedPrefsConsts.editItemForSale);
var body = json.decode(details); var body = json.decode(details);
@ -274,17 +266,15 @@ class _AddItemDetailsFragmentState extends State<AddItemDetailsFragment> {
AddItemDetailsFragment.itemReviewModel = itemReviewModel; AddItemDetailsFragment.itemReviewModel = itemReviewModel;
SelectCategoryFragment.selectedSaleCategory = selectedSaleCategoryAd; SelectCategoryFragment.selectedSaleCategory = selectedSaleCategoryAd;
setState(() {});
} }
void getRegions() async { void getRegions() async {
try { try {
Utils.showLoading(context); Utils.showLoading(context);
getRegionsList = await ItemsForSaleApiClient().getRegions(); getRegionsList = await ItemsForSaleApiClient().getRegions();
await getAdDetails();
Utils.hideLoading(context); Utils.hideLoading(context);
setState(() {}); setState(() {});
getAdDetails();
} catch (ex) { } catch (ex) {
Utils.hideLoading(context); Utils.hideLoading(context);
Utils.handleException(ex, context, null); Utils.handleException(ex, context, null);

@ -1,7 +1,9 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/items_for_sale/get_sale_categories_list.dart'; import 'package:mohem_flutter_app/models/items_for_sale/get_sale_categories_list.dart';
class SelectCategoryFragment extends StatelessWidget { class SelectCategoryFragment extends StatelessWidget {
@ -18,11 +20,11 @@ class SelectCategoryFragment extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
"What are you offering".toText20(isBold: true).paddingOnly(top: 24, left: 21, right: 21), LocaleKeys.whatAreYouOffering.tr().toText20().paddingOnly(top: 0, left: 21, right: 21),
getSaleCategoriesList.isNotEmpty getSaleCategoriesList.isNotEmpty
? GridView( ? GridView(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 105 / 105, crossAxisSpacing: 12, mainAxisSpacing: 12), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 105 / 105, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: const EdgeInsets.only(top: 15, bottom: 15, left: 21, right: 21), padding: const EdgeInsets.only(top: 15, bottom: 21, left: 21, right: 21),
shrinkWrap: true, shrinkWrap: true,
primary: false, primary: false,
physics: const ScrollPhysics(), physics: const ScrollPhysics(),
@ -37,24 +39,14 @@ class SelectCategoryFragment extends StatelessWidget {
List<Widget> getItemsForSaleWidgets() { List<Widget> getItemsForSaleWidgets() {
List<Widget> itemsList = []; List<Widget> itemsList = [];
getSaleCategoriesList.forEach((element) { getSaleCategoriesList.forEach(
itemsList.add(InkWell( (element) {
itemsList.add(
InkWell(
onTap: () { onTap: () {
selectedSaleCategory = element; selectedSaleCategory = element;
changePageViewIndex(1); changePageViewIndex(1);
}, },
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.05),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -68,10 +60,11 @@ class SelectCategoryFragment extends StatelessWidget {
).expanded, ).expanded,
element.title!.toText12() element.title!.toText12()
], ],
).paddingOnly(left: 10, right: 10, bottom: 10, top: 12), ).paddingOnly(left: 10, right: 10, bottom: 10, top: 16).expanded.objectContainerView(disablePadding: true),
), ),
)); );
}); },
);
return itemsList; return itemsList;
} }

@ -46,7 +46,7 @@ class _ItemsForSaleState extends State<ItemsForSale> {
), ),
), ),
child: Row( child: Row(
children: [myTab(LocaleKeys.itemsForSale.tr(), 0), myTab("My posted ads", 1)], children: [myTab(LocaleKeys.itemsForSale.tr(), 0), myTab(LocaleKeys.myPostedAds.tr(), 1)],
), ),
), ),
PageView( PageView(

@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart'; import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart'; import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
class ShowRadio extends StatelessWidget { class ShowRadio extends StatelessWidget {
String title, value, groupValue; String title, value, groupValue;
@ -39,7 +38,7 @@ class ShowRadio extends StatelessWidget {
), ),
), ),
12.width, 12.width,
title.toText12(isBold: true, maxLine: 2) title.toText12(maxLine: 2)
], ],
); );
} }

Loading…
Cancel
Save