Files
Erick a3f1601db8 feat: Adding ImageExtension.resize (#2418)
Adds a helper method to ImageExtension to make it easier to resize an image.
2023-03-31 11:39:08 +00:00

24 lines
630 B
Dart

import 'package:dashbook/dashbook.dart';
import 'package:examples/commons/commons.dart';
import 'package:examples/stories/image/resize.dart';
import 'package:flame/game.dart';
void addImageStories(Dashbook dashbook) {
dashbook.storiesOf('Image')
..decorator(CenterDecorator())
..add(
'resize',
(context) => GameWidget(
game: ImageResizeExample(
Vector2(
context.numberProperty('width', 200),
context.numberProperty('height', 300),
),
),
),
codeLink: baseLink('image/resize.dart'),
info: ImageResizeExample.description,
);
}