Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

docs.flutter.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.

Learn more

Flutter 3.41 is live! Check out theFlutter 3.41 blog post!

Leveraging Apple's system APIs and frameworks

Learn about Flutter plugins that offer equivalent functionalities to Apple's frameworks.

When you come from iOS development, you might need to find Flutter plugins that offer the same abilities as Apple's system libraries. This might include accessing device hardware or interacting with specific frameworks likeHealthKit.

For an overview of how the SwiftUI framework compares to Flutter, seeFlutter for SwiftUI developers.

Introducing Flutter plugins

#

Dart calls libraries that contain platform-specific codeplugins, short for "plugin package". When developing an app with Flutter, you useplugins to interact with system libraries.

In your Dart code, you use the plugin's Dart API to call the native code from the system library being used. This means that you can write the code to call the Dart API. The API then makes it work for all platforms that the plugin supports.

To learn more about plugins, seeUsing packages. Though this page links to some popular plugins, you can find thousands more, along with examples, onpub.dev. The following table does not endorse any particular plugin. If you can't find a package that meets your needs, you can create your own or use platform channels directly in your project. To learn more, check outWriting platform-specific code.

Adding a plugin to your project

#

To use an Apple framework within your native project, import it into your Swift or Objective-C file.

To add a Flutter plugin, runflutter pub add package_name from the root of your project. This adds the dependency to yourpubspec.yaml file. After you add the dependency, add animport statement for the package in your Dart file.

You might need to change app settings or initialization logic. If that's needed, the package's "Readme" page onpub.dev should provide details.

Flutter Plugins and Apple Frameworks

#
Use CaseApple Framework or ClassFlutter Plugin
Access the photo libraryPhotoKit using thePhotos andPhotosUI frameworks andUIImagePickerControllerimage_picker
Access the cameraUIImagePickerController using the.camerasourceTypeimage_picker
Use advanced camera featuresAVFoundationcamera
Offer In-app purchasesStoreKitin_app_purchase1
Process paymentsPassKitpay2
Send push notificationsUserNotificationsfirebase_messaging3
Access GPS coordinatesCoreLocationgeolocator
Access sensor data4CoreMotionsensors_plus
Make network requestsURLSessionhttp
Store key-values@AppStorage property wrapper andNSUserDefaultsshared_preferences
Persist to a databaseCoreData or SQLitesqflite
Access health dataHealthKithealth
Use machine learningCoreMLgoogle_ml_kit5
Recognize textVisionKitgoogle_ml_kit5
Recognize speechSpeechspeech_to_text
Use augmented realityARKitar_flutter_plugin
Access weather dataWeatherKitweather6
Access and manage contactsContactscontacts_service
Expose quick actions on the home screenUIApplicationShortcutItemquick_actions
Index items in Spotlight searchCoreSpotlightflutter_core_spotlight
Configure, update and communicate with WidgetsWidgetKithome_widget
Automate app actions with Siri/ShortcutsAppIntentsintelligence
  1. Supports both Google Play Store on Android and Apple App Store on iOS.

  2. Adds Google Pay payments on Android and Apple Pay payments on iOS.

  3. Uses Firebase Cloud Messaging and integrates with APNs.

  4. Includes sensors like accelerometer, gyroscope, etc.

  5. Uses Google's ML Kit and supports various features like text recognition, face detection, image labeling, landmark recognition, and barcode scanning. You can also create a custom model with Firebase. To learn more, seeUse a custom TensorFlow Lite model with Flutter.2

  6. Uses theOpenWeatherMap API. Other packages exist that can pull from different weather APIs.

Was this page's content helpful?

Unless stated otherwise, the documentation on this site reflects Flutter 3.38.6. Page last updated on 2025-09-25.View source orreport an issue.


[8]ページ先頭

©2009-2026 Movatter.jp