match_magic/lib/widgets/overlays/game_overlay/hint_button.dart

27 lines
637 B
Dart
Raw Permalink Normal View History

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:match_magic/game/board.dart';
class HintButton extends StatelessWidget {
final Board gameRef;
static const String id = 'HintButton';
const HintButton({Key? key, required this.gameRef}) : super(key: key);
@override
Widget build(BuildContext context) {
return Positioned(
bottom: 46,
left: 220,
child: ElevatedButton(
onPressed: () {
gameRef.showHint();
},
child: const Text(
'Hint',
style: TextStyle(color: Colors.black),
),
),
);
}
}