button1s function
dynamic
button1s(
- String text,
- IconData icon,
- String route,
- dynamic callback(), {
- Decoration? decor,
Implementation
button1s(String text, IconData icon, String route, Function(String) callback, {Decoration? decor}) {
return InkWell(
onTap: (){
callback(route);
},
child: 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,))
],
))
);
}