mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 09:39:12 +08:00
Linting
This commit is contained in:
@ -13,11 +13,11 @@ void main() async {
|
|||||||
await Flame.images.load('buttons.png');
|
await Flame.images.load('buttons.png');
|
||||||
|
|
||||||
final _buttons = SpriteSheet(
|
final _buttons = SpriteSheet(
|
||||||
imageName: 'buttons.png',
|
imageName: 'buttons.png',
|
||||||
textureHeight: 20,
|
textureHeight: 20,
|
||||||
textureWidth: 60,
|
textureWidth: 60,
|
||||||
columns: 1,
|
columns: 1,
|
||||||
rows: 2,
|
rows: 2,
|
||||||
);
|
);
|
||||||
|
|
||||||
final dashbook = Dashbook();
|
final dashbook = Dashbook();
|
||||||
@ -45,18 +45,18 @@ void main() async {
|
|||||||
dashbook.storiesOf('SpriteButton').decorator(CenterDecorator()).add(
|
dashbook.storiesOf('SpriteButton').decorator(CenterDecorator()).add(
|
||||||
'default',
|
'default',
|
||||||
(ctx) => Container(
|
(ctx) => Container(
|
||||||
padding: const EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
child: SpriteButton(
|
child: SpriteButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
print('Pressed');
|
print('Pressed');
|
||||||
},
|
},
|
||||||
label: const Text(
|
label: const Text(
|
||||||
'Sprite Button',
|
'Sprite Button',
|
||||||
style: const TextStyle(color: const Color(0xFF5D275D)),
|
style: const TextStyle(color: const Color(0xFF5D275D)),
|
||||||
),
|
|
||||||
sprite: _buttons.getSprite(0, 0),
|
|
||||||
pressedSprite: _buttons.getSprite(1, 0),
|
|
||||||
),
|
),
|
||||||
|
sprite: _buttons.getSprite(0, 0),
|
||||||
|
pressedSprite: _buttons.getSprite(1, 0),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user