View no-try-catch-await.dart
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:async'; | |
Future<void> main() async { | |
var a = await any(err()); | |
print(a); | |
print(a.runtimeType); | |
print(a.hasErr); | |
print(a.ok); | |
print(a.ok.runtimeType); | |
print(a.err); |
View gen_qr_code.dart
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:io'; | |
import 'package:image/image.dart'; | |
import 'package:qr/qr.dart'; | |
void main() async { | |
var bytes1 = _genQRCode('大宝好厉害!!!', rectSize: 20); | |
File('test1.png').writeAsBytesSync(bytes1); | |
var bytes2 = _genQRCode('大宝好厉害!!!', size: 500); | |
File('test2.png').writeAsBytesSync(bytes2); |
View 📊 Weekly development breakdown
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
Vue.js 26 hrs 41 mins █████████████▊░░░░░░░ 65.8% | |
YAML 4 hrs 29 mins ██▎░░░░░░░░░░░░░░░░░░ 11.1% | |
Rust 2 hrs 7 mins █░░░░░░░░░░░░░░░░░░░░ 5.2% | |
SQL 1 hr 38 mins ▊░░░░░░░░░░░░░░░░░░░░ 4.0% | |
XML 1 hr 18 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.2% |
View trans_demo.dart
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:convert'; | |
import 'dart:io'; | |
void main(List<String> arguments) { | |
get('卡号登陆舰安理会的', func: TransType.ZH_HANT) | |
.then((value) => print(value)) | |
.catchError((e) => print(e)); | |
} | |
Future<R> get( |