54 lines
1.2 KiB
Dart
54 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rkm/config/color_palette.dart';
|
|
import 'package:rkm/widgets/text_default.dart';
|
|
|
|
class CheckBoxTwoSubtitle extends StatelessWidget {
|
|
|
|
double width;
|
|
String subtitle1;
|
|
String subtitle2;
|
|
bool checkbox1;
|
|
bool checkbox2;
|
|
var onChanged1;
|
|
var onChanged2;
|
|
|
|
CheckBoxTwoSubtitle({
|
|
this.width = double.infinity,
|
|
required this.checkbox1,
|
|
required this.checkbox2,
|
|
required this.subtitle1,
|
|
required this.subtitle2,
|
|
required this.onChanged1,
|
|
required this.onChanged2,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
width: width,
|
|
child: Row(
|
|
children: [
|
|
Checkbox(
|
|
value: checkbox1,
|
|
onChanged: onChanged1
|
|
),
|
|
Container(
|
|
width: width/2.5,
|
|
child: TextDefault(text: subtitle1,fontSize: 14,color: ColorPalette.black54,)
|
|
),
|
|
Spacer(),
|
|
Checkbox(
|
|
value: checkbox2,
|
|
onChanged: onChanged2
|
|
),
|
|
Container(
|
|
width: width/3,
|
|
child: TextDefault(text: subtitle2,fontSize: 14,color: ColorPalette.black54)
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|