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
abstract class Annotation { | |
ui.TextStyle? get style; | |
void build(...); | |
} | |
class Range { | |
// ... | |
} | |
@immutable |
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'; | |
// Tap or click the image to transition between owls. | |
// The owls are DecorationImages with different settings (e.g. repeating, | |
// or a nine-patch center slice configuration). The AnimatedContainer | |
// lerps the DecorationImages so that they transition smoothly. | |
void main() { | |
runApp(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
import 'package:flutter/material.dart'; | |
import 'package:flutter_test/flutter_test.dart' show TestVSync; | |
void main() { | |
runApp(const Placeholder()); // to trigger the scheduler | |
AnimationController test = AnimationController( | |
duration: const Duration(milliseconds: 200), | |
vsync: const TestVSync(), | |
); |
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'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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
Flexible( | |
child: Padding( | |
padding: const EdgeInsets.all(100), | |
child: FloatingActionButton( | |
onPressed: () { | |
setState(() { | |
_position = Alignment.topRight; | |
}); | |
}, | |
child: const Icon( |
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 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
void _enablePlatformOverrideForDesktop() { | |
if (!kIsWeb && (Platform.isWindows || Platform.isLinux)) { | |
debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia; | |
} | |
} |
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 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
void _enablePlatformOverrideForDesktop() { | |
if (!kIsWeb && (Platform.isWindows || Platform.isLinux)) { | |
debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia; | |
} | |
} |
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/perl -wT | |
use strict; | |
use Device::SerialPort; | |
if ($< != 0) { | |
print("Must be run as root.\n"); | |
exit(1); | |
} | |
my $port = Device::SerialPort->new("/dev/ttyUSB0"); |
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
STARTING TEST | |
Spawning flutter [run, --machine, -d, flutter-tester, --start-paused] in /tmp/flutter_expression_test.ITINEI | |
Expecting daemon.connected event... | |
<=stdout= [{"event":"daemon.connected","params":{"version":"0.4.2","pid":258867}}] | |
OK (daemon.connected event) | |
Expecting app.started event... | |
Expecting app.debugPort event... | |
<=stdout= [{"event":"app.start","params":{"appId":"255f4a36-3bb0-4314-a5a7-0c21bad6fd7e","deviceId":"flutter-tester","directory":"/tmp/flutter_expression_test.ITINEI","supportsRestart":true}}] | |
<=stdout= Launching lib/main.dart on Flutter test device in debug mode... | |
<=stdout= [{"event":"app.debugPort","params":{"appId":"255f4a36-3bb0-4314-a5a7-0c21bad6fd7e","port":42159,"wsUri":"ws://127.0.0.1:42159/ws","baseUri":"file:///tmp/flutter_expression_test.ITINEIQJXLRQ/flutter_expression_test.ITINEI/"}}] |
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'; | |
final Identifier time = new Identifier(); | |
final Identifier counter = new Identifier(); | |
void main() { | |
Model model = new Model(); | |
runApp(new ModelProvider( |
NewerOlder