This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flame/flame.dart'; | |
import 'dart:async'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Drink { | |
int ounces; | |
Drink(this.ounces); | |
} | |
class Coffee extends Drink { | |
final bool decaf; | |
Coffee(int ounces, {this.decaf = false}) : super(ounces); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
var record = ("Hello", "World"); | |
var record2 = ("Hello", "World"); | |
print(record == record2); | |
print(record.hashCode); | |
print(record2.hashCode); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool isVertical = false; | |
Widget build() { | |
return const Column( | |
direction: isVertical ? 'vertical' : 'horizontal', | |
children: [ | |
Widget(), | |
Widget(), | |
], | |
); | |
} |
OlderNewer