I am using CheckboxListTile in this way:
ListTileTheme(
contentPadding: EdgeInsets.only(right: 20.0),
child: CheckboxListTile(
controlAffinity: ListTileControlAffinity.leading,
value: false,
onChanged: (value) {},
title: Text(
"افزودن به فهرست پرکاربردها"
),
),
),
and it's result :

How can I decrease space between checkbox and it's title?
use Transform.translate
Transform.translate(
offset: const Offset(-20, 0),
child: childWidget(),
)
Complete Example
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: CheckboxListTile(
value: isChecked,
controlAffinity: ListTileControlAffinity.leading,
contentPadding: EdgeInsets.zero,
title: Transform.translate(
offset: const Offset(-20, 0),
child: RichText(
text: TextSpan(
text: S.of(context).iAgreeWith,
style: TextStyle(
color: Theme.of(context).hintColor,
fontWeight: FontWeight.w400),
children: <TextSpan>[
TextSpan(
text: S.of(context).terms,
style: TextStyle(
decoration: TextDecoration.underline,
color: Theme.of(context).hintColor,
fontWeight: FontWeight.w400),
recognizer: TapGestureRecognizer()
..onTap = () {
// Single tapped.
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => WebView(
url:
ksportsCornerWebsitePolicyUrl,
title: S.of(context).termsCap,
),
));
},
),
TextSpan(
text: " " + S.of(context).and + " ",
style: TextStyle(
color: Theme.of(context).hintColor,
fontWeight: FontWeight.w400)),
TextSpan(
text: S.of(context).privacyPolicy,
style: TextStyle(
decoration: TextDecoration.underline,
color: Theme.of(context).hintColor,
//fontSize: 14.0.sp,
fontWeight: FontWeight.w400),
recognizer: TapGestureRecognizer()
..onTap = () {
// Single tapped.
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => WebView(
url:
ksportsCornerWebsitePolicyUrl,
title: S
.of(context)
.privacyPolicyCaps,
),
));
},
),
],
),
),
),
activeColor: Theme.of(context).hintColor,
checkColor: Theme.of(context).cursorColor,
onChanged: (value) {
isChecked = !isChecked;
setState(() {});
},
),
),

Add horizontalTitleGap: 0, to ListTileTheme.
ListTileTheme(
horizontalTitleGap: 0,
child: CheckboxListTile(
controlAffinity: ListTileControlAffinity.leading,
value: false,
onChanged: (value) {},
title: Text(
"افزودن به فهرست پرکاربردها"
),
),
),
Before :

After:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With