I am unable produce release apk build and I getting below error
Task :app:compileFlutterBuildRelease
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/collection.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/algorithms.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/boollist.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/canonicalized_map.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/combined_wrappers/combined_iterable.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/combined_wrappers/combined_list.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/combined_wrappers/combined_map.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/comparators.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/equality.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/equality_map.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/equality_set.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/functions.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/iterable_extensions.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/iterable_zip.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/list_extensions.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/priority_queue.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/queue_list.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/union_set.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/union_set_controller.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/unmodifiable_wrappers.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/wrappers.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/utils.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/combined_wrappers/combined_iterator.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/empty_unmodifiable_set.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0.
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/collection-1.19.0/lib/src/canonicalized_map.dart:190:60: Error: Can't use an expression of type 'bool Function(K)?' as a function because it's potentially null.
Try calling using ?.call instead.
(key is K) && (_isValidKeyFn == null || _isValidKeyFn(key));
^
Target kernel_snapshot failed: Exception
I don't believe this error is something that can be address by changes in package:collection. It may be related to the SDK that you're using to build - an older sdk?
I am unable produce release apk build and I getting below error