Тёмный

Rethinking Dart interoperability with Android 

Flutter
Подписаться 569 тыс.
Просмотров 15 тыс.
50% 1

In the past, Flutter only supported integration with Android libraries through a message-based approach called platform channels. With a new command using JNI to bridge to Android system APIs, Flutter developers can easily access platform APIs without needing to use a platform channel or plugin. This session will dive deeper into how Dart automatically creates bindings for cross-language interoperation and demo how to call a Jetpack Library directly from Dart in a Flutter app.
Resources:
Java interop → goo.gle/3GilmDA
Full sample code → goo.gle/3KfwORI
Demo code → goo.gle/3KAvp9O
File issues and share feedback → goo.gle/3KU4V3a
Speakers: Mariam Hasnany, Hossein Yousefi
Watch more:
Watch all Flutter Sessions → goo.gle/IO23_flutter
Watch all the Technical Sessions from Google I/O 2023 → goo.gle/IO23_sessions
Watch more Mobile Sessions → goo.gle/IO23_mobile
All Google I/O 2023 Sessions → goo.gle/IO23_all
Subscribe to Flutter! → goo.gle/FlutterYT
#GoogleIO

Наука

Опубликовано:

 

9 май 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 29   
@flutterdev
@flutterdev Год назад
Watch all Flutter Sessions → goo.gle/IO23_flutteryt_pin
@noahr842
@noahr842 Год назад
I'm really glad to see this progress in this area. 🎉
@Arash7m
@Arash7m Год назад
Hossein Yousefi is so well spoken!
@fodedoumbouya9731
@fodedoumbouya9731 Год назад
Wow 🎉🎉🎉🎉 Flutter is going far and deep 👏👏👏
@techwithdipufrom0ton621
@techwithdipufrom0ton621 8 месяцев назад
Great great team of Flutter and Dart. I ❤ this community
@markthomas9181
@markthomas9181 Год назад
Wow this is so cool.
@_yogeshsingh
@_yogeshsingh Год назад
amazing 🎉
@MrUbervan
@MrUbervan Год назад
Tem diferença entre canal e a chamada plataforma ?
@user-nu2nj7mf2z
@user-nu2nj7mf2z Год назад
very good
@madurangakannangara
@madurangakannangara 8 месяцев назад
Excellent! There're much capabilities already in the Java space. The more we can use them through Dart, better/faster the applications would be able to ship to the customer!
@flutterflex
@flutterflex 3 месяца назад
Great 😃
@yogarelaxmusic8871
@yogarelaxmusic8871 8 месяцев назад
do you have any reference video for the pigeon to work with C++ library? couldn't find enough to understand better?
@user-mh4sz7yu1p
@user-mh4sz7yu1p Год назад
cool!
@bennguyen1313
@bennguyen1313 10 месяцев назад
Not sure the difference between a Flutter Plugin vs Package, but I'd like to make a Flutter Windows/Desktop application that can access peripherals via their DLL drivers/library. From what I've seen FFI/JNIGen , Pigeon, or platform-channels must be used, but not sure how. For example, the DLL exports functions that return pointers to structures (that in turn have enums and other structures as its member elements). Would love to see such a hello-world style Flutter (3.11?) application!
@andreyrezende4221
@andreyrezende4221 11 месяцев назад
awesome feature
@inazumaeleven738
@inazumaeleven738 Год назад
will the final apk contain all the methods or only the ones that were used?
@uhossein
@uhossein Год назад
It will contain no classes/method by default in the release mode since they're all going to be tree-shaken. You will have to manually add the classes and methods you want to keep using proguard rules. We have an open issue to automatically generate the proguard rules in the future.
@daniyaldolare3782
@daniyaldolare3782 Год назад
Why didn't they use jnigen for the flutter camera plugin?
@mariamhasnany9052
@mariamhasnany9052 Год назад
JNIgen is still experimental and pigeon made sense for our rewrite for the camera plugin (we wanted to release with 3.10) to use CameraX api because it kept our implementation and architecture the same for the plugin used across multiple platforms. If Camera plugin was only for Android usage, JNIgen would have made more sense. As JNIgen becomes more stable we will do a better job of explaining when to use JNIgen vs pigeon vs method channels.
@user-kn5bn7cd5s
@user-kn5bn7cd5s 10 месяцев назад
its pretty confusing for native developer to write native code in dart
@PenguinCrayon269
@PenguinCrayon269 Год назад
what is the difference between platform channel and jnigen?
@mariamhasnany9052
@mariamhasnany9052 Год назад
with platform (method) channels you have to write both Dart code for the Android API and a bunch of platform-specific code for handlers to send a receive messages from dart to native. JNIgen automatically generates Dart bindings for Android APIs available in Java or Kotlin code. After generating the bindings, you can go ahead and call the API like any other Dart code without needing to write any handlers because the bindings do that for you.
@orjiemmanuel6442
@orjiemmanuel6442 Год назад
👏👏👏👏👏
@dmitriykarbovskiy1790
@dmitriykarbovskiy1790 Год назад
Finally.
@AIGameMonster
@AIGameMonster Год назад
It would be great if you can call Compose directly and cross-platform. I didn’t find such an example code.
@blekel
@blekel Год назад
Неужели случилась друидская магия и Android либы теперь можно использовать на iOS, десктопе и вебе? Но подождите, ведь на видео они запускают только Android эмулятор. Если это другой вариант, как можно написать код только для одной платформы, то я даже не знаю, смеяться над этим или плакать - это "грабли" для потери времени в самом чистейшем виде.
@gofudgeyourselves9024
@gofudgeyourselves9024 Год назад
Show an ios example with swift as well
@saqqara6361
@saqqara6361 Год назад
Great, but how to include the other platforms like Windows, Mac, Linux, Web this way?
Далее
How to build a package in Dart
14:23
Просмотров 16 тыс.
HOW DID SHE WIN??
00:49
Просмотров 15 млн
100+ Linux Things you Need to Know
12:23
Просмотров 53 тыс.
Introducing Impeller - Flutter's new rendering engine
14:50
Code Push for Android & iOS | Flutter Shorebird
25:46
Bringing pattern matching to Dart
20:28
Просмотров 38 тыс.
S-Pen в Samsung достоин Золота #Shorts
0:38
Мои любимые Android смартфоны
0:55
КРУТОЙ ТЕЛЕФОН
0:16
Просмотров 1,3 млн