Home > front end >  How to nest auto generated Dart files in IntelliJ Idea?
How to nest auto generated Dart files in IntelliJ Idea?

Time:11-23

Minimal reproducible code:

// foo.dart
import 'package:json_annotation/json_annotation.dart';
part 'foo.g.dart';

@JsonSerializable()
class Foo {}

When I run

$ dart pub run build_runner build

It generates a foo.g.dart file in the same directory. But how can I combine/nest/merge/hide*/whatever this file with the original foo.dart file so that I don't get to see the generated file (or at least without having to click an arrow button)

enter image description here

*hide: in a way it can be accessed when clicked from other code.

CodePudding user response:

You can set up the enter image description here

  • Related