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 'dart:io'; | |
import 'dart:math'; | |
import 'package:html/dom.dart'; | |
import 'package:html/parser.dart'; | |
import 'package:markdown/markdown.dart' as md; | |
main(args) { | |
var mdSource = new File(args.single).readAsStringSync(); | |
var html = md.markdownToHtml(mdSource); |
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
#!/usr/bin/env bash | |
DEFAULT_HASH=76468dd | |
if [ -z "$1" ] | |
then | |
echo "You can provide the commit hash you're interested in as argument." | |
echo "Defaulting to $DEFAULT_HASH." | |
HASH=$DEFAULT_HASH | |
else |
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
#!/usr/bin/env bash | |
set -o vi | |
# Change this accordingly. | |
# You may have github.com/flutter/flutter named as "upstream". | |
REMOTE_NAME=origin | |
# The hash we search for when no argument is given. | |
DEFAULT_HASH=76468dd |
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:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:sliver_fbs/src/names.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:scoped_model/scoped_model.dart'; | |
void main() { | |
// The app state. | |
final myModel = CounterModel(42); | |
// A timer, to simulate updates coming from outside the app. |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:scoped_model/scoped_model.dart'; | |
void main() { | |
// Initialize the model. Can be done outside a widget, like here. | |
var counter = Counter(); | |
// Just because we can: wait five seconds after the start of the app ... |
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:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
const List<List<int>> _pixels = [ | |
[1, 1, 1, 1, 0, 0, 1, 1, 0], | |
[1, 0, 0, 0, 0, 1, 0, 0, 1], | |
[1, 1, 1, 0, 0, 1, 0, 0, 1], | |
[0, 0, 0, 1, 0, 1, 0, 0, 1], |
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:flutter/material.dart'; | |
import 'package:provider/provider.dart'; | |
void main() => runApp( | |
ChangeNotifierProvider<AppStateManager>.value( | |
value: AppStateManager(), | |
child: MyApp(), | |
), | |
); |
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() { | |
takesFunction((x) => "result: $x"); | |
} | |
void takesFunction(String Function(int) callback) { | |
final result = callback(42); | |
print(result); | |
} |
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:flutter/material.dart'; | |
import 'package:ring_of_circles/src/widget.dart'; | |
/// Just the app. Nothing to see here, except the code for changing | |
/// the number of circles (`n`). | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
OlderNewer