Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 180b4cd

Browse files
phantomessenshahan
authored andcommitted
Replace ElementRef with HtmlElement in material expansion panel.
PiperOrigin-RevId: 186665605
1 parent a076fdb commit 180b4cd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/material_expansionpanel/material_expansionpanel.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ class MaterialExpansionPanel
142142

143143
HtmlElement _mainPanel;
144144
@ViewChild('mainPanel')
145-
set mainPanel(ElementRef ref) {
146-
_mainPanel = ref.nativeElement;
145+
set mainPanel(HtmlElement mainPanel) {
146+
_mainPanel = mainPanel;
147147
_disposer.addStreamSubscription(_mainPanel.onTransitionEnd.listen((_) {
148148
// Clear height override so it will match the active child's height.
149149
_mainPanel.style.height = '';
@@ -152,11 +152,13 @@ class MaterialExpansionPanel
152152

153153
HtmlElement _mainContent;
154154
@ViewChild('mainContent')
155-
set mainContent(ElementRef ref) => _mainContent = ref.nativeElement;
155+
set mainContent(HtmlElement mainContent) => _mainContent = mainContent;
156156

157157
HtmlElement _contentWrapper;
158158
@ViewChild('contentWrapper')
159-
set contentWrapper(ElementRef ref) => _contentWrapper = ref.nativeElement;
159+
set contentWrapper(HtmlElement contentWrapper) {
160+
_contentWrapper = contentWrapper;
161+
}
160162

161163
/// If true, after a successful save, the panel will attempt to close.
162164
@Input()

0 commit comments

Comments
 (0)