void main() { Cookie cookie =Cookie(); String a = cookie.shape; print(a); cookie.baking(); bool b = cookie.isCooling(); print(b); final isCookieCooling = cookie.isCooling(); print(isCookieCooling); } class Cookie { // variable String shape = 'Circle'; double size = 12; //method void baking() { print('baking has started!'); } bool isCooling() { return false; } }
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