# ac_widget_recorder
A Flutter plugin to capture widget as a video and save it locally.
Based on and inspired by `https://github.com/J-Libraries/flutter_screen_capture.git`
> ✅ Records *only your app*, not the entire device screen.
---
## 🧰 Features
- Start/Stop app-only screen recording
---
## 📦 Installation
Add to your `pubspec.yaml`:
```yaml
dependencies:
ac_widget_recorder:- Permissions (Add in
android/app/src/main/AndroidManifest.xml):
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />- Minimum SDK Version (in
android/app/build.gradle):
defaultConfig {
minSdkVersion 24
}- Enable View Recording (if using MediaProjection internally):
Some Android versions may require additional permission handling for screen capture APIs.
- Permissions (in
ios/Runner/Info.plist):
<key>NSPhotoLibraryAddUsageDescription</key>
<string>We need access to save the recorded screen to your photo library.</string>-
Minimum iOS Version:
iOS 12.0+recommended -
Post-processing: iOS may require moving saved files to the app's document directory or Photos library for access.
import 'package:ac_widget_recorder/ac_widget_recorder.dart';
final controller = RecorderController(fps: 8);
// Start recording
String? filePath = await controller.startRecording();
// Stop recording and share
String? filePath = await controller.stopRecording();The recorded file is saved locally (.mp4).
You can pass the output file name as a parameter to startRecording().
Check the example/ directory for a fully working app.
- Android '9+ may require scoped storage handling
- Recording starts after build; consider a small delay before invoking
Feel free to open an issue or contribute a PR!
MIT License © 2026 Martin Edlman (Anycode)
### flutter pub publish --dry-run
### flutter pub publish