46 lines
992 B
Dart
46 lines
992 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rkm/config/color_palette.dart';
|
|
import 'package:rkm/widgets/text_default.dart';
|
|
|
|
class CheckBoxSubtitle extends StatelessWidget {
|
|
|
|
double width;
|
|
String subtitle;
|
|
bool checkbox;
|
|
var onChanged;
|
|
double fontSize;
|
|
var ontap;
|
|
|
|
CheckBoxSubtitle({
|
|
this.width = double.infinity,
|
|
required this.checkbox,
|
|
required this.subtitle,
|
|
required this.onChanged,
|
|
this.fontSize = 14,
|
|
this.ontap = null
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
|
|
return GestureDetector(
|
|
onTap: ontap,
|
|
child: Container(
|
|
width: width,
|
|
child: Row(
|
|
children: [
|
|
Checkbox(
|
|
value: checkbox,
|
|
onChanged: onChanged
|
|
),
|
|
Container(
|
|
width: width,
|
|
child: TextDefault(text: subtitle,fontSize: fontSize,color: ColorPalette.black54,maxLines: 2,)
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|