screen_record_flutter

Last updated:

0 purchases

screen_record_flutter Image
screen_record_flutter Images
Add to Cart

Description:

screen record flutter

screen_record_flutter #
Flutter plugin to record the screen for user analytics.

Getting Started
Installation
Requirements
Usage

Getting Started #
Installation #
Add this to dependencies in your pubspec.yaml file.
screen_record_flutter: ^0.0.1+3
copied to clipboard
Requirements #


Add the following in the manifest
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
copied to clipboard


Usage: #
Import package,
import ‘package: screen_record_flutter/screen_record_flutter.dart’
copied to clipboard


To start the record :
void startRecording() async {
final dir = '${(await _getSavedDir())}';
await Directory(dir).create(recursive: true);
final stem =
'$dir/${DateTime.now().toIso8601String().replaceAll(".", "").replaceAll(":", "")}';
pathData = '$stem.mp4';
meta = '$stem.meta';
log('RECORDED VIDEO PATH = $pathData');
await _recorder
.start(
pathVideo: pathData,
pathMetadata: meta,
)
.then((value) {
log("RECORDING STARTED");
});
}
copied to clipboard


To stop the record :
Automatically video will be saved, once we invoke this method.
void stopRecording() {
_recorder.stop().then((value) {
log("RECORDING STOPPED");
});
}
copied to clipboard


To record a particular widget :
Wrap that widget with ScreenRecordWidget, then we can invoke the above methods to record the videos.


To play the videos inside the app :
ScreenRecordPlayerWidget. we can use this widget to play the video inside the app.


NOTE :
Once app goes background without invoke stop method, videos will not be saved,
to rectify the issue we can use flutter_fgbg package to know the state off the application.
for more info refer the example tab.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.