2024-03-19 11:09:07 +08:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:get/get.dart';
|
2024-03-19 13:27:42 +08:00
|
|
|
import 'package:sk_base_mobile/app_theme.dart';
|
|
|
|
import 'package:sk_base_mobile/constants/constants.dart';
|
2024-03-20 09:37:20 +08:00
|
|
|
import 'package:sk_base_mobile/screens/inventory_inout/inventory_inout_controller.dart';
|
2024-03-19 13:27:42 +08:00
|
|
|
import 'package:sk_base_mobile/util/util.dart';
|
2024-03-19 11:09:07 +08:00
|
|
|
|
|
|
|
class TodayButton extends StatelessWidget {
|
2024-03-27 11:06:01 +08:00
|
|
|
TodayButton({super.key});
|
|
|
|
final controller = Get.find<InventoryInoutController>();
|
2024-03-19 11:09:07 +08:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return InkWell(
|
2024-03-19 13:27:42 +08:00
|
|
|
borderRadius: BorderRadius.circular(ScreenAdaper.sp(30)),
|
2024-03-27 11:06:01 +08:00
|
|
|
onTap: () => controller.setEndTime(DateTime.now()),
|
2024-03-19 11:09:07 +08:00
|
|
|
child: Container(
|
2024-03-19 13:27:42 +08:00
|
|
|
height: ScreenAdaper.height(70),
|
|
|
|
width: ScreenAdaper.width(200),
|
2024-03-19 11:09:07 +08:00
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
2024-03-19 13:27:42 +08:00
|
|
|
borderRadius: BorderRadius.circular(ScreenAdaper.sp(30)),
|
|
|
|
boxShadow: [
|
2024-03-19 11:09:07 +08:00
|
|
|
BoxShadow(
|
2024-03-19 13:27:42 +08:00
|
|
|
color: AppTheme.primaryColorLight,
|
2024-03-21 16:22:00 +08:00
|
|
|
offset: Offset(0, ScreenAdaper.height(5)),
|
|
|
|
blurRadius: ScreenAdaper.sp(20))
|
2024-03-19 11:09:07 +08:00
|
|
|
],
|
|
|
|
gradient: const LinearGradient(
|
|
|
|
begin: Alignment.topLeft,
|
|
|
|
end: Alignment.bottomRight,
|
2024-03-19 13:27:42 +08:00
|
|
|
colors: [AppTheme.primaryColorLight, AppTheme.primaryColor])),
|
|
|
|
child: Text(
|
|
|
|
TextEnum.backToTodayButtonText,
|
2024-03-19 11:09:07 +08:00
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
2024-03-19 13:27:42 +08:00
|
|
|
fontSize: ScreenAdaper.sp(25),
|
2024-03-19 11:09:07 +08:00
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|