Dart Tutorial

Flutter Chapter 12 of 16

Device Features and Plugins

Use the camera, gallery, location, links, sharing and other native features through plugins, and call native code yourself.

Flutter draws the interface, but the camera, the GPS and the file picker belong to the operating system. Plugins are packages that connect Dart code to those native features.

Lessons in this chapter

  1. Flutter Plugins and PermissionsLearn how Flutter plugins work, how to pick good ones, and how to declare and request permissions on Android and iOS correctly.
  2. Image Picker and Camera in FlutterLet users take a photo or choose one from the gallery in Flutter with image_picker, then display, resize and upload it.
  3. url_launcher, share_plus, geolocator and Other Common Flutter PluginsOpen links, phone and email with url_launcher, share content with share_plus, get the device location with geolocator, and more.
  4. Platform Channels in Flutter: Calling Native CodeCall Kotlin and Swift code from Flutter with MethodChannel: send arguments, return results, handle errors and receive events.