Skip to content

Commit 0bf8709

Browse files
committed
fix examples
1 parent 2d7ea3c commit 0bf8709

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

examples/lib/stories/rendering/nine_tile_box_custom_grid_example.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import 'package:flame/components.dart';
22
import 'package:flame/events.dart';
33
import 'package:flame/game.dart';
4-
import 'package:flame/input.dart';
54

65
class NineTileBoxCustomGridExample extends FlameGame
7-
with TapCallbacks, DoubleTapDetector {
6+
with TapCallbacks, DoubleTapCallbacks {
87
static const String description = '''
98
If you want to create a background for something that can stretch you can
109
use the `NineTileBox` which is showcased here. In this example a custom
@@ -41,7 +40,7 @@ class NineTileBoxCustomGridExample extends FlameGame
4140
}
4241

4342
@override
44-
void onDoubleTap() {
43+
void onDoubleTapDown(_) {
4544
nineTileBoxComponent.scale.scale(0.8);
4645
}
4746
}

examples/lib/stories/system/pause_resume_example.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import 'package:flame/components.dart';
22
import 'package:flame/events.dart';
33
import 'package:flame/game.dart';
4-
import 'package:flame/input.dart';
54

65
class PauseResumeExample extends FlameGame
7-
with TapCallbacks, DoubleTapDetector {
6+
with TapCallbacks, DoubleTapCallbacks {
87
static const description = '''
98
Demonstrate how to use the pause and resume engine methods and paused
109
attribute.
@@ -47,7 +46,7 @@ class PauseResumeExample extends FlameGame
4746
}
4847

4948
@override
50-
void onDoubleTap() {
49+
void onDoubleTapDown(_) {
5150
paused = !paused;
5251
}
5352
}

examples/lib/stories/utils/timer_component_example.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:flame/game.dart';
44
import 'package:flutter/material.dart';
55

66
class TimerComponentExample extends FlameGame
7-
with TapCallbacks, DoubleTapDetector {
7+
with TapCallbacks, DoubleTapCallbacks {
88
static const String description = '''
99
This examples showcases the `TimerComponent`.\n\n
1010
Tap to start a timer that lives for one second and double tap to start
@@ -22,7 +22,7 @@ class TimerComponentExample extends FlameGame
2222
}
2323

2424
@override
25-
void onDoubleTap() {
25+
void onDoubleTapDown(_) {
2626
doubleTapComponent?.removeFromParent();
2727
doubleTapComponent = RenderedTimeComponent(5, yOffset: 180);
2828
add(doubleTapComponent!);

0 commit comments

Comments
 (0)