build method
Implementation
Widget build() {
return Builder(builder: (BuildContext context) {
initSize(context);
return core.Peripherals(
key: globalKey,
builder: (BuildContext context) {
return Container(
width: !visible?0:width,
height: !visible?0:height,
child: SizeChangedLayoutNotifier(
child: Builder(builder: (BuildContext context) {
if (kIsWeb) {
return texture != null && mounted? HtmlElementView(viewType:texture!.textureId.toString()):loadingWidget ?? Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
color: Theme.of(context).canvasColor,
alignment: Alignment.center,
child: const CircularProgressIndicator()
);
}
else {
return texture != null && mounted?
Transform.scale(
scaleY: sourceTexture != null || Platform.isAndroid?1:-1,
child:Texture(textureId: texture!.textureId)
):loadingWidget ?? Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
color: Theme.of(context).canvasColor,
alignment: Alignment.center,
child: const CircularProgressIndicator()
);
}
})
)
);
}
);
});
}