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 RibbonShape extends StatefulWidget { | |
@override | |
RibbonShapeState createState() => RibbonShapeState(); | |
} | |
class RibbonShapeState extends State<RibbonShape> { | |
@override | |
Widget build(BuildContext context) { |
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
"use strict"; | |
const autoprefixer = require("autoprefixer"); | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
module.exports = { | |
modify: (baseConfig, { dev }) => { | |
const appConfig = Object.assign({}, baseConfig); | |
// Setup SCSS |
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 FancyFab extends StatefulWidget { | |
final Function() onPressed; | |
final String tooltip; | |
final IconData icon; | |
FancyFab({this.onPressed, this.tooltip, this.icon}); | |
@override |
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 FancyFab extends StatefulWidget { | |
@override | |
_FancyFabState createState() => _FancyFabState(); | |
} | |
class _FancyFabState extends State<FancyFab> | |
with SingleTickerProviderStateMixin { | |
bool isOpened = false; |
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 FancyFab extends StatefulWidget { | |
final Function() onPressed; | |
final String tooltip; | |
final IconData icon; | |
FancyFab({this.onPressed, this.tooltip, this.icon}); | |
@override |
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
function hexToRgb(hex) { | |
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF") | |
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; | |
hex = hex.replace(shorthandRegex, function (m, r, g, b) { | |
return r + r + g + g + b + b; | |
}); | |
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); | |
return result ? { | |
r: parseInt(result[1], 16), |
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
const divisor = 1000; | |
const pi = 1/divisor; | |
class Faded extends React.PureComponent { | |
constructor(props) { | |
super(props); | |
let i; | |
let collection = []; |