当前位置:网站首页>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
边栏推荐
- Distributed session
- Pass anonymous function to simplification principle
- Terminal -- Zsh of terminal three swordsmen
- Comparison problems encountered in recent study
- Ocx control can be called by IE on some computers, but can not be called by IE on some computers
- Review the old and know the new
- Research on lg1403 divisor
- Express の Hello World
- 桂林 稳健医疗收购桂林乳胶100%股权 填补乳胶产品线空白
- Express file download
猜你喜欢

Machine learning note 9: prediction model optimization (to prevent under fitting and over fitting problems)

Small program learning path 1 - getting to know small programs

JVM notes (III): analysis of JVM object creation and memory allocation mechanism

Summary of Android knowledge points and common interview questions

Linear-gradient()

Comparison problems encountered in recent study

12. problem set: process, thread and JNI architecture

Notes on masking and padding in tensorflow keras

Express の Hello World

Distributed ID
随机推荐
Numpy (time date and time increment)
GPT (improving language understanding generative pre training) paper notes
Use V-IF with V-for
Electron, which can wrap web page programs into desktop applications
Express file upload
目标检测yolov5开源项目调试
Terminal -- Zsh of terminal three swordsmen
Distributed ID
[new book recommendation] cleaning data for effective data science
布隆过滤器
【新书推荐】Cleaning Data for Effective Data Science
MySQL index optimization miscellaneous
Challenge transform() 2D
Flutter的特别之处在哪里
NER – Named Entity Recognition Summary
I once met a girl whom I most wanted to take care of all my life. Later... No later
Distributed session
Experience of an acmer
Xlnet (generalized autorefressive trainingfor language understanding) paper notes
【新书推荐】Deno Web Development