Describe the issue
I got back to work in this package I've created. And I've added the use_late_for_private_fields_and_variables to the analysis_options.yaml file:
To Reproduce
In that project, the lib/src/floating_overlay.dart file is the main file for some part files.
Currently, my parts are (in this specific order):
part 'floating_overlay_controller.dart';
part 'floating_overlay_cursor.dart';
part 'floating_overlay_offset.dart';
part 'floating_overlay_scale.dart';
part 'floating_overlay_data.dart';
part 'reposition.dart';
part 'rescale.dart';
part 'cursor_resizing.dart';
part 'size_extension.dart';
part 'cursor_border_side.dart';
And that is triggering on a random part of a variable inside an enum declaration (inside lib/src/cursor_border_side.dart line 29).
bottom(
cursor: SystemMouseCursors.resizeUpDown,
height: _defaultWidth,
bottomDistance: 0,
leftDistance: _defaultWidth, // <- triggering on `_defaultWi` not the full variable name. Also, I don't think that is what is trying to trigger.
rightDistance: _defaultWidth,
),
Now when I change the part files order inside floating_overlay.dart so that cursor_border_side.dart is not the last file in my parts (alphabetical sorting):
part 'cursor_border_side.dart';
part 'cursor_resizing.dart';
part 'floating_overlay_controller.dart';
part 'floating_overlay_cursor.dart';
part 'floating_overlay_data.dart';
part 'floating_overlay_offset.dart';
part 'floating_overlay_scale.dart';
part 'reposition.dart';
part 'rescale.dart';
part 'size_extension.dart';
It now triggers on size_extension.dart line 18 (a comment):
/// Returns this size clamped to be in the range lowerLimit-upperLimit.
///
/// The arguments lowerLimit and upperLimit must form a valid range where
/// `(lowerLimit.height < upperLimit.height) && (lowerLimit.width < /// triggering here only `it.width <` text.
/// upperLimit.width)`.
Size clamp(Size lowerLimit, Size upperLimit) {
Expected behavior
To trigger on the right file (if there is actually a file where that happens, of course). And to take into account the reordering of parts in the file that it's a part of.
Describe the issue I got back to work in this package I've created. And I've added the
use_late_for_private_fields_and_variables
to theanalysis_options.yaml
file:To Reproduce In that project, the
lib/src/floating_overlay.dart
file is the main file for somepart
files.Currently, my parts are (in this specific order):
And that is triggering on a random part of a variable inside an enum declaration (inside
lib/src/cursor_border_side.dart
line 29).Now when I change the part files order inside
floating_overlay.dart
so thatcursor_border_side.dart
is not the last file in my parts (alphabetical sorting):It now triggers on
size_extension.dart
line 18 (a comment):Expected behavior To trigger on the right file (if there is actually a file where that happens, of course). And to take into account the reordering of
part
s in the file that it's apart of
.Additional context Nothing else.