Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
void printPrice(String product, double price, {String currency = 'USD', bool onSale = false}) { var label = onSale ? ' (on sale)' : ''; print('$product: $price $currency$label'); } void main() { printPrice('Shoes', 59.99); printPrice('Jacket', 120.0, currency: 'EUR'); printPrice('Hat', 15.5, onSale: true); }
Shoes: 59.99 USD
Jacket: 120.0 EUR
Hat: 15.5 USD (on sale)