@@ -26,6 +26,7 @@ import 'pages/schema_page.dart';
26
26
import 'pages/imagen_page.dart' ;
27
27
import 'pages/document.dart' ;
28
28
import 'pages/video_page.dart' ;
29
+ import 'pages/bidi_page.dart' ;
29
30
30
31
// REQUIRED if you want to run on Web
31
32
const FirebaseOptions ? options = null ;
@@ -35,9 +36,9 @@ void main() async {
35
36
await Firebase .initializeApp ();
36
37
await FirebaseAuth .instance.signInAnonymously ();
37
38
38
- var vertex_instance =
39
+ var vertexInstance =
39
40
FirebaseVertexAI .instanceFor (auth: FirebaseAuth .instance);
40
- final model = vertex_instance .generativeModel (model: 'gemini-1.5-flash' );
41
+ final model = vertexInstance .generativeModel (model: 'gemini-1.5-flash' );
41
42
42
43
runApp (GenerativeAISample (model: model));
43
44
}
@@ -87,6 +88,7 @@ class _HomeScreenState extends State<HomeScreen> {
87
88
SchemaPromptPage (title: 'Schema Prompt' , model: widget.model),
88
89
DocumentPage (title: 'Document Prompt' , model: widget.model),
89
90
VideoPage (title: 'Video Prompt' , model: widget.model),
91
+ BidiPage (title: 'Bidi Stream' , model: widget.model),
90
92
];
91
93
92
94
void _onItemTapped (int index) {
@@ -178,6 +180,14 @@ class _HomeScreenState extends State<HomeScreen> {
178
180
label: 'Video Prompt' ,
179
181
tooltip: 'Video Prompt' ,
180
182
),
183
+ BottomNavigationBarItem (
184
+ icon: Icon (
185
+ Icons .stream,
186
+ color: Theme .of (context).colorScheme.primary,
187
+ ),
188
+ label: 'Bidi Stream' ,
189
+ tooltip: 'Bidi Stream' ,
190
+ ),
181
191
],
182
192
currentIndex: _selectedIndex,
183
193
onTap: _onItemTapped,
0 commit comments