This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[file_selector_web] Migrated to null-safety #3550
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
292d1ae
migrated to null safety
SirusCodes 4e8264c
updated version and format changes
SirusCodes d540dd9
added back integration test
SirusCodes ba8bb36
formatted code
SirusCodes 1ed2fa1
implemented MockDomHelper
SirusCodes 00a2f6e
Merge branch 'master' into file_selector_web_nnbd
ditman 2125515
Move integration_tests to example app, so they can have their own pub…
ditman 5361d2d
Adjust pubspec for the package. Add a new test pointing users to the …
ditman 2217503
WIP
ditman 4f21597
Add expectations to MockDomHelper in integration tests
ditman 94987b6
Fix some publishable checks.
ditman 79191b4
Bump version of file_selector_platform_interface to nnbd stable preview.
ditman fb2355a
Use the correct flutter sdk
ditman 84b5884
dartfmt -w .
ditman 847d95b
Merge branch 'master' into file_selector_web_nnbd
ditman 5b917f4
Double quotes
ditman 9375842
Next version of flutter required.
ditman 33e8477
Make input late in test.
ditman 4411636
Point dart sdk to earliest nnbd stable.
ditman 02f936c
Use inputElement, that we know is safe.
ditman cdc08e8
Default lastModified to now, according to spec.
ditman 75338da
dartfmt -w .
ditman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| # 0.8.0 | ||
|
|
||
| - Migrated to null-safety | ||
|
|
||
| # 0.7.0+1 | ||
|
|
||
| - Add dummy `ios` dir, so flutter sdk can be lower than 1.20 | ||
|
|
||
21 changes: 21 additions & 0 deletions
21
packages/file_selector/file_selector_web/example/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Testing | ||
|
|
||
| This package utilizes the `integration_test` package to run its tests in a web browser. | ||
|
|
||
| See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info. | ||
|
|
||
| ## Running the tests | ||
|
|
||
| Make sure you have updated to the latest Flutter master. | ||
|
|
||
| 1. Check what version of Chrome is running on the machine you're running tests on. | ||
|
|
||
| 2. Download and install driver for that version from here: | ||
| * <https://chromedriver.chromium.org/downloads> | ||
|
|
||
| 3. Start the driver using `chromedriver --port=4444` | ||
|
|
||
| 4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_test.dart --target=integration_test/TEST_NAME.dart`, or (in Linux): | ||
|
|
||
| * Single: `./run_test.sh integration_test/TEST_NAME.dart` | ||
| * All: `./run_test.sh` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/file_selector/file_selector_web/example/lib/main.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| import 'package:flutter/material.dart'; | ||
|
|
||
| void main() { | ||
| runApp(MyApp()); | ||
| } | ||
|
|
||
| /// App for testing | ||
| class MyApp extends StatefulWidget { | ||
| @override | ||
| _MyAppState createState() => _MyAppState(); | ||
| } | ||
|
|
||
| class _MyAppState extends State<MyApp> { | ||
| @override | ||
| Widget build(BuildContext context) { | ||
| return Directionality( | ||
| textDirection: TextDirection.ltr, | ||
| child: Text('Testing... Look at the console output for results!'), | ||
| ); | ||
| } | ||
| } |
21 changes: 21 additions & 0 deletions
21
packages/file_selector/file_selector_web/example/pubspec.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: file_selector_web_integration_tests | ||
| publish_to: none | ||
|
|
||
| dependencies: | ||
| flutter: | ||
| sdk: flutter | ||
|
|
||
| dev_dependencies: | ||
| build_runner: ^1.10.0 | ||
| file_selector_web: | ||
| path: ../ | ||
| flutter_driver: | ||
| sdk: flutter | ||
| flutter_test: | ||
| sdk: flutter | ||
| integration_test: | ||
| sdk: flutter | ||
|
|
||
| environment: | ||
| sdk: ">=2.12.0-259.9.beta <3.0.0" | ||
| flutter: ">=1.27.0-0" # For integration_test from sdk |
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
packages/file_selector/file_selector_web/example/web/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <!doctype html> | ||
| <!-- Copyright 2014 The Flutter Authors. All rights reserved. | ||
| Use of this source code is governed by a BSD-style license that can be | ||
| found in the LICENSE file. --> | ||
| <html> | ||
| <head> | ||
| <title>Browser Tests</title> | ||
| </head> | ||
| <body> | ||
| <script src="main.dart.js"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.