57 lines
1.8 KiB
Dart
57 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:sk_base_mobile/screens/inventory_inout/inventory_inout_controller.dart';
|
|
import 'package:sk_base_mobile/util/util.dart';
|
|
|
|
class Dates extends StatelessWidget {
|
|
Dates({super.key, required this.index});
|
|
final int index;
|
|
final controller = Get.find<InventoryInoutController>();
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Obx(
|
|
() => Text(
|
|
SkDateUtil.getMonth(
|
|
controller.endTime.value.add(Duration(days: -index))),
|
|
style: TextStyle(
|
|
color: controller.currentIndex.value == index
|
|
? Colors.white
|
|
: Colors.black,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: ScreenAdaper.height(18),
|
|
height: 0),
|
|
),
|
|
),
|
|
Obx(
|
|
() => Text(
|
|
SkDateUtil.getDate(
|
|
controller.endTime.value.add(Duration(days: -index))),
|
|
style: TextStyle(
|
|
color: controller.currentIndex.value == index
|
|
? Colors.white
|
|
: Colors.black,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: ScreenAdaper.height(30),
|
|
height: 0),
|
|
),
|
|
),
|
|
Obx(
|
|
() => Text(
|
|
SkDateUtil.getDay(
|
|
controller.endTime.value.add(Duration(days: -index))),
|
|
style: TextStyle(
|
|
color: controller.currentIndex.value == index
|
|
? Colors.white
|
|
: Colors.black,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: ScreenAdaper.height(16)),
|
|
),
|
|
)
|
|
],
|
|
);
|
|
}
|
|
}
|