Skip to content

Commit 2b98417

Browse files
authored
chore: update example app for VertexAI (#13128)
1 parent d205ecd commit 2b98417

File tree

1 file changed

+7
-3
lines changed
  • packages/firebase_vertexai/firebase_vertexai/example/lib

1 file changed

+7
-3
lines changed

packages/firebase_vertexai/firebase_vertexai/example/lib/main.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
import 'package:firebase_core/firebase_core.dart';
16+
import 'package:firebase_vertexai/firebase_vertexai.dart';
1517
import 'package:flutter/material.dart';
1618
import 'package:flutter/services.dart';
1719
import 'package:flutter_markdown/flutter_markdown.dart';
18-
import 'package:firebase_vertexai/firebase_vertexai.dart';
19-
import 'package:firebase_core/firebase_core.dart';
20+
21+
// REQUIRED if you want to run on Web
22+
const FirebaseOptions? options = null;
2023

2124
void main() {
2225
runApp(const GenerativeAISample());
@@ -137,7 +140,8 @@ class _ChatWidgetState extends State<ChatWidget> {
137140
);
138141

139142
Future<void> initFirebase() async {
140-
await Firebase.initializeApp();
143+
// ignore: avoid_redundant_argument_values
144+
await Firebase.initializeApp(options: options);
141145
}
142146

143147
void _scrollDown() {

0 commit comments

Comments
 (0)