Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions pkgs/examples/genui_client/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"projectId": "fluttergenui",
"configurations": {
"android": "1:975757934897:android:1735467a70fdea1d0ff010",
"ios": "1:975757934897:ios:540a1a4eeeb57afb0ff010",
"macos": "1:975757934897:ios:540a1a4eeeb57afb0ff010",
"web": "1:975757934897:web:818e744e0a7130da0ff010"
"web": "1:975757934897:web:818e744e0a7130da0ff010",
"windows": "1:975757934897:web:0152927eeb6b30320ff010"
}
}
},
Expand All @@ -30,13 +32,7 @@
},
"hosting": {
"source": ".",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"frameworksBackend": {
"region": "us-central1"
}
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"frameworksBackend": { "region": "us-central1" }
}
}
}
20 changes: 13 additions & 7 deletions pkgs/examples/genui_client/lib/firebase_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
if (kIsWeb) {
return web;
return web;
}
switch (defaultTargetPlatform) {
case TargetPlatform.android:
Expand All @@ -28,14 +27,11 @@ class DefaultFirebaseOptions {
case TargetPlatform.macOS:
return macos;
case TargetPlatform.windows:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for windows - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
return windows;
case TargetPlatform.linux:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for linux - '
'you can reconfigure this by running the FlutterFire CLI again.',
'DefaultFirebaseOptions have not been configured for linux because '
"Firebase AI Logic isn't supported on Linux",
);
default:
throw UnsupportedError(
Expand Down Expand Up @@ -79,4 +75,14 @@ class DefaultFirebaseOptions {
storageBucket: 'fluttergenui.firebasestorage.app',
iosBundleId: 'dev.flutter.genui.genuiClient',
);

static const FirebaseOptions windows = FirebaseOptions(
apiKey: 'AIzaSyBZwqYvj1Qe2odTlesCrD6tI7ZUzkax5BA',
appId: '1:975757934897:web:0152927eeb6b30320ff010',
messagingSenderId: '975757934897',
projectId: 'fluttergenui',
authDomain: 'fluttergenui.firebaseapp.com',
storageBucket: 'fluttergenui.firebasestorage.app',
measurementId: 'G-Z3D9Q293KS',
);
}
3 changes: 1 addition & 2 deletions pkgs/examples/genui_client/lib/src/ui_models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ extension type UiDefinition.fromMap(Map<String, Object?> _json) {

for (final widget in (_json['widgets'] as List<Object?>)) {
var typedWidget = widget as Map<String, Object?>;
widgetById[typedWidget['id'] as String] =
typedWidget as Map<String, Object?>;
widgetById[typedWidget['id'] as String] = typedWidget;
}

return widgetById;
Expand Down