From 877fb55b35823b237c4e23aaa2790d703ca6ff02 Mon Sep 17 00:00:00 2001 From: Shinya Kumagai Date: Mon, 24 Nov 2025 00:57:41 +0900 Subject: [PATCH] Keep `package:meta` import for Flutter <3.35 Keep the explicit `package:meta` import for backward compatibility with Flutter versions older than 3.35.0, where the `@internal` annotation is provided by the `meta` package. Suppress the analyzer `unnecessary_import` warning on newer SDKs that re-export `@internal` from `package:flutter/foundation.dart`. Refs: https://github.com/flutter/flutter/commit/5706259791de29a27cb68e9b95d6319ba863e366 --- .../lib/src/types/custom_tabs_color_schemes.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flutter_custom_tabs_android/lib/src/types/custom_tabs_color_schemes.dart b/flutter_custom_tabs_android/lib/src/types/custom_tabs_color_schemes.dart index 84c0c3de..29e67fee 100644 --- a/flutter_custom_tabs_android/lib/src/types/custom_tabs_color_schemes.dart +++ b/flutter_custom_tabs_android/lib/src/types/custom_tabs_color_schemes.dart @@ -1,5 +1,8 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/painting.dart'; +// `@internal` is exported from `package:flutter/foundation.dart` +// in Flutter >= 3.35.0; keep `meta` import for older SDKs (backcompat). +// ignore: unnecessary_import import 'package:meta/meta.dart'; /// The configuration of a Custom Tab visualization.