flutter_reactive_ble icon indicating copy to clipboard operation
flutter_reactive_ble copied to clipboard

Implement web/mac/windows/linux support

Open rohitsangwan01 opened this issue 2 years ago • 8 comments

Web Support with almost all Functionalities working , need some improvements though

Unimplemented Methods : clearGattCache requestMtuSize requestConnectionPriority

Here is a demo of example app running without any changes ( just added web folder)

https://user-images.githubusercontent.com/59526499/160696123-322f2200-daa9-4276-85e9-76d3969a41df.mp4

rohitsangwan01 avatar Mar 29 '22 19:03 rohitsangwan01

@remonh87 project is building fine for me in Android +Ios+Web , not sure why these checks are failing Also is there any way , that i can create my own package, something like flutter_reactive_ble_web_extension And use it in project something like this

FlutterReactiveBle ble = FlutterReactiveBle( WebExtension: FlutterReactiveBleWeb, WindowsExtension : ....... )

rohitsangwan01 avatar Mar 30 '22 14:03 rohitsangwan01

@rohitsangwan01 we would prefer if you use a separate package and publish it yourself :) . We of course can add your package to the readme. @Taym95 what do you think?

remonh87 avatar Mar 30 '22 18:03 remonh87

@remonh87 yes but my current project is totally based on flutter_reactive_ble , and now i have to add other platforms support as well , so i wanted a way somehow , add support for different platforms without touching code , as Android/Ios is already stable ,and this web and Desktop (Windows + mac+linux) extensions i added to this package are already available in other packages am contributing to quick_blue package too, so here i just added quick_blue to do the native tasks , and for web am using flutter_web_bluetooth , so i guess no sense in uploading new packages right, but if i can somehow extend flutter_reactive_ble , by using my github repo or something , i know last option is to use my fork , but if possible , i wanted to use this kind of option i, in which , for Android/Ios i can use official flutterReactiveBLe , and for other platforms i can use ReactiveBlePlatformFactory of my fork ,and even it will be helpfull for other peoples too if they want to extend their platform support , or wanted to test or another last option in my case is to create two projects , one with official package for Mobile , and one with Desktop/Web support only using my fork any suggestions ,if there is something else i can try , without creating two projects

rohitsangwan01 avatar Mar 30 '22 18:03 rohitsangwan01

@rohitsangwan01 we would prefer if you use a separate package and publish it yourself :) . We of course can add your package to the readme. @Taym95 what do you think?

Totally agree with @remonh87, we want to keep this repo for IOS/Android, and we are open to endorsing plugins for other platforms.

Taym95 avatar Mar 31 '22 14:03 Taym95

@remonh87 @Taym95 okk great, we can go with endorsing

rohitsangwan01 avatar Mar 31 '22 17:03 rohitsangwan01

@rohitsangwan01 When you have the repo setup do you mind posting it here? I'd love to incorporate into my project.

FXschwartz avatar Apr 05 '22 15:04 FXschwartz

@FXschwartz ,Sure , for now you can try out web version by downloading my fork , and add in your project locally , am still implementing this in my project , so might change few things later , for me , everything is working on Web , same as Mobile for now , also read Docs of reactive_ble_web before using that, there are some changes required in project to add web support

rohitsangwan01 avatar Apr 05 '22 15:04 rohitsangwan01

Just a random passerby but I think it makes sense for flutter packages to not separate out platforms. Flutter itself is trying to be very cross platform by targeting most anything (whether this is good or bad) so I don't think it would be unusual to include web/mac etc. A table of platform features and yet-to-be-implemented's in the Readme is usually how I've seen other packages go about similar situations.

stargazing-dino avatar Jun 14 '22 20:06 stargazing-dino

I will close this one and looking forward for endorsing your package.

Taym95 avatar Mar 15 '23 08:03 Taym95

@rohitsangwan01 we would prefer if you use a separate package and publish it yourself :) . We of course can add your package to the readme. @Taym95 what do you think?

Totally agree with @remonh87, we want to keep this repo for IOS/Android, and we are open to endorsing plugins for other platforms.

I mean cross-platform is the whole point of Flutter.

nobodyguy avatar Sep 27 '23 07:09 nobodyguy

@nobodyguy yes and thats why we moved to federated plugin structure so other people of the community can step up and make a plugin for a platform based on ours. The problem is that with incorporating a new platform we increase the maintenance load with at least 33% per platform. We all do this in our free time and already struggle to answer all issues in this repo.

remonh87 avatar Sep 27 '23 09:09 remonh87