getImage method
Implementation
Future<Image> getImage(Image init) async{
final recorder = PictureRecorder();
final canvas = Canvas(
recorder,
Rect.fromLTWH(0, -offsetHeight.toDouble(), size.width, size.height)
);
canvas.drawImage(
init,
Offset(0,-offsetHeight.toDouble()),
Paint()
);
return await recorder.endRecording().toImage(size.width.toInt(), size.height.toInt());
}