Create new file quick fix for enhanced part always uses the main file name #59708
Open
Description
Create main.dart:
part 'part.dart';
Then trigger the quick-fix to create the part.dart
file.
Inside part.dart:
part of 'main.dart';
part 'inner-part.dart';
Do the same for the new file, it'll give a new error:
Expected this library to be part of 'package:bug/part.dart', not 'package:bug/inner-part.dart'.
Try including a different part, or changing the name of the library in the part's part-of directive.dart[part_of_different_library](https://dart.dev/diagnostics/part_of_different_library)
Because the generated inner-part:
part of 'main.dart';