-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into dependabot/pub/flutte…
…r_news_example/packages/news_blocks_ui/google_mobile_ads-5.0.0
- Loading branch information
Showing
71 changed files
with
3,099 additions
and
3,778 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
|
@@ -49,7 +49,7 @@ jobs: | |
run: git stash pop | ||
|
||
- name: Create Pull Request With Required Changes | ||
uses: peter-evans/[email protected].2 | ||
uses: peter-evans/[email protected].5 | ||
with: | ||
branch: chore/generate-flutter-news-template | ||
commit-message: "chore: generate flutter_news_template" | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -14,7 +14,7 @@ void main() { | |
publishedAt: DateTime(2022, 3, 12), | ||
imageUrl: 'imageUrl', | ||
title: 'title', | ||
) | ||
), | ||
], | ||
); | ||
|
||
|
This file contains 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 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 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
16 changes: 6 additions & 10 deletions
16
flutter_news_example/api/test/src/middleware/news_data_source_provider_test.dart
This file contains 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
45 changes: 45 additions & 0 deletions
45
flutter_news_example/api/test/src/middleware/test_request_context.dart
This file contains 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,45 @@ | ||
// Taken from https://github.com/VeryGoodOpenSource/dart_frog/issues/1101 | ||
|
||
import 'package:dart_frog/dart_frog.dart'; | ||
|
||
class TestRequestContext implements RequestContext { | ||
TestRequestContext({ | ||
this.path = '/', | ||
this.method = HttpMethod.get, | ||
this.headers, | ||
}); | ||
|
||
String path; | ||
HttpMethod method; | ||
Map<String, String>? headers; | ||
|
||
final Map<String, dynamic> _dependencies = {}; | ||
|
||
@override | ||
RequestContext provide<T extends Object?>(T Function() create) { | ||
final dependency = create(); | ||
_dependencies[dependency.runtimeType.toString()] = dependency; | ||
return this; | ||
} | ||
|
||
void mockProvide<T>(T dependency) => _dependencies[T.toString()] = dependency; | ||
|
||
@override | ||
T read<T>() { | ||
final dependency = _dependencies[T.toString()]; | ||
if (dependency is! T) { | ||
throw Error(); | ||
} | ||
return dependency; | ||
} | ||
|
||
@override | ||
Request get request => Request( | ||
method.name.toUpperCase(), | ||
Uri.parse(path), | ||
headers: headers, | ||
); | ||
|
||
@override | ||
Map<String, String> get mountedParams => {}; | ||
} |
Oops, something went wrong.