button1s2 function
dynamic
button1s2(
- String text,
- IconData icon,
- bool val,
- dynamic callback(), {
- Decoration? decor,
Implementation
button1s2(String text, IconData icon, bool val, Function(bool) callback, {Decoration? decor}) {
return Container(
margin: EdgeInsets.only(left: 10, right: 10),
padding: EdgeInsets.only(left: 10, right: 10, top: 15, bottom: 15),
decoration: decor,
child: Row(
children: [
Icon(icon, color: aTheme.darkMode ? Colors.white: Colors.black,),
SizedBox(width: 10,),
Expanded(child: Text(text, style: aTheme.style14W400,)),
Row(
children: [
CheckBox12((){return val;}, (bool val){
callback(val);
}, color: aTheme.mainColor),
],
),
],
)
);
}