-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade analyzer, freezed_annotation and json_serializable depe…
…ndencies (#8465)
- Loading branch information
1 parent
b6563d4
commit 8a27ab2
Showing
7 changed files
with
90 additions
and
26 deletions.
There are no files selected for viewing
18 changes: 9 additions & 9 deletions
18
packages/cloud_firestore_odm/cloud_firestore_odm/example/lib/movie.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
20 changes: 10 additions & 10 deletions
20
..._firestore_odm_generator/cloud_firestore_odm_generator_integration_test/lib/simple.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
27 changes: 27 additions & 0 deletions
27
...re_odm_generator/cloud_firestore_odm_generator_integration_test/test/collection_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:cloud_firestore_odm_generator_integration_test/simple.dart'; | ||
import 'package:firebase_core/firebase_core.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
import 'setup_firestore_mock.dart'; | ||
|
||
void main() { | ||
setUpAll(setupCloudFirestoreMocks); | ||
|
||
group('orderBy', () { | ||
testWidgets('applies `descending`', (tester) async { | ||
await Firebase.initializeApp(); | ||
expect( | ||
rootRef.orderByNullable(descending: true), | ||
rootRef.orderByNullable(descending: true), | ||
); | ||
expect( | ||
rootRef.orderByNullable(descending: true), | ||
isNot(rootRef.orderByNullable()), | ||
); | ||
expect( | ||
rootRef.orderByNullable(), | ||
rootRef.orderByNullable(), | ||
); | ||
}); | ||
}); | ||
} |
35 changes: 35 additions & 0 deletions
35
...m_generator/cloud_firestore_odm_generator_integration_test/test/setup_firestore_mock.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,35 @@ | ||
// ignore_for_file: avoid_dynamic_calls | ||
|
||
import 'package:firebase_core_platform_interface/firebase_core_platform_interface.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
void setupCloudFirestoreMocks() { | ||
TestWidgetsFlutterBinding.ensureInitialized(); | ||
|
||
MethodChannelFirebase.channel.setMockMethodCallHandler((call) async { | ||
if (call.method == 'Firebase#initializeCore') { | ||
return [ | ||
{ | ||
'name': defaultFirebaseAppName, | ||
'options': { | ||
'apiKey': '123', | ||
'appId': '123', | ||
'messagingSenderId': '123', | ||
'projectId': '123', | ||
}, | ||
'pluginConstants': <String, Object?>{}, | ||
} | ||
]; | ||
} | ||
|
||
if (call.method == 'Firebase#initializeApp') { | ||
return <String, Object?>{ | ||
'name': call.arguments['appName'], | ||
'options': call.arguments['options'], | ||
'pluginConstants': <String, Object?>{}, | ||
}; | ||
} | ||
|
||
return null; | ||
}); | ||
} |
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