2

As we know, flutter can call Android or iOS api by plugin, I had written some widgets, Android and iOS native widgets, can I use those widgets in flutter, just like in react native. Thanks.

1
  • What do you mean by native widgets? App Widgets of android and Today's extensions of IOS? Commented Dec 21, 2017 at 7:57

3 Answers 3

2

Yes, you can.

With https://api.flutter.dev/flutter/widgets/AndroidView-class.html (Android) and https://api.flutter.dev/flutter/widgets/UiKitView-class.html (iOS)

Google is using this two Widgets to render WebViews and Maps on those platforms. See: https://pub.dev/packages/webview_flutter and https://pub.dev/packages/google_maps_flutter

It is definitely not easy to use, but it is possible.

Sign up to request clarification or add additional context in comments.

Comments

0

If you are looking for App Widgets that are shown on android desktop, then it is possible to implement such Widgets with native code and use it with flutter.

I'll not completely deny that it is not possible to bridge between native widget and flutter's dart code, but I can say the possibility is yet to be discovered.

Here is the simple App Widget created natively and used with flutter.

Gif image

If you wanted to look into the source code, and build app from source. Here it is.

Hope that helped!

Comments

0

The simple answer is NO

Flutter completely bypasses the iOS and Android OEM control pipeline and draws the entire screen as a Skia canvas, with its own dart UI widgets.

There is no mechanism to mix the flutter canvas with OEM controls

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.