Platform Executor is a Flutter app that provides a convenient way to execute platform-specific code from your Dart code. It acts as a bridge between your Flutter app and the underlying Android or iOS platform, allowing you to access native device features and capabilities.
- Exposes a simple API to call platform-specific methods
- Supports both Android and iOS platforms
- Handles method call errors and returns values back to Dart
- Utilizes modern architecture patterns like clean architecture and provider/riverpod
- Provides examples and documentation for common use cases
To get started with Platform Executor, follow these steps:
- Clone the repository:
'''git clone https://github.com/your-username/platform_executor.git'''
- Open the project in your preferred IDE (e.g., Android Studio or Visual Studio Code).
- Run the app:
- For Android: flutter run
- For iOS: flutter run -d ios
- Explore the example features:
Battery level // Device info - coming soon // Sensor data - coming soon
To use the Platform Executor in your own Flutter app, follow these steps:
- Add the platform_executor package to your pubspec.yaml:
yaml dependencies: platform_executor: git: url: https://github.com/your-username/platform_executor.git
Import the platform_executor package:
dartCopyimport 'package:platform_executor/platform_executor.dart';
Call the platform-specific methods:
dartCopyfinal batteryLevel = await PlatformExecutor.getBatteryLevel(); Refer to the project's documentation for more details on available methods and usage examples. Contributing We welcome contributions to the Platform Executor project. If you find any issues or have ideas for new features, please feel free to open a new issue or submit a pull request. License This project is licensed under the MIT License.