This file contains hidden or 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:path_to_regexp/path_to_regexp.dart'; | |
class PathStackEntry { | |
PathStackEntry({required this.path, required this.builder, this.maintainState = true, this.aliases}); | |
final String path; | |
// This wants the query string values | |
final WidgetBuilder builder; | |
final List<String>? aliases; | |
final bool maintainState; |
This file contains hidden or 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:cached_network_image/cached_network_image.dart'; | |
import 'package:flutter/material.dart'; | |
// Run this in skia rendering mode, and upload to a web server. | |
// Observe as no images load. | |
class CorsImageSpike extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
builder: (_, __) => Column( | |
children: [ |
This file contains hidden or 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:provider/provider.dart'; | |
import 'package:styled_widget/styled_widget.dart'; | |
class StyledTabBar extends StatelessWidget { | |
final Function(int) onTabPressed; | |
final double width; | |
final List<String> sections; | |
final int index; | |
static const List<String> defaults = ["test", "foo", "bar"]; |
This file contains hidden or 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'; | |
class ScrollbarSpike extends StatefulWidget { | |
@override | |
_ScrollbarSpikeState createState() => _ScrollbarSpikeState(); | |
} | |
class _ScrollbarSpikeState extends State<ScrollbarSpike> { | |
static List<String> items = List.generate(10000, (index) => "List Item: $index"); |
This file contains hidden or 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
#!/bin/bash | |
width=480 | |
fps=20 | |
for fn in *.mp4; do | |
[ -e "$fn" ] || continue; | |
ffmpeg -y -i ${fn} -filter_complex '[0:v]fps='$fps'},scale=w='$width':h=-1,split [a][b];[a] palettegen [p];[b][p] paletteuse' ${fn/mp4/gif} | |
done |
This file contains hidden or 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
if(Capabilities.manufacturer.toLowerCase().indexOf("android") > -1){ | |
var applyRotationFix:Boolean = false; | |
//Use build.props file to check if we're on a problematic Kindle Device | |
var file:File = new File("/system/build.prop"); | |
if(file.exists){ | |
var fs: FileStream = new FileStream(); | |
fs.open(file, FileMode.READ); | |
var props:String = fs.readUTFBytes(fs.bytesAvailable); | |
fs.close(); | |
var regExp:RegExp = /ro.product.model=(\w+)/; |
This file contains hidden or 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
package ca.esdot.lib.utils | |
{ | |
import flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.display.DisplayObject; | |
import flash.display.Stage; | |
import flash.display.StageQuality; | |
import flash.events.Event; | |
import flash.events.FocusEvent; | |
import flash.events.KeyboardEvent; |
NewerOlder