You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.5 KiB

2 years ago
  1. // import 'package:flutter/material.dart';
  2. // import 'package:flutter_riverpod/flutter_riverpod.dart';
  3. // import 'package:my_flutter_puzzle/application/states/anonymous_auth_state.dart';
  4. // import 'package:my_flutter_puzzle/providers.dart';
  5. // import 'package:my_flutter_puzzle/res/palette.dart';
  6. // import 'package:my_flutter_puzzle/screens/menu_screen.dart';
  7. // import 'package:my_flutter_puzzle/screens/puzzle_screen.dart';
  8. // import 'package:my_flutter_puzzle/widgets/login_widgets/start_game_widget/start_game_button.dart';
  9. // class StartGameWidget extends ConsumerWidget {
  10. // const StartGameWidget({
  11. // Key? key,
  12. // required String nameString,
  13. // }) : _nameString = nameString,
  14. // super(key: key);
  15. // final String _nameString;
  16. // @override
  17. // Widget build(BuildContext context, WidgetRef ref) {
  18. // ref.listen(anonymousAuthNotificationProvider, (previous, next) {
  19. // if (next is StorageDone) {
  20. // Navigator.of(context).pushAndRemoveUntil(
  21. // MaterialPageRoute(
  22. // builder: (context) => MenuScreen(
  23. // userData: next.userData,
  24. // ),
  25. // ),
  26. // (route) => false,
  27. // );
  28. // }
  29. // });
  30. // return Consumer(
  31. // builder: (context, ref, child) {
  32. // final state = ref.watch(anonymousAuthNotificationProvider);
  33. // return state.when(
  34. // () => StartGameButton(
  35. // nameString: _nameString,
  36. // ),
  37. // processing: () => const CircularProgressIndicator(
  38. // valueColor: AlwaysStoppedAnimation<Color>(Palette.violet),
  39. // ),
  40. // done: (_) => const CircularProgressIndicator(
  41. // valueColor: AlwaysStoppedAnimation<Color>(Palette.violet),
  42. // ),
  43. // storingInfo: () => const CircularProgressIndicator(
  44. // valueColor: AlwaysStoppedAnimation<Color>(Palette.violet),
  45. // ),
  46. // storageDone: (userData) => const Icon(
  47. // Icons.check,
  48. // size: 50,
  49. // color: Palette.violet,
  50. // ),
  51. // // done: (_) => const Icon(
  52. // // Icons.check,
  53. // // size: 50,
  54. // // color: Palette.violet,
  55. // // ),
  56. // error: (message) => Column(
  57. // children: [
  58. // Text('$message'),
  59. // const SizedBox(height: 16),
  60. // StartGameButton(nameString: _nameString),
  61. // ],
  62. // ),
  63. // );
  64. // },
  65. // );
  66. // }
  67. // }