Skip to content

fix: flutterfire configure command when existing firebase_options.dart has a wrong format#424

Open
nilsreichardt wants to merge 1 commit intoinvertase:mainfrom
nilsreichardt:fix-error-for-broken-files
Open

fix: flutterfire configure command when existing firebase_options.dart has a wrong format#424
nilsreichardt wants to merge 1 commit intoinvertase:mainfrom
nilsreichardt:fix-error-for-broken-files

Conversation

@nilsreichardt
Copy link
Contributor

Description

If the repository already had a firebase_options.dart file, the flutterfire configure commend expected a specific format. If this file had a different format, the flutterfire configure . command failed.

As described in #422 the example of flutter/ai repository has this firebase_options.dart:

// File normally generated by FlutterFire CLI. This is a stand-in.
// See README.md for details.
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;

class DefaultFirebaseOptions {
  // TODO: Remove this file and run `flutterfire config` for Firebase options
  static FirebaseOptions get currentPlatform {
    throw UnimplementedError(
      'Generate this file by running `flutterfire configure`. '
      'See README.md for details.',
    );
  }
}

Source: https://github.com/flutter/ai/blob/fd3d6d7936f503e9e53d91564cb280263083c1bf/example/lib/firebase_options.dart

Before this PR, the flutterfire configure command couldn't handle this firebase_options.dart file.

Closes #422

Type of Change

  • feat -- New feature (non-breaking change which adds functionality)
  • 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)
  • ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 refactor -- Code refactor
  • ci -- Build configuration change
  • 📝 docs -- Documentation
  • 🗑️ chore -- Chore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Exception: UnsupportedError not found in android

1 participant