Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d9f3db3

Browse files
authoredSep 5, 2024··
Remove performance view for newer Flutter SDK versions (#7637)
Fixes #7624
1 parent 6dff1f5 commit d9f3db3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

‎flutter-idea/src/io/flutter/performance/FlutterPerformanceViewFactory.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
import com.intellij.openapi.wm.ToolWindow;
1414
import com.intellij.openapi.wm.ToolWindowFactory;
1515
import com.intellij.openapi.wm.ToolWindowManager;
16-
import icons.FlutterIcons;
17-
import io.flutter.utils.UIUtils;
16+
import io.flutter.sdk.FlutterSdk;
17+
import io.flutter.sdk.FlutterSdkVersion;
1818
import io.flutter.utils.ViewListener;
1919
import io.flutter.view.FlutterViewMessages;
20+
import kotlin.coroutines.Continuation;
2021
import org.jetbrains.annotations.NotNull;
2122

2223
public class FlutterPerformanceViewFactory implements ToolWindowFactory, DumbAware {
@@ -62,4 +63,11 @@ public FlutterPerformanceViewListener(@NotNull Project project) {
6263
super(project, FlutterPerformanceView.TOOL_WINDOW_ID, TOOL_WINDOW_VISIBLE_PROPERTY);
6364
}
6465
}
66+
67+
@Override
68+
public Object isApplicableAsync(@NotNull Project project, @NotNull Continuation<? super Boolean> $completion) {
69+
FlutterSdk sdk = FlutterSdk.getFlutterSdk(project);
70+
FlutterSdkVersion sdkVersion = sdk == null ? null : sdk.getVersion();
71+
return sdkVersion == null || !sdkVersion.canUseDeepLinksTool();
72+
}
6573
}

0 commit comments

Comments
 (0)
Please sign in to comment.