Skip to content

Instantly share code, notes, and snippets.

@gavindoughtie
gavindoughtie / main.dart
Last active December 2, 2016 18:23
2-level tab bar error minimal case
import 'package:flutter/material.dart';
void main() {
runApp(
new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new FlutterDemo(),
import 'package:flutter/material.dart';
void main() {
runApp(
new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new FlutterDemo(),
@gavindoughtie
gavindoughtie / gist:12f867d1d6bb7477b478f1673ce19663
Created December 22, 2016 21:46
parts.js extractCSS attempt for Webpack2
exports.extractCSS = function(paths) {
return {
module: {
rules: [
// Extract CSS during build
{
test: /\.css$/,
include: paths,
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
@gavindoughtie
gavindoughtie / gist:ce96eded8fdd0bea2d60307f21e96991
Created December 22, 2016 23:12
Correct exports.extractCSS
exports.extractCSS = function(paths) {
return {
module: {
rules: [
// Extract CSS during build
{
test: /\.css$/,
include: paths,
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
@gavindoughtie
gavindoughtie / gist:ddb514bc420b2e0809ab6ba4c6930b33
Created December 24, 2016 03:36
Code splitting vendor bundles
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);
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);
});
@gavindoughtie
gavindoughtie / stream_demo.dart
Last active September 25, 2017 05:24
looking for stream replay
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_multiplex.dart
Created September 25, 2017 17:50
stream multiplexing
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
chain:
bech32_prefix: juno
modules:
- wasm
node:
type: remote
config:
rpc:
client_name: juno
address: http://localhost:26657