新しいshow構文を使用して、コンパイルされた js コードのサイズを縮小しようとしていました。どんな種類のウィンドウイベントも必要としない限り、これは問題なく機能します。
次に表示するウィンドウを追加すると、エディターはすべて問題ないと言います。次にアプリケーションを実行すると、次のようになります。
Exception: NoSuchMethodError : method not found: 'get:window'
Receiver: Instance of 'Toolbar'
Arguments: []
Stack Trace: #0 Object._noSuchMethod (dart:core-patch:1261:3)
#1 Object.noSuchMethod (dart:core-patch:1264:25)
#2 Toolbar._init (...toolbar.dart:93:5)
#3 Toolbar.Toolbar.initialize (...toolbar.dart:47:10)
#4 main (...toolbar.dart:29:21)
ウィンドウ変数を使用せずにウィンドウ インスタンスを取得する他の方法はありますか?