Skip to content

Instantly share code, notes, and snippets.

Avatar

Gavin Doughtie gavindoughtie

View GitHub Profile
View stream_multiplex.dart
import 'package:flutter/material.dart';
import 'dart:async';
void main() {
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
@gavindoughtie
gavindoughtie / stream_demo.dart
Last active Sep 25, 2017
looking for stream replay
View stream_demo.dart
import 'package:flutter/material.dart';
import 'dart:async';
void main() {
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
View config
import path from 'path';
import util from 'util';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import webpack from 'webpack';
// The full paths to our various directories
const PATHS = {};
['lib', 'build'].forEach((pathName) => {
PATHS[pathName] = path.join(__dirname, pathName);
});
View gist:ddb514bc420b2e0809ab6ba4c6930b33
let reactRoot = document.getElementById('app-root');
const loadStart = new Date();
import('./core_module').then(function(core_module) {
const coreDate = new Date();
const coreMS = coreDate.getTime() - loadStart.getTime();
const header = document.getElementById('message-header');
header.textContent = `CORE LOADED (${coreMS})`;
const {ReactDOM, React} = core_module;
ReactDOM.render(<h2>RenderedByReact</h2>, reactRoot);
View gist:ce96eded8fdd0bea2d60307f21e96991
exports.extractCSS = function(paths) {
return {
module: {
rules: [
// Extract CSS during build
{
test: /\.css$/,
include: paths,
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
@gavindoughtie
gavindoughtie / gist:12f867d1d6bb7477b478f1673ce19663
Created Dec 22, 2016
parts.js extractCSS attempt for Webpack2
View gist:12f867d1d6bb7477b478f1673ce19663
exports.extractCSS = function(paths) {
return {
module: {
rules: [
// Extract CSS during build
{
test: /\.css$/,
include: paths,
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
View gist:7c3cdfe2585ae0914189ea925b4983ff
import 'package:flutter/material.dart';
void main() {
runApp(
new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new FlutterDemo(),
@gavindoughtie
gavindoughtie / main.dart
Last active Dec 2, 2016
2-level tab bar error minimal case
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new FlutterDemo(),
You can’t perform that action at this time.