update display text

This commit is contained in:
Mohamed Nouffer
2023-01-22 18:43:08 +05:30
parent 0d5be265ff
commit 45ef09a613

View File

@ -7,13 +7,13 @@ class TextUtils{
static String getDisplayTextFeture(GeoJsonFeature f){
RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
String txt = "";
if(f.properties!["cp"] > 0){
//print("-- sub-- ${f.properties!["cp"]} ----");
txt = "${f.properties!["cp"].toString().replaceAll(regex, '')}";
}
if(f.properties!["buy_point"] != null && f.properties!["buy_point"] > 0){
// if(f.properties!["cp"] > 0){
// //print("-- sub-- ${f.properties!["cp"]} ----");
// txt = "${f.properties!["cp"].toString().replaceAll(regex, '')}";
// }
//if(f.properties!["buy_point"] != null && f.properties!["buy_point"] > 0){
txt = txt + "[${f.properties!["sub_loc_id"]}]";
}
//}
return txt;
}