http
http copied to clipboard
Error in http_parser with dart 3.4
Running flutter pub run build_runner build --output=build
yields
[WARNING] ../../../../.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib/src/case_insensitive_map.dart:10:37: Error: The class 'CanonicalizedMap' can't be extended outside of its library because it's a final class.
class CaseInsensitiveMap<V> extends CanonicalizedMap<String, String, V> {
Does this reproduce with http_parser 4.1.0 ?
Neither CanonicalizedMap
https://github.com/dart-lang/collection/blob/0c1f829c29da1d63488be774f430b2035a565d6f/lib/src/canonicalized_map.dart#L13
nor CaseInsensitiveMap https://github.com/dart-lang/http_parser/blob/master/lib/src/case_insensitive_map.dart
are marked with final it seems?
You need to upgrade to latest version of collection (which flutter does not 'like', so you can use overrides to accomplish this)