Skip to content

Instantly share code, notes, and snippets.

View wilsonowilson's full-sized avatar
🌟
Dreaming in Dart

Wilson Wilson wilsonowilson

🌟
Dreaming in Dart
View GitHub Profile
@wilsonowilson
wilsonowilson / index.html
Created July 8, 2021 18:41
Swapping web renderers at runtime
<body>
<script src="js/renderer_switcher.js"></script>
<script>
<!-- Service worker code -->
<!-- This script installs service_worker.js to provide PWA functionality to application. For more information, see: https://developers.google.com/web/fundamentals/primers/service-workers -->
...
@wilsonowilson
wilsonowilson / distortion.dart
Created March 17, 2021 19:05
Widget warping and distortion in Flutter
import 'dart:typed_data';
import 'dart:ui' hide Image;
import 'package:image/image.dart' as img_lib;
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
enum ImageFetchState { initial, fetching, fetched }
class ImagePlayground extends StatefulWidget {
@wilsonowilson
wilsonowilson / gist:a25d8d30886c4bcf12d7c1ac9e497ce8
Last active February 26, 2021 16:25
RenderObject Swipe Card
import 'dart:math';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
class FlipCardPlayground extends StatelessWidget {
@override