Flutter makes it pretty simple to use platform features/native SDKs within a flutter application. However, does anyone know if the opposite is possible?
What I'd love to do is create an SDK in dart/flutter that can be used by mobile developers on their preferred platform.
Related
I want to make a Roku app using flutter but don't know how can i run Roku app in flutter using android studio
Unfortunately no.
The only similarity Roku has with Android is Linux in its roots :)
To make Flutter work for Roku, you will need at least to add the possibility to display Skia canvas on the platform. To do so, most likely you will need NDK because BrightScript is poor for such purposes.
When I was working with Roku, NDK was not in public access, you had to write them directly via email to ask for it. And if Flutter SDK for Roku exists, you will still need to ask Roku to use NDK in your app because you will need it at least to initialize the project.
So yes, if one day an initiative exists, both Flutter and Roku teams will need to make efforts to make this idea alive. Btw, there is a request for Roku support to the Flutter team created in 2019: https://github.com/flutter/flutter/issues/37159
We are building an application in Flutter, which is composed of an SDK (no UI Code) and a Flutter UI, using the SDK.We have now the requirement to provide the SDK for other, native target platforms (iOS, Android, Web, JVM) and use it in existing applications. As far as we have understood this is possible for iOS and Android. But is this also possible (or planned) for Web and JVM? We simply want to minimise the effort to build the similar SDK in various platform specific technologies.
Thank you!
You can build your Flutter app targeting web https://docs.flutter.dev/development/platform-integration/web/faq#is-the-web-version-of-flutter-ready-for-production
If you want to target the Desktop then check https://docs.flutter.dev/development/platform-integration/desktop to see if it meets your requirements.
I wanted to ask about the implementation of IOS & Android Widgets for Flutter.
Current Scenario :
Basically, i have developed the app on android platform and now i want to convert it to IOS platform. Since this is my first app, i really need some experienced voice on some issues i am facing.
Questions :
1 - Is there any simple way to detect that the widgets currently used are of Android/IOS Platform ?
How can we know for sure that a specific widget is of Android platform and is not going to work on IOS platform and vice versa.
2 - If somehow we know for sure that the current widget we are using is of Android platform, then how can we find its equivalent widget to implement for IOS platform.
3 - Are these widgets specifically required when we are going to upload/publish to these platforms respective stores. For example in a scenario where i hadn't converted all of my android app widgets to ios widgets and when i try to publish the app for IOS store, does the IOS Store rejects that or not?
Any suggestions or help is greatly appreciated.
All standard widgets will work on iOS as is. Flutter paints the UI, rather than call the native APIs. You might use a plugin that does not support iOS, but I have not yet come across such a plugin on pub.dev.
If you want to write platform specific code, you can import dart:io and use the boolean Platform.isIOS or Platform.isAndroid.
Both the App Store and Play Store have specific requirements before your app is approved.
In case you really want to have Android specific widgets on Android devices and iOS specific widgets on iOS devices, then use the Flutter Platform Widgets package. This will exactly do that - drawing iOS buttons using the Cupertino library and Android buttons using the Android library (and most other widgets as well).
As #Mudassir mentioned in the other comment this is not a requirement. In case you go with the default widgets, you will have the same look on all devices (even web, Windows, etc.).
I'm interested in using Flutter primarily for my startup MVP on Web and possibly Android. I see the flutter community has made a lot of widgets but a lot of them are tagged iOS or Android. Since Futter is all about using one codebase is it wrong to assume that these widgets would work on web too? I imagine the setup would be different but similar with a Flutter web app as opposed to a Flutter Android app.
I couldn't find a whole lot about this on the Flutter site. I also know that web is still beta but by the time I'm done with the MVP it'll probably be at stable release or close enough.
Well... It depends. If the widget has some sort of native code the answer is no. In Flutter there are two type of packages: the "normal" package, and the plugin.
The packages are made only of dart code, so there are no bounds to native, and you can use everywhere dart (and Flutter) can run.
The plugins are packages with native code and you can use only on the platform supported by that plugin.
For example the package provider, it's a package, and you can use in every supported platform where dart (and Flutter) can run. But url_launcher, it's a plugin, so you can run only on Android, iOS, and web, but for example on desktop, it will no work.
If the package if you found it's only a widget, you should be able to use on the web.
TLDR: No,a PWA it's a web app, so it can't run Android or iOS specific code.
i am currently facing the following problem and I hope someone can help me out:
I want to write an app in Flutter (yes I already compared this framework to others like React Native and Ionic) but i need to include the motiontag SDK and here is where the problem starts.
The Motion Tag SDK is only available for native App descreptive native programming language (Java/Kotlin, Swift).
Is there a way to include the SDK anyway to flutter??
Like some workaround!
Thanks for helping me out!
Flutter does have communication with native via Platform Channels, so if the sdk is just function calls you could call the function from flutter/dart , and then let the platform channel handle the call to the native function with arguments. If the sdk it's about rendering UI inside flutter then it's more complicated but it's possible as long as you use the boundaries of PlatformView . All the native plugins developed for flutter use this two methods to handle native code/UI