44 lines
1.5 KiB
Dart
44 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.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<InventoryInoutController>();
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
children: [
|
|
const SizedBox(
|
|
height: defaultPadding,
|
|
),
|
|
CustomAppBar(),
|
|
SizedBox(
|
|
height: ScreenAdaper.height(150),
|
|
child: ListView.builder(
|
|
key: PageStorageKey<String>('${controller.endTime.value}'),
|
|
controller: controller.scrollController,
|
|
shrinkWrap: true,
|
|
reverse: true,
|
|
itemCount: controller.daysNum,
|
|
scrollDirection: Axis.horizontal,
|
|
padding: EdgeInsets.only(
|
|
bottom: ScreenAdaper.height(20), top: defaultPadding),
|
|
itemBuilder: (context, index) {
|
|
return InkWell(
|
|
borderRadius: BorderRadius.circular(ScreenAdaper.sp(20)),
|
|
onTap: () => controller.setIndex(index),
|
|
child: DateContainer(index: index),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|