You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
driver-app/lib/widgets/delivery/delivery_action_button.dart

54 lines
1.4 KiB
Dart

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: EdgeInsets.all(8.0),
child: Column(
children: <Widget>[
SizedBox(
height: MediaQuery
.of(context)
.size
.width * 0.14,
width: MediaQuery
.of(context)
.size
.width * 0.165, // specific value
child: RaisedButton(
padding: EdgeInsets.only(left: 2),
color: btnColor,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(8.0),
),
child: btnIcon,
onPressed: btnFunction,
),
),
SizedBox(
height: MediaQuery
.of(context)
.size
.width * 0.05,
),
Text(
btnName,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 10,
),
),
],
),
);
}
}