Skip to content

Instantly share code, notes, and snippets.

View yjbanov's full-sized avatar
💭
Building a Web runtime for Flutter: http://bit.ly/flutter-web

Yegor yjbanov

💭
Building a Web runtime for Flutter: http://bit.ly/flutter-web
View GitHub Profile
@yjbanov
yjbanov / .travis.yml
Created May 26, 2017 03:46
Continuously build Flutter APKs
os: linux
language: android
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
android:
components:
- tools
- platform-tools
@yjbanov
yjbanov / .travis.yml
Created May 26, 2017 03:55
Continuously build Flutter IPAs
os: osx
language: generic
osx_image: xcode8.3
before_script:
- pip install six
- brew update
- brew install --HEAD libimobiledevice
- brew install ideviceinstaller
- brew install ios-deploy
- git clone https://github.com/flutter/flutter.git -b alpha --depth 1
@yjbanov
yjbanov / .travis.yml
Created May 26, 2017 04:05
Continuously build Flutter APKs and IPAs using Travis build matrix
matrix:
include:
- os: linux
language: android
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
android:
components:
@yjbanov
yjbanov / .travis.yml
Created May 26, 2017 04:16
Fast Flutter build
matrix:
# This causes the build to complete immediately upon first failure or once
# required jobs are green.
fast_finish: true
# Building APK/IPA takes a long time; do not wait for them to finish.
allow_failures:
- env: JOB=APK
- env: JOB=IPA
@yjbanov
yjbanov / dart.dx
Last active September 26, 2017 17:25
// Below is a rewrite of the app generated by `flutter create` using a
// hypothetical syntax for a Flutter-oriented Dart language extension,
// called dx (file extension .dx).
//
// Key properties of the language:
//
// - Valid Dart is also valid .dx (start by renaming .dart to .dx).
// - Transpiles file-by-file to plain Dart (syntax translation only).
// - Start with strong-mode Dart syntax/semantics, then:
// - Add Flutter-specific keywords: widget, state, build.
/*
Flutter crash report; please file at https://github.com/flutter/flutter/issues.
## command
flutter doctor
## exception
FileSystemException: FileSystemException: Cannot open file, path = '/home/linux2/.cocoon/flutter/bin/cache/downloads/https@c@@s@@s@storage.googleapis.com@s@flutter_infra@s@flutter@s@6a724f0d3e22d41246baf3447d7ba2c9ff886765@s@android-arm-profile@s@linux-x64.zip.zip' (OS Error: File name too long, errno = 36)
@yjbanov
yjbanov / stopwatch_driver_test.dart
Created March 23, 2018 01:30
Performance test for the stopwatch Flutter app
import 'dart:async';
import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart';
// Run this test using:
//
// flutter drive --profile test_driver/perf.dart
void main() {
group('performance', () {
@yjbanov
yjbanov / hundreds.dart
Created March 23, 2018 01:58
The Hundreds widget
class Hundreds extends StatefulWidget {
Hundreds(this.stopwatch);
final Stopwatch stopwatch;
HundredsState createState() => new HundredsState(stopwatch);
}
class HundredsState extends State<Hundreds> {
final Stopwatch stopwatch;
@yjbanov
yjbanov / main.dart
Created March 23, 2018 03:12
Flutter: enabling repaint rainbow
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'timer_page.dart';
void main() {
debugRepaintRainbowEnabled = true;
runApp(new MyApp());
}
@yjbanov
yjbanov / repaint_boundary.dart
Created March 23, 2018 03:50
Flutter: using RepaintBoundary
new RepaintBoundary(
child: new SizedBox(
height: 72.0,
child: new Hundreds(stopwatch),
),
)