button168 function
Implementation
button168(String text, Color color, double _radius, Function _callback, bool enable){
return Stack(
children: <Widget>[
Container(
padding: EdgeInsets.only(top: 5, bottom: 5, left: 10, right: 10),
decoration: BoxDecoration(
color: (enable) ? color : Colors.grey.withOpacity(0.5),
borderRadius: BorderRadius.circular(_radius),
),
child: Text(text, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w800, color: Colors.white), textAlign: TextAlign.center,)
),
if (enable)
Positioned.fill(
child: Material(
color: Colors.transparent,
clipBehavior: Clip.hardEdge,
shape: RoundedRectangleBorder(borderRadius:BorderRadius.circular(_radius) ),
child: InkWell(
splashColor: Colors.black.withOpacity(0.2),
onTap: (){
_callback();
}, // needed
)),
)
],
);
}