-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
⚠ This work is blocked until all Flutter versions supported by go_router have this change: #170563.
Work
flutter/packages#9434 updated several go_router files to use a library prefix to reference @internal.
This library prefix should be removed. For example:
- import 'package:meta/meta.dart' as meta;
+ import 'package:meta/meta.dart';
- @meta.internal
+ @internal
void someMethod() {Background
The go_router package supports Flutter's main and stable channels, as well as the two previous stable releases (here).
flutter/packages#9434 was necessary as #170563 updated package:flutter's foundation library to export internal.
Since go_router has files that import both package:meta/meta.dart and package:flutter/foundation.dart, that caused lint failures like:
info - lib/src/match.dart:12:8 - The import of 'package:meta/meta.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/foundation.dart'. Try removing the import directive. - unnecessary_import
info - lib/src/route.dart:10:8 - The import of 'package:meta/meta.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/foundation.dart'. Try removing the import directive. - unnecessary_import
flutter/packages#9434 allowed go_router to work regardless whether the foundation library exports internal. Once go_router only supports Flutter versions that export internal, this can be cleaned up. ETA: early 2026 per go/dash-team-releases.