Move image logic from services/ to painting/. (#13409)
This allows the scheduler library to depend on the services library and the painting library to depend on the scheduler library without the services library having to depend on the scheduler library. While I was at it I also cleaned up some of the binding logic: the licenses logic can now be overridden (and the test library does so), and the image cache can now be overridden as well.
This commit is contained in:
@@ -86,7 +86,8 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
|
||||
with SchedulerBinding,
|
||||
GestureBinding,
|
||||
RendererBinding,
|
||||
// Services binding omitted to avoid dragging in the licenses code.
|
||||
ServicesBinding,
|
||||
PaintingBinding,
|
||||
WidgetsBinding {
|
||||
|
||||
/// Constructor for [TestWidgetsFlutterBinding].
|
||||
@@ -150,6 +151,12 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
|
||||
super.initInstances();
|
||||
}
|
||||
|
||||
@override
|
||||
void initLicenses() {
|
||||
// Do not include any licenses, because we're a test, and the LICENSE file
|
||||
// doesn't get generated for tests.
|
||||
}
|
||||
|
||||
/// Whether there is currently a test executing.
|
||||
bool get inTest;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user