skip to Main Content

I want to delete text in ‘[]’ this chracters,I cant delete this chracters because I am using array in array method

enter image description here

[item1, item2,item3]

I am simply say ı want to

item1 item2 item3

I don’t want to ‘[]’ chracters

              Row(children: [
                Text('işlemler '),
                Text('${listeleme(index)}')
              ],),

My Firestore Database

enter image description here

my codes

var veriler= await FirebaseFirestore.instance.collection('salons').doc(kendisalonuuid.toString()).collection('adisyonlar').snapshots().listen((event) async {
    for(var doc in event.docs){
    FBmusterilist.add(doc.get('musteriuuid'));
    FBislemlerlist.add(doc.get('islem'));
    FBucretlist.add(doc.get('ucret'));
    FBpersonelist.add(doc.get('calisan'));
    FBadisyonuuidlist.add(doc.id.toString());
    }
    for(var doc in FBpersonelist){
      var personeladi=await FirebaseFirestore.instance.collection('users').doc(doc).get().then((value) => {
        personelismi=value.get('adsoyad'),
        print('personel list doc verisi $personelismi'),
        FBpersoneladilist.add(value.get('adsoyad')),
      setState(() {}),
      });

      personeladi;
    }

    for(var doc in FBmusterilist){
      var musteriadigetirme=await FirebaseFirestore.instance.collection('salons').doc(kendisalonuuid).collection('müsteriler').doc(doc).get().then((value) =>{
        print(doc.toString()),
        musteriadi=value.get('ad'),
        musterisoyadi=value.get('soyad'),
        print('müsteri soyad verisi $musterisoyadi'),
        FBmusteriadilist.add('$musteriadi $musterisoyadi'),
      setState(() {}),
      });

      musteriadigetirme;
    }
  });

2

Answers


  1. you could use this on your List to remove [] and add spacing between words:

    List<String> items = ["item1", "item2", "item3"];
    print(items); // [item1, item2, item3]
    print(items.join(" ")); // item1 item2 item3
    
    Login or Signup to reply.
  2. Try replaceAll

    Text('${listeleme(index).replaceAll(RegExp(r'[^ws]+'), '')}')
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search