当前位置:网站首页>Dart development skills
Dart development skills
2022-06-30 09:44:00 【InfoQ】
Dart Simple extension of string currency format in
void main() {
print("1000".currency());
print("1300000".currency());
print("1005000".currency(symbol: '£'));
print("1000000".currency(symbol: '€'));
}
extension StringFormatter on String{
String currency({String symbol = "\$"}) {
int step = 1;
String val = this;
for (var i = val.length-1; i >=0; i--) {
if (i - 2*step > 0) {
val = val.replaceRange(i-2*step, i-2*step, ",");
step++;
}
}
return "$symbol$val";
}
}

Use Flutter stay Android 12 Verify on Android App Links
How it works ?
await DomainVerificationManager.isSupported;
- Verified : Passed Android Domain to which link validation applies
- Selected : Failed validation , But the user manually associates the domain of the application .
- nothing : Any other domain
await DomainVerificationManager.domainStageVerified;
await DomainVerificationManager.domainStageSelected;
await DomainVerificationManager.domainStageNone;
Change state
await DomainVerificationManager.domainRequest();
Conclusion
边栏推荐
- Guilin robust medical acquired 100% equity of Guilin Latex to fill the blank of latex product line
- Distributed session
- 目标检测yolov5开源项目调试
- 八大排序(一)
- UltraEdit delete empty line method
- Notes on masking and padding in tensorflow keras
- 小程序开发踩坑之旅
- Demo of guavacache
- Design of mfc+mysql document data management system based on VS2010
- Golang magic code
猜你喜欢
Express の Hello World
NTP of Prometheus monitoring_ exporter
Pytorch graduate warm LR installation
Train an image classifier demo in pytorch [learning notes]
JVM notes (III): analysis of JVM object creation and memory allocation mechanism
Idea setting automatic package Guide
Express get request
【新书推荐】Deno Web Development
JVM tuning tool introduction and constant pool explanation
桂林 穩健醫療收購桂林乳膠100%股權 填補乳膠產品線空白
随机推荐
单片机 MCU 固件打包脚本软件
Express - static resource request
Numpy (data type)
Flutter 中的 ValueNotifier 和 ValueListenableBuilder
3.集成eslint、prettier
Solution to pychart's failure in importing torch package
Deep Learning with Pytorch- neural network
Properties of string
Design of mfc+mysql document data management system based on VS2010
直播带货源码开发中,如何降低直播中的延迟?
Express file download
Simple redis lock
I'm late for school
【新书推荐】MongoDB Performance Tuning
NTP of Prometheus monitoring_ exporter
仿照微信Oauth2.0接入方案
Acquisition de 100% des actions de Guilin latex par Guilin Robust Medical pour combler le vide de la gamme de produits Latex
Flutter的特别之处在哪里
Deep Learning with Pytorch - autograd
utlis 内存池 对象池