dispatchDraw method
Implementation
@override
void dispatchDraw(Canvas canvas) {
List<View> childList = List.from(children);
childList.sort((a, b) {
return a.zIndex.compareTo(b.zIndex);
});
for (var element in childList) {
int count = canvas.getSaveCount();
drawChild(element, canvas);
if (canvas.getSaveCount() != count) {
throw FlutterError('you should call canvas.restore when after call canvas.save');
}
}
}