Skip to content

Commit

Permalink
Merge pull request aboutyou#165 from aboutyou/null_safety
Browse files Browse the repository at this point in the history
NNBD support
  • Loading branch information
tp authored Mar 8, 2021
2 parents 3d43345 + 24fe6b8 commit f90eb95
Show file tree
Hide file tree
Showing 18 changed files with 249 additions and 262 deletions.
44 changes: 36 additions & 8 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-16.04, macos-10.15]
package:
[
pending_operations,
sign_in_with_apple,
state_queue,
state_queue_test,
with_bloc,
]
package: [pending_operations, state_queue, state_queue_test, with_bloc]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
Expand Down Expand Up @@ -47,3 +40,38 @@ jobs:
flags: ${{ matrix.package }}
name: ${{ matrix.package }}
fail_ci_if_error: false

test-nnbd:
name: Test ${{ matrix.package }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, macos-10.15]
package: [sign_in_with_apple]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@26bf50084a0c218b5b715a3641c36eac84fd2136 # v1.4.0
with:
flutter-version: "2.0.1"
- name: Install dependencies
run: flutter packages get
working-directory: packages/${{ matrix.package }}
- name: Analyze
run: flutter analyze
working-directory: packages/${{ matrix.package }}
- name: Format
run: flutter format --set-exit-if-changed .
working-directory: packages/${{ matrix.package }}
- name: Run tests
run: flutter test --coverage
working-directory: packages/${{ matrix.package }}
- name: Upload coverage to Codecov
if: startsWith(matrix.os, 'macos')
uses: codecov/[email protected]
with:
flags: ${{ matrix.package }}
name: ${{ matrix.package }}
fail_ci_if_error: false
4 changes: 4 additions & 0 deletions packages/sign_in_with_apple/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 3.0.0

- Add `null`-safety

### 2.5.4

- Reformat code with Flutter 1.20.4
Expand Down
3 changes: 3 additions & 0 deletions packages/sign_in_with_apple/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,6 @@ analyzer:

errors:
argument_type_not_assignable: info

enable-experiment:
- non-nullable
8 changes: 5 additions & 3 deletions packages/sign_in_with_apple/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ class _MyAppState extends State<MyApp> {
path: '/sign_in_with_apple',
queryParameters: <String, String>{
'code': credential.authorizationCode,
'firstName': credential.givenName,
'lastName': credential.familyName,
if (credential.givenName != null)
'firstName': credential.givenName!,
if (credential.familyName != null)
'lastName': credential.familyName!,
'useBundleId':
Platform.isIOS || Platform.isMacOS ? 'true' : 'false',
if (credential.state != null) 'state': credential.state,
if (credential.state != null) 'state': credential.state!,
},
);

Expand Down
107 changes: 36 additions & 71 deletions packages/sign_in_with_apple/example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,62 +1,55 @@
# 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.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
collection:
version: "1.2.0"
clock:
dependency: transitive
description:
name: collection
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
convert:
version: "1.1.0"
collection:
dependency: transitive
description:
name: convert
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
version: "1.15.0"
fake_async:
dependency: transitive
description:
name: crypto
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -73,70 +66,49 @@ packages:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.0+4"
version: "0.13.0"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.12"
version: "4.0.0"
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.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.4"
version: "1.8.0"
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.1.3"
version: "1.11.0"
sign_in_with_apple:
dependency: "direct dev"
description:
path: ".."
relative: true
source: path
version: "2.5.2"
version: "3.0.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -148,63 +120,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.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.15"
version: "0.2.19"
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.6.1"
version: "2.1.0"
sdks:
dart: ">=2.6.0 <3.0.0"
flutter: ">=1.12.13+hotfix.8 <2.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0"
10 changes: 4 additions & 6 deletions packages/sign_in_with_apple/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
name: sign_in_with_apple_example
description: Demonstrates how to use the sign_in_with_apple plugin.
publish_to: 'none'
publish_to: "none"
version: 1.0.0+1

environment:
sdk: ">=2.3.0 <3.0.0"
# For macOS make sure you're on Flutter master or dev channel and
# that `flutter config` shows `enable-macos-desktop: true`
flutter: ">=1.12.13+hotfix.8 <2.0.0"
sdk: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

http: ^0.12.0
http: ^0.13.0

dev_dependencies:
flutter_test:
Expand Down
Loading

0 comments on commit f90eb95

Please sign in to comment.