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
enum Alignment { center } | |
// Domain model | |
class Image { | |
final int width; | |
final Alignment alignment; | |
Image({required this.width, required this.alignment}); | |
} |
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:flutter/rendering.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class CustomLocalization implements WidgetsLocalizations { |
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
Future<int> foo() => Future.value(1); | |
Future<int> bar() async => Future.value(1); | |
Future<int> baz() async => await Future.value(1); | |
Future<int> qux() async => await Future.value(Future.value(1)); | |
Future<int> quux() async => 1; | |
Future<int> quuz() async => await 1; | |
main() async { | |
print(await foo()); | |
print(await bar()); |
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'; | |
const TODAY = "AUJOUR\u{00AD}D'HUI"; | |
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
void main() { | |
final dev = Developer(); | |
dev.speak(); | |
final mgr = Manager(); | |
mgr.speak(); | |
} | |
abstract class Person { | |
String get saying; |
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'; | |
void main() { | |
runApp( | |
FakeDevicePixelRatio( | |
fakeDevicePixelRatio: 1.5, | |
child: MyApp(), | |
), | |
); | |
} |