INNER CODE UNIT · Dart

resize

daohoangson/flutter_widget_from_html · demo_app/patrol_test/auto_resize_test.dart:88

    function resize() {
      attempts++;

      const width = window.innerWidth;
      if (width === 0) {
        return setTimeout(resize, 10);
      }

      const height = width / $input;
      block.style.height = height + 'px';
      block.innerHTML = 'input={input}, attempts=' + attempts;
      return setTimeout(resize, 100);
    }

    resize();
  </script>
</body>
''';

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…