mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-15 03:35:28 +00:00
Updated dependencies (#255)
* Bump android compile and target version, also flutter dependencies and resolve issues * Remove deprecated splashscreen and added support for new Android 12 version. * Updated workflow action versions and flutter sdk * Resolved linting issues * Resolved test binding issues
This commit is contained in:
22
test/setup.dart
Normal file
22
test/setup.dart
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
import "package:flutter/services.dart";
|
||||
import "package:flutter_test/flutter_test.dart";
|
||||
|
||||
// This is the same as the following issue except it keeps the http client
|
||||
// TestWidgetsFlutterBinding.ensureInitialized();
|
||||
class CustomBinding extends AutomatedTestWidgetsFlutterBinding {
|
||||
@override
|
||||
bool get overrideHttpClient => false;
|
||||
}
|
||||
|
||||
void setupTestEnv() {
|
||||
// Uses custom binding to not override the http client
|
||||
CustomBinding();
|
||||
|
||||
// Mock the path provider
|
||||
const MethodChannel channel = MethodChannel("plugins.flutter.io/path_provider");
|
||||
TestDefaultBinaryMessengerBinding.instance?.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
|
||||
return ".";
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user