feat : list view item
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_pr
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
@@ -22,21 +23,26 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||
filteringWidget: filterBottomSheet(),
|
||||
widgets: [
|
||||
ObxValue((data) {
|
||||
return RPaginatedListView(
|
||||
listType: ListType.separated,
|
||||
resource: data.value,
|
||||
padding: EdgeInsets.fromLTRB(8, 8, 18, 80),
|
||||
itemBuilder: (context, index) => saleListItem(
|
||||
expandList: controller.isExpandedList,
|
||||
index: index,
|
||||
item: data.value.data![index],
|
||||
),
|
||||
itemCount: data.value.data?.length ?? 0,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||
onLoadMore: () async {},
|
||||
);
|
||||
}, controller.purchaseOutOfProvinceList),
|
||||
Expanded(
|
||||
child: ObxValue((data) {
|
||||
return RPaginatedListView(
|
||||
listType: ListType.separated,
|
||||
resource: data.value,
|
||||
padding: EdgeInsets.fromLTRB(8, 8, 18, 80),
|
||||
itemBuilder: (context, index) => ListItem(
|
||||
expandList: controller.isExpandedList,
|
||||
index: index,
|
||||
child: Container(height: 40, color: Colors.red),
|
||||
secondChild: Container(height: 80, color: Colors.blue),
|
||||
labelColor: AppColor.lightGreyNormalHover,
|
||||
labelIcon: Assets.vec.truckFastSvg.path,
|
||||
),
|
||||
itemCount: data.value.data?.length ?? 0,
|
||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||
onLoadMore: () async {},
|
||||
);
|
||||
}, controller.purchaseOutOfProvinceList),
|
||||
),
|
||||
],
|
||||
floatingActionButton: RFab.add(
|
||||
onPressed: () {
|
||||
@@ -751,36 +757,4 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/*ObxValue<RxBool> _buildSearchWidget() {
|
||||
return ObxValue((data) {
|
||||
return AnimatedContainer(
|
||||
duration: Duration(milliseconds: 300),
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
curve: Curves.easeInOut,
|
||||
height: data.value ? 50 : 0,
|
||||
child: Visibility(
|
||||
visible: data.value,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: RTextField(
|
||||
suffixIcon: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Assets.vec.searchSvg.svg(
|
||||
width: 10,
|
||||
height: 10,
|
||||
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||
),
|
||||
),
|
||||
hintText: 'جستجو',
|
||||
onChanged: (value) {
|
||||
controller.searchedValue.value = value;
|
||||
},
|
||||
controller: TextEditingController(),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}, controller.searchIsSelected);
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user