diff --git a/pkgs/examples/genui_client/firebase.json b/pkgs/examples/genui_client/firebase.json index 97a530e34..e6b248089 100644 --- a/pkgs/examples/genui_client/firebase.json +++ b/pkgs/examples/genui_client/firebase.json @@ -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" } } }, @@ -30,13 +32,7 @@ }, "hosting": { "source": ".", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], - "frameworksBackend": { - "region": "us-central1" - } + "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], + "frameworksBackend": { "region": "us-central1" } } -} \ No newline at end of file +} diff --git a/pkgs/examples/genui_client/lib/firebase_options.dart b/pkgs/examples/genui_client/lib/firebase_options.dart index 71a98ab54..1d94afa9d 100644 --- a/pkgs/examples/genui_client/lib/firebase_options.dart +++ b/pkgs/examples/genui_client/lib/firebase_options.dart @@ -18,7 +18,6 @@ class DefaultFirebaseOptions { static FirebaseOptions get currentPlatform { if (kIsWeb) { return web; - return web; } switch (defaultTargetPlatform) { case TargetPlatform.android: @@ -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( @@ -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', + ); } diff --git a/pkgs/examples/genui_client/lib/src/ui_models.dart b/pkgs/examples/genui_client/lib/src/ui_models.dart index 5f64f6cb0..66c81a31c 100644 --- a/pkgs/examples/genui_client/lib/src/ui_models.dart +++ b/pkgs/examples/genui_client/lib/src/ui_models.dart @@ -85,8 +85,7 @@ extension type UiDefinition.fromMap(Map _json) { for (final widget in (_json['widgets'] as List)) { var typedWidget = widget as Map; - widgetById[typedWidget['id'] as String] = - typedWidget as Map; + widgetById[typedWidget['id'] as String] = typedWidget; } return widgetById;