Advertisement
Guest User

Untitled

a guest
Aug 6th, 2022
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. Widget build(BuildContext context) {
  2. return Scaffold(
  3. body: Center(
  4. child: ElevatedButton(
  5. onPressed: () {
  6. Navigator.push(
  7. context,
  8. MaterialPageRoute(builder: (context) => ChangePWD()),
  9. );
  10. },
  11. child: const Text('Change password'),
  12. ),
  13. ),
  14. floatingActionButton: SpeedDial(
  15. icon: Icons.settings,
  16. backgroundColor: Colors.amber,
  17. children: [
  18. SpeedDialChild(
  19. child: const Icon(Icons.help),
  20. label: 'Help',
  21. backgroundColor: Colors.amberAccent,
  22. onTap: () {},
  23. ),
  24. SpeedDialChild(
  25. child: const Icon(Icons.photo_camera),
  26. label: 'Activate/Deactivate: Take Photo',
  27. backgroundColor: fun.switchSendPhoto == true
  28. ? const Color.fromARGB(255, 109, 255, 64)
  29. : const Color.fromARGB(255, 255, 64, 64),
  30. onTap: () {
  31. setState(() {
  32. fun.switchTakePhoto = !fun.switchTakePhoto;
  33. });
  34. },
  35. ),
  36. SpeedDialChild(
  37. child: const Icon(Icons.send),
  38. label: 'Activate/Deactivate: Send Photo',
  39. backgroundColor: fun.switchSendPhoto
  40. ? const Color.fromARGB(255, 109, 255, 64)
  41. : const Color.fromARGB(255, 255, 64, 64),
  42. onTap: () {
  43. fun.switchSendPhoto = !fun.switchSendPhoto;
  44. },
  45. ),
  46. SpeedDialChild(
  47. child: const Icon(Icons.record_voice_over),
  48. label: 'Activate/Deactivate: Record Audio',
  49. backgroundColor: fun.switchSendPhoto
  50. ? const Color.fromARGB(255, 109, 255, 64)
  51. : const Color.fromARGB(255, 255, 64, 64),
  52. onTap: () {
  53. fun.switchRec = !fun.switchRec;
  54. },
  55. ),
  56. SpeedDialChild(
  57. child: const Icon(Icons.play_circle),
  58. label: 'Activate/Deactivate: Play Audio',
  59. backgroundColor: fun.switchSendPhoto
  60. ? const Color.fromARGB(255, 109, 255, 64)
  61. : const Color.fromARGB(255, 255, 64, 64),
  62. onTap: () {
  63. fun.switchPlay = !fun.switchPlay;
  64. },
  65. ),
  66. SpeedDialChild(
  67. child: const Icon(Icons.notifications),
  68. label: 'Activate/Deactivate: Notifications',
  69. backgroundColor: fun.switchSendPhoto
  70. ? const Color.fromARGB(255, 109, 255, 64)
  71. : const Color.fromARGB(255, 255, 64, 64),
  72. onTap: () {
  73. fun.switchNotifications = !fun.switchNotifications;
  74. },
  75. ),
  76. ]),
  77. );
  78. }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement