onTap: () { showDialog(context: context,builder:(BuildContext context){back ImageNetwork(image:data['image'].toString(),高:400,宽:400,持续时间:1000,曲线:Curves.easeIn,onPointer:true,fit AndroidIos:BoxFit.cover,FitWeb:BoxFitWeb.cover,borderRadius:BorderRadius.循环(50),onLoding:const CircularProgressQueator(颜色:Color.amber, ), ); });
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`);
});
}
将您的ImageNetwork()小部件包装在材料小部件中
并将类型设置为MaterialType.透明度
showDialog(
context: context,
builder: (context) => Material(
type: MaterialType.transparency,
child: YourWidget(...)
)