|
@@ -15,8 +15,12 @@ abstract class CheckBoxBuilderDelegate {
|
15
|
15
|
|
16
|
16
|
class DefaultCheckBoxBuilderDelegate extends CheckBoxBuilderDelegate {
|
17
|
17
|
Color activeColor;
|
|
18
|
+ Color unselectedColor;
|
18
|
19
|
|
19
|
|
- DefaultCheckBoxBuilderDelegate({this.activeColor = Colors.white});
|
|
20
|
+ DefaultCheckBoxBuilderDelegate({
|
|
21
|
+ this.activeColor = Colors.white,
|
|
22
|
+ this.unselectedColor = Colors.white,
|
|
23
|
+ });
|
20
|
24
|
|
21
|
25
|
@override
|
22
|
26
|
Widget buildCheckBox(
|
|
@@ -26,14 +30,18 @@ class DefaultCheckBoxBuilderDelegate extends CheckBoxBuilderDelegate {
|
26
|
30
|
Options options,
|
27
|
31
|
I18nProvider i18nProvider,
|
28
|
32
|
) {
|
29
|
|
- return CheckboxListTile(
|
30
|
|
- value: checked,
|
31
|
|
- onChanged: (bool check) {},
|
32
|
|
- activeColor: activeColor,
|
33
|
|
- title: Text(
|
34
|
|
- i18nProvider.getSelectedOptionsText(options),
|
35
|
|
- textAlign: TextAlign.end,
|
36
|
|
- style: TextStyle(color: options.textColor),
|
|
33
|
+ return Theme(
|
|
34
|
+ data: Theme.of(context).copyWith(unselectedWidgetColor: unselectedColor),
|
|
35
|
+ child: CheckboxListTile(
|
|
36
|
+ value: checked,
|
|
37
|
+ onChanged: (bool check) {},
|
|
38
|
+ activeColor: activeColor,
|
|
39
|
+ checkColor: unselectedColor,
|
|
40
|
+ title: Text(
|
|
41
|
+ i18nProvider.getSelectedOptionsText(options),
|
|
42
|
+ textAlign: TextAlign.end,
|
|
43
|
+ style: TextStyle(color: options.textColor),
|
|
44
|
+ ),
|
37
|
45
|
),
|
38
|
46
|
);
|
39
|
47
|
}
|