搜索插件、代码仓与 APP 分类

GitHub 代码仓Baseflow/screenrecorder

屏幕录制

一个可用于记录 Flutter widget 的 Flutter 包

屏幕录制 项目封面
星标
77
复刻
35
最近推送(UTC)
2025年11月21日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

pub.dev Sponsoring likes popularity pub points


🚧 This is highly experimental! 🚧

🚧 API is subject to change! 🚧

This is a package to create recordings of Flutter widgets. The recordings can be exported as GIFs.

This is pure Flutter/Dart implementation without any dependencies on native or platform code. Thus it runs on all supported platforms.

Please note, that the encoding of the GIF takes a lot of time. On web it is basically useless because it takes so much time.

🚀 Getting Started

Setup

First, you will need to add screen_recorder to your pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
  screen_recorder: x.y.z # use the latest version found on pub.dev

Then, run flutter packages get in your terminal.

Example

Wrap your widget which should be recorded in a ScreenRecorder:

ScreenRecorder(
  height: 200,
  width: 200,
  background: Colors.white,
  controller: ScreenRecorderController(
    pixelRatio: 0.5,
    skipFramesBetweenCaptures: 2,
  ),
  child: // child which should be recorded
);

Then use ScreenRecorderController.start() to start recording and ScreenRecorderController.stop() to stop the recording. final gif = await ScreenRecorderController.export() gives you the result which can be written to disk.

A complete example can be found here.

⚠️ Known issues and limitations

  • Platform views are invisible in screenshots (like webview or Google Maps). For further details, see this Flutter issue and this issue. Please give a 👍 to those issues in order to raise awareness and the prio of those issues.
  • Web only works with Flutter's CanvasKit Renderer, for more information see Flutter Web Renderer docs.
  • This package does not and will not support audio until it is possible in a pure Dart/Flutter environment.
  • This package does not and will not support exporting as a video until it is possible in a pure Dart/Flutter environment.

Convert gif to video

In order to convert the gif to a video, you can try one of the following libraries. Please note, that compatibility was not tested.

Library Stats
ffmpeg_kit_flutter likes popularity pub points
flutter_video_compress likes popularity pub points
video_editor likes popularity pub points
video_trimmer likes popularity pub points
video_compress likes popularity pub points

📣 About the author

GitHub followers Twitter Follow

Contributors

Baseflow GitHub avatar
GitHub 作者

Baseflow ↗

Engineering the Future of Software development. Together with exceptional people, strategy, and design, we create software for every challenge.

Netherlands官方网站 ↗
语言DartHTMLSwiftKotlinObjective-C

分类

使用的依赖

依赖清单 4 项

  • flutter{"sdk":"flutter"}
  • image^4.2.0
  • flutter_test开发依赖{"sdk":"flutter"}
  • flutter_lints开发依赖>=4.0.0 <6.0.0

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗