import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:sk_base_mobile/constants/bg_color.dart'; import 'package:sk_base_mobile/screens/inventory_inout/components/custom_app_bar.dart'; import 'package:sk_base_mobile/screens/inventory_inout/components/date_container.dart'; import 'package:sk_base_mobile/screens/inventory_inout/inventory_inout_controller.dart'; import 'package:sk_base_mobile/util/util.dart'; class UperBody extends StatelessWidget { UperBody({super.key}); final controller = Get.find(); @override Widget build(BuildContext context) { return Column( children: [ CustomAppBar(), SizedBox( height: ScreenAdaper.height(150), child: SmartRefresher( enablePullDown: false, enablePullUp: false, scrollDirection: Axis.horizontal, reverse: true, controller: controller.refreshController, child: ListView.builder( key: PageStorageKey('${controller.endTime.value}'), controller: controller.scrollController, itemCount: controller.daysNum, padding: EdgeInsets.only( bottom: ScreenAdaper.height(20), top: defaultPadding), itemBuilder: (context, index) { return InkWell( borderRadius: BorderRadius.circular(ScreenAdaper.sp(20)), onTap: () => controller.pageController.jumpToPage(index), child: DateContainer(index: index), ); }, ), ), ), ], ); } }