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:math'; | |
import 'dart:ui' as ui; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/physics.dart'; | |
const thumbSize = 52.0; | |
const minTemperature = 0.0; | |
const maxTemperature = 50.0; |
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 'dart:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
const size = Size(512, 512); | |
final rd = Random(); | |
const gridSize = 32.0; | |
const tile = Offset(32, 32); |
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:math'; | |
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(const App()); | |
class App extends StatelessWidget { | |
const App({Key? key}) : super(key: key); | |
@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
% flutter run -v | |
[ +30 ms] [/Users/rxlabz/dev/tools/flutter/] git rev-parse --abbrev-ref --symbolic @{u} | |
[ +25 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} | |
[ ] origin/master | |
[ ] [/Users/rxlabz/dev/tools/flutter/] git ls-remote --get-url origin | |
[ +5 ms] Exit code 0 from: git ls-remote --get-url origin | |
[ ] https://github.com/flutter/flutter.git | |
[ ] [/Users/rxlabz/dev/tools/flutter/] git log -n 1 --pretty=format:%H | |
[ +7 ms] Exit code 0 from: git log -n 1 --pretty=format:%H |
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
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController; | |
let flutterChannel = FlutterMethodChannel.init(name: "plugin_demo", binaryMessenger: controller); | |
flutterChannel.setMethodCallHandler({ | |
(call: FlutterMethodCall, result: FlutterResult) -> Void in | |
if ("getPlatformVersion" == call.method) { | |
result("iOS " + UIDevice.current.systemVersion); | |
} else { | |
result(FlutterMethodNotImplemented); | |
} |
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
static const MethodChannel _channel = const MethodChannel('plugin_demo'); | |
String platformVersion = await _channel.invokeMethod('getPlatformVersion'); |
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/widgets.dart'; | |
const kSwatchSize = 36.0; | |
void main() { | |
runApp(new MaterialApp( | |
home: new Scaffold( | |
body: new Stack(children: [ | |
new Positioned( |
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 'dart:ui'; | |
final double devicePixelRatio = window.devicePixelRatio; | |
final Size logicalSize = window.physicalSize / devicePixelRatio; | |
final Rect physicalBounds = Offset.zero & (logicalSize * devicePixelRatio); | |
void main() { |
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'; | |
void main() { | |
runApp(new MaterialApp(home:new Scaffold(body:new ConstDemoApp()))); | |
} | |
class ConstDemoApp extends StatefulWidget { | |
@override | |
_ConstDemoAppState createState() => new _ConstDemoAppState(); | |
} |
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/local/bin/idevice_id | |
[ ] which ideviceinfo | |
[ +3 ms] Exit code 0 from: which ideviceinfo | |
[ ] /usr/local/bin/ideviceinfo | |
[ ] which iproxy | |
[ +3 ms] Exit code 0 from: which iproxy | |
[ ] /usr/local/bin/iproxy | |
[ ] which idevicedebug | |
[ +4 ms] Exit code 0 from: which idevicedebug | |
[ ] /usr/local/bin/idevicedebug |
NewerOlder