Reputation: 173
onTap: () { showDialog( context: context, builder: (BuildContext context) { return ImageNetwork( image: data['image'].toString(), height: 400, width: 400, duration: 1000, curve: Curves.easeIn, onPointer: true, fitAndroidIos: BoxFit.cover, fitWeb: BoxFitWeb.cover, borderRadius: BorderRadius.circular(50), onLoading: const CircularProgressIndicator( color: Colors.amber, ), ); });
Upvotes: 3
Views: 198
Reputation: 330
Wrap your ImageNetwork() widget inside Material Widget
And set type to MaterialType.transparency
showDialog(
context: context,
builder: (context) => Material(
type: MaterialType.transparency,
child: YourWidget(...)
)
Upvotes: 3
Reputation: 277
Use Dialog widget over your ImageNetwork widget. This will resolve your issue.
onTap:() {
showDialog(context: context, builder: (BuildContext context) {
return Dialog(
child: ImageNetwork(image: data['image'].toString(),
height: 400,
width: 400,
duration: 1000,
curve: Curves.easeIn,
onPointer: true,
fitAndroidIos: BoxFit.cover,
fitWeb: BoxFitWeb.cover,
borderRadius: BorderRadius.circular(50),
onLoading: const CircularProgressIndicator(color: Colors.amber,),),`enter code here`);
});
}
Upvotes: 2