uidを指定して、setを実行するとcollection自体の値が全て更新されてしまう。
var msg = _controller.text;
final data = {
'address': msg,
};
FirebaseFirestore firestore = FirebaseFirestore.instance;
final snapshot = await firestore.collection('mydata').doc('12345678').set(data);
コレクション自体を残す場合はsetではなく、updateを使用する
var msg = _controller.text;
final data = {
'address': msg,
};
FirebaseFirestore firestore = FirebaseFirestore.instance;
final snapshot = await firestore.collection('mydata').doc('12345678').update(data);