checkBox1a function

dynamic checkBox1a(
  1. BuildContext context,
  2. String text,
  3. Color color,
  4. TextStyle style,
  5. bool init,
  6. dynamic callback(
    1. bool?
    ),
)

Implementation

checkBox1a(BuildContext context, String text, Color color, TextStyle style, bool init, Function(bool?) callback){
  return Theme(
      data: Theme.of(context).copyWith(
      unselectedWidgetColor: Colors.grey,
      disabledColor: Colors.grey
  ),
  child: Row(
    mainAxisSize: MainAxisSize.min,
    children: <Widget>[
      SizedBox(
        height: 24.0,
        width: 24.0,
        child: Checkbox(
            value: init,
            activeColor: color,
            onChanged: callback
        ),),
      if (text.isNotEmpty)
        SizedBox(width: 10,),
      if (text.isNotEmpty)
        Flexible(
          child: FittedBox(
              fit: BoxFit.scaleDown,
              child: Text(text, style: style, overflow: TextOverflow.ellipsis,)))
    ],
  ));
}