INNER CODE UNIT · Dart
height
daohoangson/flutter_widget_from_html · demo_app/patrol_test/auto_resize_test.dart:96
const height = width / $input;
block.style.height = height + 'px';
block.innerHTML = 'input={input}, attempts=' + attempts;
return setTimeout(resize, 100);
}
resize();
</script>
</body>
''';
final webView = WebView(
Uri.dataFromString(html, mimeType: 'text/html').toString(),
aspectRatio: 16 / 9,
autoResize: true,
debuggingEnabled: true,
);
final test = _AspectRatioTest(child: webView);