flutter/examples/platform_channel
Chris Bracken ce68d97983
[macOS] Battery check in platform_channel sample (#123354)
Adds a check for the case where a device has no battery present. The
devicelab test expects the text "No battery." in the case where a device
has no battery. This is triggered by returning an error with a
NO_BATTERY error code.

Also applies some cosmetic fixes:
* Amends a copyright notice to Flutter instead of com.example
* Deletes an unused test.

Issue: https://github.com/flutter/flutter/issues/79204
2023-03-23 15:19:10 -07:00
..
android Fix Gradle warning in a freshly flutter createed Android project (#122290) 2023-03-21 23:41:49 +00:00
ios Add Info.plist from build directory as input path to Thin Binary build phase (#118209) 2023-01-13 13:41:08 -06:00
lib Enable Windows platform_channel test (#106973) 2022-07-06 14:21:07 +00:00
linux Implement Linux part of examples (#108068) 2022-12-08 08:44:11 +13:00
macos [macOS] Battery check in platform_channel sample (#123354) 2023-03-23 15:19:10 -07:00
test_driver Enable Windows platform_channel test (#106973) 2022-07-06 14:21:07 +00:00
windows Fix typos (#121171) 2023-02-23 19:43:21 +00:00
pubspec.yaml roll packages (#123339) 2023-03-23 19:03:57 +00:00
README.md Add Windows to the platform_channels example (#106754) 2022-06-30 14:54:07 +00:00

Example of calling platform services from Flutter

This project demonstrates how to connect a Flutter app to platform-specific services.

You can read more about accessing platform and third-party services in Flutter.

iOS

You can use the commands flutter build and flutter run from the app's root directory to build/run the app or you can open ios/Runner.xcworkspace in Xcode and build/run the project as usual.

Android

You can use the commands flutter build and flutter run from the app's root directory to build/run the app or to build with Android Studio, open the android folder in Android Studio and build the project as usual.

Windows

You can use the commands flutter build and flutter run from the app's root directory to build/run the app or you can build once then open build\windows\platform_channel.sln in Visual Studio to build and run.