I am facing a problem with the default padding of the widgets (IconButton, CheckBox, FlatButton). I have searched a lot for this concern but with no success.
In the above image, the outer blue rect is the actual size of these widgets and I have to remove that space.
Checkbox(
onChanged: (value) {
setState(() {
_rememberMeFlag = !_rememberMeFlag;
});
},
value: _rememberMeFlag,
activeColor: const Color(0xff00bbff),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
)
and below is the widget code for hide/show widget icon:
new Container(
child: TextFormField(
decoration: InputDecoration(
labelText: "Password",
suffixIcon: Padding(
padding: EdgeInsetsDirectional.zero,
child: GestureDetector(
child: Icon(
hidePassword ? Icons.visibility : Icons.visibility_off,
size: 20.0,
color: Colors.black,
),
),
),
contentPadding: const EdgeInsets.only(
left: 0.0, top: 6.0, bottom: 6.0, right: 0.0),
),
obscureText: !hidePassword,
maxLength: 20,
),
)
I have tried to set the container size too but no luck. Also tried the padding properties of the widgets but with no success.
Is there any way to remove this extra spacing from these widgets?