mobile_skt/lib/screens/inventory_inout/components/today_button.dart

44 lines
1.5 KiB
Dart

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