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.

44 lines
1.1 KiB

2 years ago
  1. import 'package:flutter/material.dart';
  2. import 'package:my_flutter_puzzle/res/palette.dart';
  3. import 'package:my_flutter_puzzle/screens/puzzle_solo_screen.dart';
  4. class SoloButton extends StatelessWidget {
  5. const SoloButton({
  6. Key? key,
  7. }) : super(key: key);
  8. @override
  9. Widget build(BuildContext context) {
  10. return SizedBox(
  11. width: double.maxFinite,
  12. child: OutlinedButton(
  13. style: OutlinedButton.styleFrom(
  14. primary: Palette.violet,
  15. onSurface: Palette.violet,
  16. shape: RoundedRectangleBorder(
  17. borderRadius: BorderRadius.circular(50),
  18. ),
  19. side: const BorderSide(
  20. width: 2,
  21. color: Palette.violet,
  22. ),
  23. ),
  24. onPressed: () {
  25. Navigator.of(context).pushAndRemoveUntil(
  26. MaterialPageRoute(
  27. builder: (context) => const PuzzleSoloScreen(),
  28. ),
  29. (route) => false,
  30. );
  31. },
  32. child: const Padding(
  33. padding: EdgeInsets.all(16.0),
  34. child: Text(
  35. 'Solo',
  36. style: TextStyle(fontSize: 22),
  37. ),
  38. ),
  39. ),
  40. );
  41. }
  42. }