# firebase_core_web 0.1.1+1

The web implementation of firebase_core




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'firebase_core_web:0.1.1+1'
```
Published: 2019-12-13T01:27:59.629256Z
Expected archive SHA-256: b502976ef202ef216a370d1eb556efc3806b48e573fcc6e8b26a8eeb39567e76

Available in cache; verification: upstream_checksum
## Direct dependencies
- firebase: ^7.0.0
- firebase_core_platform_interface: ^1.0.0
- flutter: map[sdk:flutter]
- flutter_web_plugins: map[sdk:flutter]
- js: ^0.6.1
- meta: ^1.1.7

## Package README (untrusted upstream documentation)
# firebase_core_web

The web implementation of [`firebase_core`][1].

## Usage

### Import the package

To use this plugin in your Flutter app on the web, simply add it as a
dependency in your `pubspec.yaml` alongside the base `firebase_core`
plugin.

_(This is only temporary: in the future we hope to make this package
an "endorsed" implementation of `firebase_core`, so it will automatically
be included in your app when you run your Flutter app on the web.)_

Add this to your `pubspec.yaml`:

```yaml
...
dependencies:
  ...
  firebase_core: ^0.4.1
  firebase_core_web: ^0.1.0
  ...
```

### Updating `index.html`

Due to [this bug in dartdevc][2], you will need to manually add the Firebase
JavaScript file to your `index.html` file.

In your app directory, edit `web/index.html` to add the line:

```html
<html>
    ...
    <body>
        <script src="https://www.gstatic.com/firebasejs/7.5.0/firebase-app.js"></script>
        <script src="main.dart.js"></script>
    </body>
</html>
```

### Initialize Firebase

If you want to initialize the default app, follow the steps in the
[Firebase Web Setup][3] docs. Specifically, you'll want to add the
following lines to your `web/index.html` file:

```html
<body>
  <!-- Previously loaded Firebase SDKs -->

  <script>
    // TODO: Replace the following with your app's Firebase project configuration
    var firebaseConfig = {
      // ...
    };

    // Initialize Firebase
    firebase.initializeApp(firebaseConfig);
  </script>
  <script src="main.dart.js"></script>
</body> 
```

### Using the plugin

Once you have added the `firebase_core_web` dependency to your pubspec,
you can use `package:firebase_core` as normal.

[1]: ../firebase_core/firebase_core
[2]: https://github.com/dart-lang/sdk/issues/33979
[3]: https://firebase.google.com/docs/web/setup#add-sdks-initialize

## Changelog
## 0.1.1+1

* Add an android/ folder with no-op implementation to workaround https://github.com/flutter/flutter/issues/46898

## 0.1.1

* Require Flutter SDK 1.12.13+hotfix.4 or greater.
* Fix homepage.

## 0.1.0+3

* Remove the deprecated `author:` field from pubspec.yaml
* Bump the minimum Flutter version to 1.10.0.

## 0.1.0+2

* Add documentation for initializing the default app.

## 0.1.0+1

* Use `package:firebase` for firebase functionality.

## 0.1.0

* Initial open-source release.







 
