There are a lot of ways this could happen, but consider the following test:
import 'dart:typed_data';
import 'dart:ui';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('another', () async {
const TestImage image = TestImage();
final PictureRecorder recorder = PictureRecorder();
final Canvas canvas = Canvas(recorder);
canvas.drawImage(image, Offset.zero, Paint());
final Picture picture = recorder.endRecording();
});
}
class TestImage implements Image {
const TestImage([this.width = 10, this.height = 10]);
@override
final int height;
@override
final int width;
@override
Future<ByteData> toByteData({ImageByteFormat format = ImageByteFormat.rawRgba}) {
throw UnimplementedError();
}
@override
void dispose() {}
}
I don't think we should support this, but we shouldn't segfault either.
There are a lot of ways this could happen, but consider the following test:
I don't think we should support this, but we shouldn't segfault either.