Skip to content

Commit

Permalink
Merge pull request #2 from eyeem/null_safety
Browse files Browse the repository at this point in the history
Upgrade package to Dart 2.12 and sound null safety.
  • Loading branch information
Sebastian Engel authored Sep 29, 2021
2 parents 14e8618 + 9870c3f commit 4fca915
Show file tree
Hide file tree
Showing 12 changed files with 90 additions and 120 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.2.0] - 22/09/2021

* Upgrade package to Dart 2.12 and sound null safety.

## [0.1.0] - 22/02/2020

* Bump up version, API is quite stable and we use the package successfully in production.
Expand Down
4 changes: 4 additions & 0 deletions packages/span_builder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.2.0] - 22/09/2021

* Upgrade package to Dart 2.12 and sound null safety.

## [0.1.0] - 22/02/2020

* Bump up version, API is quite stable and we use the package successfully in production.
Expand Down
4 changes: 2 additions & 2 deletions packages/span_builder/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ class MyApp extends StatelessWidget {
style: TextStyle(
decoration: TextDecoration.underline)),
onTap: () {
Scaffold.of(context).showSnackBar(
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("weeeee")));
})
..apply(const TextSpan(text: "🐶"), whereText: "dog"),
defaultStyle:
TextStyle(color: Colors.black, fontSize: 32.0),
const TextStyle(color: Colors.black, fontSize: 32.0),
textAlign: TextAlign.center)))));
}
}
112 changes: 35 additions & 77 deletions packages/span_builder/example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,69 +1,62 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
charcode:
version: "2.1.0"
characters:
dependency: transitive
description:
name: charcode
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
collection:
version: "1.1.0"
charcode:
dependency: transitive
description:
name: collection
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
convert:
version: "1.3.1"
clock:
dependency: transitive
description:
name: convert
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
version: "1.1.0"
collection:
dependency: transitive
description:
name: crypto
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -74,55 +67,27 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
version: "1.7.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -134,76 +99,69 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
version: "1.8.1"
span_builder:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "0.0.1"
version: "0.2.0"
span_builder_test:
dependency: "direct dev"
description:
path: "../../span_builder_test"
relative: true
source: path
version: "0.0.1"
version: "0.2.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.11"
version: "0.4.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
version: "2.1.0"
sdks:
dart: ">=2.6.0 <3.0.0"
dart: ">=2.12.0 <3.0.0"
2 changes: 1 addition & 1 deletion packages/span_builder/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Example app for span_builder
version: 1.0.0+1

environment:
sdk: ">=2.1.0 <3.0.0"
sdk: '>=2.12.0 <3.0.0'

dependencies:
flutter:
Expand Down
4 changes: 2 additions & 2 deletions packages/span_builder/example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ void main() {
final spanFinder = find.byKey(span_key);

expect(spanFinder, findsOneWidget);
final allSpans = tester.findSpans(spanFinder).length;
final allSpans = tester.findSpans(spanFinder)?.length;
expect(allSpans, 8);

final foxSpans = tester.findSpans(spanFinder, predicate: (span) {
return span is TextSpan && span.text == "🦊";
});
expect(foxSpans.length, 1);
expect(foxSpans?.length, 1);
});
}
Loading

0 comments on commit 4fca915

Please sign in to comment.