createContainer method
Create a container for displaying images.
Implementation
createContainer(html.DivElement container) {
_container = container;
_containerId = container.id;
var tmp = Map<dynamic, dynamic>();
String jsonStr = '{"WebTwainId":"container"}';
DWT.Unload();
DWT.CreateDWTObjectEx(parse(jsonStr), allowInterop((DWTObject obj) {
_webTwain = obj;
_webTwain!.IfShowUI = false;
Viewer viewer = _webTwain!.Viewer;
if (_container != null) {
viewer.bind(_container);
viewer.show();
}
}), allowInterop((error) {
print('CreateDWTObjectEx error: $error');
}));
}