mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
* 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
22 lines
711 B
Dart
22 lines
711 B
Dart
|
|
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 ".";
|
|
});
|
|
} |