当前位置:网站首页>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
边栏推荐
- Notes on masking and padding in tensorflow keras
- 4. use ibinder interface flexibly for short-range communication
- Flutter的特别之处在哪里
- Self service terminal development process
- Dart 开发技巧
- Acquisition de 100% des actions de Guilin latex par Guilin Robust Medical pour combler le vide de la gamme de produits Latex
- Express の Hello World
- Tclistener server and tcpclient client
- Function simplification principle: save if you can
- Express の post request
猜你喜欢

MySQL index and data storage structure foundation

Idea shortcut key settings

Notes on masking and padding in tensorflow keras

Applet learning path 2 - event binding

Express get request

Oracle cross database replication data table dblink

Distributed ID

Small program learning path 1 - getting to know small programs

训练一个图像分类器demo in PyTorch【学习笔记】

ES6 learning path (III) deconstruction assignment
随机推荐
Utlis memory pool object pool
Deep Learning with Pytorch- A 60 Minute Blitz
Pytorch graduate warm LR installation
Tablet PC based ink handwriting recognition input method
Use V-IF with V-for
Research on lg1403 divisor
Flutter 中的 ValueNotifier 和 ValueListenableBuilder
12. problem set: process, thread and JNI architecture
How do I start? (continuously updating)
thrift简单使用
MySQL index and data storage structure foundation
Redis + MySQL implements the like function
11. customize hooks
Why won't gold depreciate???
utlis 内存池 对象池
Solution to pychart's failure in importing torch package
Bluetooth BT RF test (forwarding)
Terminal -- Zsh of terminal three swordsmen
Challenge transform() 2D
ACM intensive training graph theory exercise 3 in the summer vacation of 2020 [problem solving]