Skip to content

Dart Plugin unable to highlight the parameters which are used #1880

@protocol10

Description

@protocol10

I have just started to code my first sample app in Flutter, while coding I am unable to undestand what are the parameters which are being used in classes.

Eg: Start with MaterialApp, it has number of parameters

MaterialApp({ // can't be const because the asserts use methods on Map :-(
  Key key,
  this.navigatorKey,
  this.home,
  this.routes: const <String, WidgetBuilder>{},
  this.initialRoute,
  this.onGenerateRoute,
  this.onUnknownRoute,
  this.navigatorObservers: const <NavigatorObserver>[],
  this.builder,
  this.title: '',
  this.onGenerateTitle,
  this.color,
  this.theme,
  this.locale,
  this.localizationsDelegates,
  this.localeResolutionCallback,
  this.supportedLocales: const <Locale>[const Locale('en', 'US')],
  this.debugShowMaterialGrid: false,
  this.showPerformanceOverlay: false,
  this.checkerboardRasterCacheImages: false,
  this.checkerboardOffscreenLayers: false,
  this.showSemanticsDebugger: false,
  this.debugShowCheckedModeBanner: true,
})

If we add a following sample code

    return new MaterialApp(
        title: "My App",
        home: new Scaffold(
            appBar: new AppBar(title: new Text("Welcome to Flutter")),
            body: new Center(child: new Text("Hello World")),
            floatingActionButton: new FloatingActionButton(
                onPressed: null, backgroundColor: Colors.teal)));
  }

If we press CMD+P to preview the syntax parameters which we have used, the plugin does not highlight it well in Android Studio, as compare to what it does excellent if we code in Java and Kotlin.

Is there any other way to interpret the parameter which we have passed to a construct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions