|
|
@ -1,7 +1,5 @@
|
|
|
|
// ignore_for_file: public_member_api_docs
|
|
|
|
// ignore_for_file: public_member_api_docs
|
|
|
|
|
|
|
|
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
import 'package:pinball/l10n/l10n.dart';
|
|
|
|
import 'package:pinball/l10n/l10n.dart';
|
|
|
@ -48,34 +46,19 @@ class CharacterSelectionView extends StatelessWidget {
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
TextButton(
|
|
|
|
TextButton(
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
late Timer timer;
|
|
|
|
|
|
|
|
// TODO(arturplaczek): remove after merge StarBlocListener
|
|
|
|
// TODO(arturplaczek): remove after merge StarBlocListener
|
|
|
|
final height = MediaQuery.of(context).size.height * 0.5;
|
|
|
|
final height = MediaQuery.of(context).size.height * 0.5;
|
|
|
|
|
|
|
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
showDialog<void>(
|
|
|
|
showDialog<void>(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder: (context) {
|
|
|
|
builder: (context) => Center(
|
|
|
|
timer = Timer(
|
|
|
|
child: SizedBox(
|
|
|
|
const Duration(seconds: 3),
|
|
|
|
height: height,
|
|
|
|
() {
|
|
|
|
width: height * 1.4,
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
child: const HowToPlayDialog(),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
);
|
|
|
|
),
|
|
|
|
return Center(
|
|
|
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
|
|
|
height: height,
|
|
|
|
|
|
|
|
width: height * 1.4,
|
|
|
|
|
|
|
|
child: const HowToPlayDialog(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
).then(
|
|
|
|
|
|
|
|
(_) {
|
|
|
|
|
|
|
|
if (timer.isActive) {
|
|
|
|
|
|
|
|
timer.cancel();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Text(l10n.start),
|
|
|
|
child: Text(l10n.start),
|
|
|
|