class Num{ int _x; Num(this._x); int get x => _x; } void main(){ Num num1 = Num(5); print(num1.x); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter