This will print out the versions of the three major Flutter branches on GitHub.
$ dart flutter_version.dart
Flutter beta is at v0.4.4
Flutter dev is at v0.5.4
Flutter master is at <NO TAG>
import 'package:flutter/material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'PathTest', | |
theme: new ThemeData( |
import 'dart:math' as Math; | |
import 'dart:typed_data' show Uint8List; | |
int pixelmatch( | |
Uint8List img1, Uint8List img2, Uint8List output, int width, int height, | |
{double threshold = 0.1, bool includeAA = true}) { | |
if (img1.length != img2.length) { | |
throw new FormatException('Cannot compare images of differing sizes.'); | |
} |
/// A push based XmlReader interface, intended to be similar to .NET's XmlReader. | |
class XmlTextReader { | |
/// Creates a new reader for `input`. | |
/// | |
/// Setting `ignoreWhitespace` to false will cause text nodes | |
XmlTextReader(String input, {this.ignoreWhitespace = true}) { | |
_result = Success(input, 0, null); | |
_depth = 0; | |
_eof = false; | |
} |
import 'package:flutter/material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Flutter Demo', | |
theme: new ThemeData( |
class Foo { | |
String toString() { | |
return null; | |
} | |
} | |
void main() { | |
var foo = new Foo(); | |
print('$foo'); // throws ArgumentException | |
} |
import 'dart:ui' show Picture; | |
import 'package:flutter_svg/svg.dart'; | |
... | |
PictureInfo info = svg.svgPictureStringDecoder( | |
'<svg />', | |
false, // don't allow drawing outside of the viewbox | |
null, // don't apply any ColorFilter |
// import 'package:bottom_sheet/viewport_scroll_controller.dart'; | |
import 'package:flutter/material.dart'; | |
import 'bottom_material.dart'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override |
import 'dart:convert'; | |
import 'dart:io'; | |
import 'package:meta/meta.dart'; | |
final Stopwatch _stopwatch = Stopwatch(); | |
final bool useColor = stdout.supportsAnsiEscapes; | |
/// The terminal escape for green text, or the empty string if this is Windows | |
/// or not outputting to a terminal. |
import 'dart:ui'; | |
import 'package:flutter/widgets.dart'; | |
SizedBox box; | |
class Lottie extends AnimatedWidget { | |
const Lottie({ | |
Key key, | |
@required this.lottieAnimation, |