mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
* Update dart version * Update flutter version in workflow * Update packages * Updates to android workflow * Specify dart verrsion in CI * Run flutter upgrade * Helps to check which workflow is actually running I guess * Disable linting check * linting fixes * linting * Bug fix for paginator
22 lines
710 B
Dart
22 lines
710 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 ".";
|
|
});
|
|
} |