0
我想要在AngularDart中應用深色和淺色主題之間的切換。如何應用AngularDart中的明暗主題之間的切換開關
app_component
<material-icon icon="brightness_2"
class="material-list-item-primary"
aria-hidden="true"></material-icon>
Dark Theme
<span class="material-list-item-secondary">
<material-toggle [checked]="dark" label="Off">
</material-toggle>
</span>
app_component.dart
class LayoutComponent {
bool dark = false;
}