'Flutter: How can use FieldValue.arrayRemove?

How can I delete an array of array of objects from Firestore? I want to delete it inside a list.generate

Here is my database structure, I want to delete [{street A, number 25}]

enter image description here

List.generate(
  ...
  IconButton(
    icon: const Icon(CupertinoIcons.trash),
    onPressed: () async {
      try {
        await FirebaseFirestore.instance
            .collection('users')
            .doc(data['uid'])
            .update(
          {
            'adress':
                FieldValue.arrayRemove(
                    ??)
          },
        );
      } catch (e) {
        print(e);
      }
    },
  ),
)),


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source