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 m = { | |
14: 10, | |
20: 20, | |
2: 2, | |
10: 10, | |
1: 1, | |
28: 20, | |
}; |
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
// Copyright (c) 2019 Simon Lightfoot | |
// Released under the MIT License | |
// https://gist.github.com/slightfoot/9e11a0edab37b61184a1f2a34a7b9807 | |
// | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp( | |
const MaterialApp( | |
home: HomeScreen(), |
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
// Scroll positions are not correctly preserved probably due to a bug in Flutter itself. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
final List<String> _tabs = <String>['Tab1', 'Tab2', 'Tab3']; | |
@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
import 'dart:async'; | |
import 'dart:math' show Random; | |
void main() { | |
final calc = MentalCalc(6); | |
Output(calc); | |
final timer = Timer.periodic(Duration(seconds: 1), (Timer t) { | |
calc.add(t.tick); | |
}); |
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 'dart:async'; | |
void main() { | |
final data = {'イチゴ': '苺', 'イチジク': '無花果'}; | |
final controller = StreamController<String>(); | |
controller.sink.add('イチゴ'); | |
controller.sink.add('ドラゴンフルーツ'); | |
controller.sink.add('イチジク'); |
NewerOlder