flame_component_screenshot 1.0.0
flame_component_screenshot: ^1.0.0 copied to clipboard
A utility to render and capture Flame components as images or PNG files for use in Flutter apps or local storage.
flame_component_screenshot #
A Flutter + Flame utility package to render any Flame PositionComponent to an Image, PNG bytes, or local file path.
Features #
- Render Flame components offscreen
- Capture as
ui.Image,Uint8List, FlutterImage.memory, or PNG to disk - Custom background color, pixel ratio, and Flutter image options
Installation #
dependencies:
flame_component_screenshot: ^1.0.0
final uiImage = await FlameComponentScreenshot.renderToImage(
component: myComponent,
size: Vector2(300, 300),
);