Skip to content

Commit

Permalink
pubspec: Upgrade sdk constraints to Dart 3.2 as minimum (#530)
Browse files Browse the repository at this point in the history
* pubspec: Upgrade sdk constraints to Dart 3.2 as minimum

* Update test.yml to Dart 3.2

* Resolve issue found by analyzer
  • Loading branch information
Stargator authored Apr 2, 2024
1 parent 5455c04 commit 71baf2a
Show file tree
Hide file tree
Showing 50 changed files with 145 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
tag: ['2.18']
tag: ['3.2']

container:
image: dart:${{ matrix.tag }}
Expand Down
2 changes: 1 addition & 1 deletion bin/create_exercise.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ bool _containsWhitespaceCodes(String input) {
String _determineBestReturnType(List<dynamic> specCases) {
final expectedList = retrieveListOfExpected(specCases);

final dynamic first = expectedList != null && expectedList.isNotEmpty ? expectedList.first : null;
final dynamic first = expectedList.isNotEmpty ? expectedList.first : null;

if (first is Iterable) {
final iterableType = '${_getIterableType(first)}';
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/futures/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'futures'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/concept/numbers/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'numbers'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/concept/strings/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'strings'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/acronym/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'acronym'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/allergies/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'allergies'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/anagram/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'anagram'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/armstrong-numbers/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'armstrong_numbers'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/beer-song/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'beer_song'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/binary-search-tree/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'binary_search_tree'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/bob/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'bob'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/collatz-conjecture/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'collatz_conjecture'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/darts/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'darts'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/diamond/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'diamond'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/difference-of-squares/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'difference_of_squares'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/forth/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'forth'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/gigasecond/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'gigasecond'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/grains/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'grains'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/hamming/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'hamming'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/hello-world/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'hello_world'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/high-scores/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'high_scores'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/isbn-verifier/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'isbn_verifier'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/isogram/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'isogram'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/leap/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'leap'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/luhn/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'luhn'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/matching-brackets/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'matching_brackets'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/minesweeper/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'minesweeper'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/nth-prime/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'nth_prime'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/pangram/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'pangram'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/pascals-triangle/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'pascals_triangle'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/phone-number/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'phone_number'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/pig-latin/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'pig_latin'
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/prime-factors/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'prime_factors'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/raindrops/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'raindrops'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/resistor-color-duo/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'resistor_color_duo'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/resistor-color/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'resistor_color'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/reverse-string/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'reverse_string'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/rna-transcription/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'rna_transcription'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/robot-simulator/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'robot_simulator'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/roman-numerals/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'roman_numerals'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/scrabble-score/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'scrabble_score'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/secret-handshake/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'secret_handshake'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/space-age/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'space_age'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/sum-of-multiples/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'sum_of_multiples'
environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/triangle/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'triangle'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/two-fer/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'two_fer'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
2 changes: 1 addition & 1 deletion exercises/practice/word-count/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'word_count'
environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=3.2.0 <4.0.0'
dev_dependencies:
test: '<2.0.0'
Loading

0 comments on commit 71baf2a

Please sign in to comment.