40 lines
1.0 KiB
Dart
40 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
|
|
|
|
class DateSetting extends StatelessWidget {
|
|
final VoidCallback onTap;
|
|
final Widget icon;
|
|
|
|
const DateSetting({
|
|
Key? key,
|
|
required this.onTap,
|
|
required this.icon,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ZoomTapAnimation(
|
|
child: GestureDetector(
|
|
onTap: onTap,
|
|
child: Container(
|
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 8.h),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(8.r),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.black.withOpacity(0.01),
|
|
offset: const Offset(0, 4),
|
|
blurRadius: 14,
|
|
spreadRadius: 10,
|
|
),
|
|
],
|
|
),
|
|
child: icon,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|