50 lines
1.3 KiB
Dart
50 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:satu/shared/app_colors.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
class LineCheckBox extends StatelessWidget {
|
|
const LineCheckBox(this.text, { required this.value });
|
|
final String text;
|
|
final bool value;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
decoration: const BoxDecoration(
|
|
color: whiteColor
|
|
),
|
|
child: Material(
|
|
color: Colors.transparent,
|
|
child: InkWell(
|
|
onTap: () {},
|
|
child: Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 15.w, vertical: 12.w),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
text,
|
|
style: TextStyle(
|
|
fontSize: 16.sp,
|
|
fontWeight: FontWeight.normal,
|
|
),
|
|
),
|
|
SizedBox(
|
|
width: 20.w,
|
|
child: Visibility(
|
|
visible: value,
|
|
child: const Icon(
|
|
Icons.check,
|
|
color: primaryColor,
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|