38 lines
897 B
Dart
38 lines
897 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import '../app.dart';
|
|
|
|
class ClearTextButton extends StatelessWidget {
|
|
final VoidCallback callback;
|
|
const ClearTextButton({
|
|
Key? key,
|
|
required this.callback,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.only(right: 8),
|
|
child: GestureDetector(
|
|
onTap: callback,
|
|
child: Container(
|
|
height: 20.h,
|
|
width: 20.w,
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
color: ThemeColor.grey.withOpacity(0.40),
|
|
),
|
|
child: Center(
|
|
child: Icon(
|
|
Icons.clear_outlined,
|
|
size: 16.sp,
|
|
color: ThemeColor.white,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|