Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert comments after closing bracket using Android Studio automatically

Is it possible to get comments to be placed automatically at the end of a method with Android Studio?

  return new MaterialApp(

    ); // MaterialApp
like image 991
Ricardo Rocha Avatar asked Mar 06 '18 11:03

Ricardo Rocha


2 Answers

Closing labels are now supported in Android Studio 3.1 with the latest Dart and Flutter plugin

enter image description here

(last checkbox at the bottom)

Disable checkbox and restart IDE

like image 110
Günter Zöchbauer Avatar answered Nov 09 '22 11:11

Günter Zöchbauer


As in Android Studio 3.4 the location name changes to:

File > Settings... > Editor > General > Appearance

Tick the last checkbox - "Show closing labels in Dart source code".

like image 44
Ruchir Rai Avatar answered Nov 09 '22 12:11

Ruchir Rai