Skip to content

Instantly share code, notes, and snippets.

@yizems
yizems / main
Created March 5, 2021 11:39
年度实际到手薪资计算: 找工作计算年收入必备
// 计算公积金缴存和无限缴存
//http://www.ab126.com/goju/10770.html
//年终奖计算方式
//https://www.sohu.com/a/294643118_569711
/// 年度汇算,一年收入汇算
fun main() {
@yizems
yizems / gist:a47408eb9dffebf337a3dbe2df221db0
Last active May 16, 2020 13:30
Flutter Web js 获取 registerViewFactory 创建的页面元素
// ignore:undefined_prefixed_name
ui.platformViewRegistry.registerViewFactory('someViewType', (int viewId) {
final wrapper = DivElement()
..style.width = '100%'
..style.height = '100%';
/// FIX:
/// https://github.com/flutter/flutter/issues/40080
/// https://github.com/flutter/flutter/issues/50452
/// document.getElementsByTagName('flt-platform-view')[0].shadowRoot.getElementById('plotly_div_id_')
@yizems
yizems / gist:609c09c8e6509fbdf75f3b61f5a6abd0
Last active March 13, 2019 01:42
flutter : 计算文本总高度是否超出msxline 和 给定高度
https://github.com/leisim/auto_size_text/blob/master/lib/src/text_util.dart#L5
import 'dart:ui';
import 'package:flutter/widgets.dart';
bool checkTextFits(TextSpan text, Locale locale, double scale, int maxLines,
double maxWidth, double maxHeight) {