This file contains 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
require 'ttfunk' | |
file = TTFunk::File.open(ARGV[0]) | |
size = 200 | |
output_dir = ARGV[2] | |
`mkdir #{output_dir}` | |
cmap = file.cmap | |
chars = {} | |
unicode_chars = [] |
This file contains 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
{ | |
"data":[ | |
{ | |
"viewType":"horizontalScroll", | |
"data":[ | |
{ | |
"viewType":"categoryElement", | |
"imageUrl":"https://gist.githubusercontent.com/vipulasri/8bd2115e50fd73272ea8de08cd54b9d5/raw/c61e583eb588f711126cc72899739d4c9ac9cba6/hamburger.png", | |
"title":"Burgers", | |
"subTitle":"260 Places", |
This file contains 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
class PaintingResponse { | |
List<Painting> paintings; | |
PaintingResponse(this.paintings); | |
PaintingResponse.fromJson(Map<String, dynamic> json) { | |
if (json['Paintings'] != null) { | |
paintings = new List<Painting>(); | |
json['Paintings'].forEach((v) { | |
paintings.add(new Painting.fromJson(v)); |
This file contains 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
//In this, we will create a variable to hold [indicatorHeight] i.e 15.0 | |
//Now, we will create a new offset to set the x-axis position of tab according to the TabIndicatorSize i.e label or tab start. | |
//And set the y-axis to tab height center position and subtracting the value of indicatorHeight center value. | |
final Rect rect = Offset(offset.dx, (configuration.size.height/2) - indicatorHeight/2) & Size(configuration.size.width, indicatorHeight); |
This file contains 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/widgets.dart'; | |
import 'package:flutter/material.dart'; | |
class CustomTabIndicator extends Decoration { | |
@override | |
_CustomPainter createBoxPainter([VoidCallback onChanged]) { | |
return new _CustomPainter(this, onChanged); | |
} |
This file contains 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/widgets.dart'; | |
class CustomTabIndicator extends Decoration { | |
@override | |
BoxPainter createBoxPainter([VoidCallback onChanged]) { | |
// TODO: implement createBoxPainter | |
} | |
} |
NewerOlder