File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
flutter-idea/src/io/flutter/editor Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,16 @@ public class FlutterIconLineMarkerProvider extends LineMarkerProviderDescriptor
55
55
private static final String CupertinoRelativeAssetPath = "/assets/CupertinoIcons.ttf" ;
56
56
private static final String CupertinoRelativeIconsPath = "/packages/flutter/lib/src/cupertino/icons.dart" ;
57
57
58
- static {
59
- initialize ();
58
+ private static boolean instantiated = false ;
59
+
60
+ FlutterIconLineMarkerProvider () {
61
+ // Extension point implementations can't use static initializers so we keep track of the
62
+ // first instantiation to make sure #initialize is called to set up initial state. (Note that this state
63
+ // may get reset with a subsequent explicit call to #initialize.)
64
+ if (!instantiated ) {
65
+ initialize ();
66
+ }
67
+ instantiated = true ;
60
68
}
61
69
62
70
public static void initialize () {
You can’t perform that action at this time.
0 commit comments