Skip to content
This repository has been archived by the owner on May 15, 2020. It is now read-only.

Add support for web #46

Open
Zazo032 opened this issue Dec 12, 2019 · 13 comments
Open

Add support for web #46

Zazo032 opened this issue Dec 12, 2019 · 13 comments

Comments

@Zazo032
Copy link

Zazo032 commented Dec 12, 2019

Now that Flutter supports web platform on the beta channel, and it's ready for active development, it would be great for this plugin to add compatibility for web. If there are methods that are not supposed to be ran on web (e.g. carrier info), an UnsupportedException might be thrown.

@haoliu-amp
Copy link
Contributor

haoliu-amp commented Dec 12, 2019

The reason we didn't develop our SDK by simply using bridging, it to support other platforms in the future. I mark this as a feature request for now.

But I would like to do a poll here to see how many of you need this.
Anyone who wanna this feature please leave a comment in this thread with following information.

  • company name
  • application/product name

Thanks!

@NaikSoftware
Copy link

NaikSoftware commented Mar 4, 2020

We need this feature. We use flutter for new projects in our company. And also for web target.

@haoliu-amp
Copy link
Contributor

I wonder if there's a way to reuse javascript library in dart project, have you researched on that?

@Neamar
Copy link
Contributor

Neamar commented May 2, 2020

I'd love the feature.

Company name not relevant, project names: AubeRêve and TurnMeOn, also planning to rewrite https://play.google.com/store/apps/details?id=fr.neamar.lolgamedata&hl=en in Flutter Web.

@haoliu-amp
Copy link
Contributor

Hello all! We implemented a new Flutter SDK which bridges the calls to our native iOS, Android.
It's a tough decision but this will bring a few benefits if you read the release here.
https://github.com/amplitude/Amplitude-Flutter-New/releases

For now, there's no plan to do Flutter support for web. Wonder if it's possible you can just use our JS SDK?

@Zazo032
Copy link
Author

Zazo032 commented May 5, 2020

It would be possible to use existing JS library via Plugin Federation (just like any other plugin that adds support to web, but has native Android/iOS dependencies)

@haoliu-amp
Copy link
Contributor

@Zazo032 You mean bridging the call to Amplitude JS library like what we did for the new Flutter SDK?

What's Plugin Federation btw? Would you like to share me some links about this?

@Zazo032
Copy link
Author

Zazo032 commented May 5, 2020

https://flutter.dev/docs/development/packages-and-plugins/developing-packages#federated-plugins

You can see some examples on flutter/plugins repo

@haoliu-amp
Copy link
Contributor

@Zazo032 Nice! This is cool! Potentially we could do the bridging logic for web. I will do some research.

@Neamar
Copy link
Contributor

Neamar commented May 5, 2020

That would honestly be amazing :)

Flutter web is not fully stable yet, but I've started seeing some websites relying on it, and it would make a lot of sense to get the same quality from Amplitude everywhere to fulfill the "code once, deploy everywhere" fantasy :)

@haoliu-amp
Copy link
Contributor

haoliu-amp commented May 5, 2020

Also, pls migrate to use our new Flutter SDK ASAP if you can. This old SDK will not be supported anymore. Also there're some API changes too.

@Neamar
Copy link
Contributor

Neamar commented May 5, 2020

I'm personally already using the new SDK, but saw the issue here and wanted to add my +1

(maybe it would be worth renaming this repository to Amplitude-Flutter-deprecated? And move the other one to be "Amplitude-Flutter"? Github will handle the redirections automatically.)

@haoliu-amp
Copy link
Contributor

@Neamar Yep, done!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants