Skip to content

Commit

Permalink
add to example app
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyokone committed Dec 18, 2024
1 parent 2317c28 commit 9713550
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/cloud_firestore/cloud_firestore/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ class _FilmListState extends State<FilmList> {
list.map((e) => e.taskState),
);
return;
case 'vectorValue':
const vectorValue = VectorValue([1.0, 2.0, 3.0]);
final vectorValueDoc = await FirebaseFirestore.instance
.collection('firestore-example-app')
.add({'vectorValue': vectorValue});

final snapshot = await vectorValueDoc.get();
print(snapshot.data());
return;
default:
return;
}
Expand All @@ -250,6 +259,10 @@ class _FilmListState extends State<FilmList> {
value: 'load_bundle',
child: Text('Load bundle'),
),
const PopupMenuItem(
value: 'vectorValue',
child: Text('Test Vector Value'),
),
];
},
),
Expand Down

0 comments on commit 9713550

Please sign in to comment.