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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"mime/multipart" | |
"net/http" | |
"os" |
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
package com.kikt.demo | |
import org.springframework.web.bind.annotation.RequestMapping | |
import java.io.IOException | |
import com.sun.tools.corba.se.idl.toJavaPortable.Util.mkdir | |
import org.springframework.web.bind.annotation.RequestParam | |
import org.springframework.web.bind.annotation.RestController | |
import org.springframework.web.multipart.MultipartFile | |
import java.io.File |
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/material.dart'; | |
class MaterialTapWidget extends StatelessWidget { | |
final double radius; | |
final Function onTap; | |
final Widget child; | |
final double elevation; | |
final Color backgroundColor; | |
final Color splashColor; | |
final Function onLongTap; |
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/cupertino.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_localizations/flutter_localizations.dart'; | |
class ChineseCupertinoLocalizations implements CupertinoLocalizations { | |
final materialDelegate = GlobalMaterialLocalizations.delegate; | |
final widgetsDelegate = GlobalWidgetsLocalizations.delegate; | |
final local = const Locale('zh'); |
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/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', |
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 'dart:collection'; | |
class MyList<E> extends Object with ListMixin<E> implements List<E> { | |
var _array = <E>[]; | |
@override | |
int get length => _array.length; | |
@override | |
void set length(int newLength) => _array.length = newLength; |
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
Color calcAntdColor(Color color, int index) { | |
var helper = _AntdColorHelper.instance; | |
var isLight = index <= 6; | |
var hsv = HSVColor.fromColor(color); | |
int i = isLight | |
? _AntdColorHelper.lightColorCount + 1 - index | |
: index - _AntdColorHelper.lightColorCount - 1; | |
return HSVColor.fromAHSV( | |
color.opacity, |
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 UIHelper { | |
static Rect findGlobalRect(GlobalKey key) { | |
RenderBox renderObject = key.currentContext?.findRenderObject(); | |
if (renderObject == null) { | |
return null; | |
} | |
var globalOffset = renderObject?.localToGlobal(Offset.zero); |
OlderNewer