Skip to content

Commit

Permalink
Import dart:ui in a like the sdk rewriter likes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ditman authored and tugorez committed Feb 6, 2024
1 parent 9a4ff70 commit da93ed6
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'dart:async';
import 'package:ui/src/engine.dart';
import 'package:ui/ui.dart' show ViewFocusDirection, ViewFocusEvent, ViewFocusState;
import 'package:ui/ui.dart' as ui show ViewFocusDirection, ViewFocusEvent, ViewFocusState;

/// Encapsulates view objects, and their optional metadata indexed by `viewId`.
class FlutterViewManager {
Expand Down Expand Up @@ -124,19 +124,19 @@ class FlutterViewManager {
return;
}

late final ViewFocusEvent event;
late final ui.ViewFocusEvent event;
if(viewId == null) {
event = ViewFocusEvent(
event = ui.ViewFocusEvent(
viewId: _latestFocusedViewId!,
state: ViewFocusState.unfocused,
direction: ViewFocusDirection.undefined,
state: ui.ViewFocusState.unfocused,
direction: ui.ViewFocusDirection.undefined,
);
_latestFocusedViewId = null;
} else {
event = ViewFocusEvent(
event = ui.ViewFocusEvent(
viewId: viewId,
state: ViewFocusState.focused,
direction: ViewFocusDirection.forward,
state: ui.ViewFocusState.focused,
direction: ui.ViewFocusDirection.forward,
);
_latestFocusedViewId = viewId;
}
Expand Down

0 comments on commit da93ed6

Please sign in to comment.