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

Commit ca36cd4

Browse files
matanlureynshahan
authored andcommitted
i.e. @HostListener('click', const [r'$event']) == @HostListener('click').
PiperOrigin-RevId: 193249064
1 parent 607ddd7 commit ca36cd4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

lib/focus/focus_item.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class FocusItemDirective extends RootFocusable implements FocusableItem {
4242
@override
4343
Stream<FocusMoveEvent> get focusmove => _focusMoveCtrl.stream;
4444

45-
@HostListener('keydown', const [r'$event'])
45+
@HostListener('keydown')
4646
void keydown(KeyboardEvent event) {
4747
var focusEvent = new FocusMoveEvent.fromKeyboardEvent(this, event);
4848
if (focusEvent != null) {

lib/material_button/material_button_base.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,27 @@ class MaterialButtonBase extends ButtonDirective {
6666
void focusedStateChanged() {}
6767

6868
/// Triggered on a mouse press.
69-
@HostListener('mousedown', const [r'$event'])
69+
@HostListener('mousedown')
7070
void onMouseDown(_) {
7171
_clickFocused = true;
7272
_isMouseDown = true;
7373
}
7474

7575
/// Triggered on a mouse release.
76-
@HostListener('mouseup', const [r'$event'])
76+
@HostListener('mouseup')
7777
void onMouseUp(_) {
7878
_isMouseDown = false;
7979
}
8080

8181
/// Triggered on focus.
82-
@HostListener('focus', const [r'$event'])
82+
@HostListener('focus')
8383
void onFocus(UIEvent event) {
8484
if (_clickFocused) return;
8585
_setFocused(true);
8686
}
8787

8888
/// Triggered on blur.
89-
@HostListener('blur', const [r'$event'])
89+
@HostListener('blur')
9090
void onBlur(UIEvent event) {
9191
if (_clickFocused) _clickFocused = false;
9292
// Always ensure that focused is false.

lib/material_menu/menu_item_groups.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class MenuItemGroupsComponent implements Focusable, OnInit, OnDestroy {
204204
return _highlightCache[input] = highlighter.highlight(input, [_highlight]);
205205
}
206206

207-
@HostListener('mouseover', const [r'$event'])
207+
@HostListener('mouseover')
208208
void onMouseOver(MouseEvent event) {
209209
_isMouseDriven = true;
210210

@@ -218,7 +218,7 @@ class MenuItemGroupsComponent implements Focusable, OnInit, OnDestroy {
218218
_subMenuOpener.start();
219219
}
220220

221-
@HostListener('mouseout', const [r'$event'])
221+
@HostListener('mouseout')
222222
void onMouseOut(MouseEvent event) {
223223
_isMouseDriven = false;
224224

lib/scorecard/scorecard.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class ScorecardComponent extends KeyboardOnlyFocusIndicatorDirective {
223223
}
224224
}
225225

226-
@HostListener('keypress', const [r'$event'])
226+
@HostListener('keypress')
227227
void handleKeypress(KeyboardEvent event) {
228228
int keyCode = event.keyCode;
229229
if (selectable && (keyCode == KeyCode.ENTER || isSpaceKey(event))) {

0 commit comments

Comments
 (0)