I tried to make circleImage Widget and use it. but when it's used, it makes error that needs argument. What argument needs in that position?
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
leading: Text('eyes'),
actions: <Widget>[
**CircleImage();**
],
),
],
),
)
);
}
}
// making CircleImage
class CircleImage extends StatelessWidget {
CircleImage(
this.imageProvider, {
this.radius = 10,
}
);
final double radius;
final ImageProvider imageProvider;
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CircleAvatar(
radius: radius,
backgroundImage: imageProvider,
)
],
);
}
}
It appers in AppBar's widget. That makes error. Could I workaround that?