mirror of
https://github.com/londonappbrewery/Flutter-Course-Resources/
synced 2024-11-15 05:44:55 +00:00
24 lines
540 B
Dart
24 lines
540 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class RoundIconButton extends StatelessWidget {
|
||
|
RoundIconButton({@required this.icon, @required this.onPressed});
|
||
|
|
||
|
final IconData icon;
|
||
|
final Function onPressed;
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return RawMaterialButton(
|
||
|
elevation: 0.0,
|
||
|
child: Icon(icon),
|
||
|
onPressed: onPressed,
|
||
|
constraints: BoxConstraints.tightFor(
|
||
|
width: 56.0,
|
||
|
height: 56.0,
|
||
|
),
|
||
|
shape: CircleBorder(),
|
||
|
fillColor: Color(0xFF4C4F5E),
|
||
|
);
|
||
|
}
|
||
|
}
|