This file contains 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
main() { | |
final dateString = "2002-02-27T14:00:00-0500"; | |
final date = DateTime.parse(dateString); | |
print(date); | |
} |
This file contains 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:flame/game.dart'; | |
import 'package:flame/input.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
void main() { | |
runApp(GameWidget(game: MyGame())); | |
} | |
class MyGame extends FlameGame with KeyboardEvents { |
This file contains 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:flame/components.dart'; | |
import 'package:flame/game.dart'; | |
import 'package:flame/input.dart'; | |
import 'package:flutter/material.dart' hide Draggable; | |
void main() { | |
runApp(GameWidget(game: DraggablesExample())); | |
} | |
This file contains 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:flame/components.dart'; | |
import 'package:flame/extensions.dart'; | |
import 'package:flame/game.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(GameWidget(game: MyGame())); | |
} | |
class MyGame extends FlameGame { |
This file contains 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:flame/components.dart'; | |
import 'package:flame/extensions.dart'; | |
import 'package:flame/game.dart'; | |
import 'package:flame/input.dart'; | |
import 'package:flame/effects.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp( | |
GameWidget(game: TowerGame()), |
This file contains 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:flame/components.dart'; | |
import 'package:flame/effects.dart'; | |
import 'package:flame/game.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
WidgetsFlutterBinding.ensureInitialized(); | |
runApp( | |
GameWidget( | |
game: HeartEffect(), |
This file contains 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:flame/components.dart'; | |
import 'package:flame/effects.dart'; | |
import 'package:flame/extensions.dart'; | |
import 'package:flame/game.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
TextPaint textRenderer() => TextPaint( | |
style: TextStyle( | |
color: ColorExtension.random(), |
This file contains 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:flame/components.dart'; | |
import 'package:flame/effects.dart'; | |
import 'package:flame/extensions.dart'; | |
import 'package:flame/game.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
const radius = 30.0; | |
runApp( | |
GameWidget( |
This file contains 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:flame/components.dart'; | |
import 'package:flame/effects.dart'; | |
import 'package:flame/extensions.dart'; | |
import 'package:flame/game.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
const radius = 30.0; | |
runApp( | |
GameWidget( |
This file contains 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
extension DateTimeExtensions on DateTime { | |
DateTime copyWith({ | |
int? year, | |
int? month, | |
int? day, | |
int? hour, | |
int? minute, | |
int? second, | |
int? millisecond, | |
bool? isUtc, |
NewerOlder