import 'package:flutter/material.dart'; class DeliveryInfoButton extends StatelessWidget { final Color btnColor; final Icon btnIcon; final Function btnFunction; final String btnName; DeliveryInfoButton( {this.btnColor, this.btnIcon, this.btnFunction, this.btnName}); @override Widget build(BuildContext context) { print(btnColor); return Padding( padding: MediaQuery.of(context).orientation == Orientation.portrait ? EdgeInsets.all(4.0) : EdgeInsets.all(7.0), child: Column( children: [ SizedBox( height: MediaQuery.of(context).size.width * 0.14, width: MediaQuery.of(context).size.width * 0.165, // specific value child: InkWell( child: btnIcon, onTap: btnFunction, ), ), Text( btnName, style: TextStyle( fontWeight: FontWeight.bold, fontSize: 10, ), ), ], ), ); } }