【发布时间】:2018-02-26 07:13:13
【问题描述】:
我的 AngularDart 项目中有一个角度组件的应用布局。如何在媒体画面切换时将App layout的drawer从persistent改为temporary?
【问题讨论】:
标签: dart angular-dart angular-components dart-html dart-webui
我的 AngularDart 项目中有一个角度组件的应用布局。如何在媒体画面切换时将App layout的drawer从persistent改为temporary?
【问题讨论】:
标签: dart angular-dart angular-components dart-html dart-webui
您可以使用窗口上的onResize 事件来监听它的变化并将您的布局设置为temporary 或persistent
import "dart:html";
import "dart:async";
StreamSubscription<Event> subscription = window.onResize.listen((Event e) {
final width = window.screen.width;
});
// onDestroy
subscription.cancel();
【讨论】: