Parse-SDK-Flutter icon indicating copy to clipboard operation
Parse-SDK-Flutter copied to clipboard

Sdk for web

Open alex9153 opened this issue 3 years ago • 18 comments

Hi.

I need very much parse sdk for web

alex9153 avatar Aug 29 '22 17:08 alex9153

Thanks for opening this issue!

pub.dev does not display the web support label. But, read the documentation that explains exactly what is needed to run on the web.

RodrigoSMarques avatar Aug 30 '22 00:08 RodrigoSMarques

Should we (better) indicate that somewhere in our README maybe?

mtrezza avatar Aug 31 '22 00:08 mtrezza

I've seen some Flutter SDKs that show for example 3 icons at the top of their docs to indicate which platforms they support:

  • iOS
  • Android
  • Web

mtrezza avatar Aug 31 '22 08:08 mtrezza

I've seen some Flutter SDKs that show for example 3 icons at the top of their docs to indicate which platforms they support:

  • iOS
  • Android
  • Web

Yes. But for some reason pub.dev doesn't identify support in the Parse package.

In fact, the reason is here.

Captura de Tela 2022-09-01 às 10 48 24

It's the way he identifies platform support. In practice support already exists even before Flutter Web is stable. For this reason, information was placed right at the beginning of the documentation.

RodrigoSMarques avatar Sep 01 '22 13:09 RodrigoSMarques

How can we get Flutter display Web compatibility?

mtrezza avatar Sep 01 '22 14:09 mtrezza

How can we get Flutter display Web compatibility?

The analysis instructs to remove the import (dart:o) from a class, but if this is executed the code doesn't work. Even with this import, the code runs on the web.

I don't know what can be done.

RodrigoSMarques avatar Sep 02 '22 03:09 RodrigoSMarques

Do you know why dart.io is considered an issue here? I assume there is a reason for that.

mtrezza avatar Sep 02 '22 15:09 mtrezza

@mtrezza @RodrigoSMarques You can skip this pub.dev error with the following code!

Add the following code at the end of pubspec.yaml package

flutter:
  plugin:
    platforms:
      android:
        default_package: parse_server_sdk_flutter
      ios:
        default_package: parse_server_sdk_flutter
      linux:
        default_package: parse_server_sdk_flutter
      macos:
        default_package: parse_server_sdk_flutter
      web:
        default_package: parse_server_sdk_flutter
      windows:
        default_package: parse_server_sdk_flutter

by doing this, you are indicating that this package works for these platforms

mbfakourii avatar Sep 11 '22 10:09 mbfakourii

Great! Would you want to open a PR so we can fix this?

mtrezza avatar Sep 11 '22 20:09 mtrezza

Do you know why dart.io is considered an issue here? I assume there is a reason for that.

the library does not support WEB, as per the documentation.

But the Parse package uses a class that exists in it.

It might be possible to solve the problem by extending the Dart.IO class to another class using this new class in Parse.

I can do some tests, but only by publishing the package will we be sure if it worked.

https://api.flutter.dev/flutter/dart-io/dart-io-library.html

RodrigoSMarques avatar Sep 11 '22 22:09 RodrigoSMarques

@mtrezza @RodrigoSMarques You can skip this pub.dev error with the following code!

Add the following code at the end of pubspec.yaml package

flutter:
  plugin:
    platforms:
      android:
        default_package: parse_server_sdk_flutter
      ios:
        default_package: parse_server_sdk_flutter
      linux:
        default_package: parse_server_sdk_flutter
      macos:
        default_package: parse_server_sdk_flutter
      web:
        default_package: parse_server_sdk_flutter
      windows:
        default_package: parse_server_sdk_flutter

by doing this, you are indicating that this package works for these platforms

This applies to plugins. Parse-SDK-Flutter is a package.

RodrigoSMarques avatar Sep 11 '22 22:09 RodrigoSMarques

@mtrezza @RodrigoSMarques You can skip this pub.dev error with the following code! Add the following code at the end of pubspec.yaml package

flutter:
  plugin:
    platforms:
      android:
        default_package: parse_server_sdk_flutter
      ios:
        default_package: parse_server_sdk_flutter
      linux:
        default_package: parse_server_sdk_flutter
      macos:
        default_package: parse_server_sdk_flutter
      web:
        default_package: parse_server_sdk_flutter
      windows:
        default_package: parse_server_sdk_flutter

by doing this, you are indicating that this package works for these platforms

This applies to plugins. Parse-SDK-Flutter is a package.

I tested this in my package [2] and it worked

mbfakourii avatar Sep 12 '22 05:09 mbfakourii

@RodrigoSMarques should we try it out?

mtrezza avatar Sep 15 '22 09:09 mtrezza

@RodrigoSMarques should we try it out?

There is no way to verify without publishing a new version.

I believe it will not work.

The definition of platforms is not being done by the package settings, but by code analysis.

Captura de Tela 2022-09-16 às 11 22 35

RodrigoSMarques avatar Sep 16 '22 14:09 RodrigoSMarques

@RodrigoSMarques should we try it out?

There is no way to verify without publishing a new version.

I believe it will not work.

The definition of platforms is not being done by the package settings, but by code analysis.

Captura de Tela 2022-09-16 às 11 22 35

please check this page in flutter doc

mbfakourii avatar Sep 16 '22 15:09 mbfakourii

@RodrigoSMarques should we try it out?

There is no way to verify without publishing a new version. I believe it will not work. The definition of platforms is not being done by the package settings, but by code analysis. Captura de Tela 2022-09-16 às 11 22 35

please check this page in flutter doc

As I said here.)

This applies to plugins.

Parse-SDK that's a package., not plugin.

There is difference.

dart_package_plugin

Because it is "pure" Dart, it is not necessary to specify the platforms, as it should run on all platforms.

However, code analysis is performed, which verifies compatibility with platforms.

RodrigoSMarques avatar Sep 16 '22 17:09 RodrigoSMarques

still have problem

mbfakourii avatar May 29 '23 10:05 mbfakourii