Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Widget build(BuildContext context) {
- return Scaffold(
- body: Center(
- child: ElevatedButton(
- onPressed: () {
- Navigator.push(
- context,
- MaterialPageRoute(builder: (context) => ChangePWD()),
- );
- },
- child: const Text('Change password'),
- ),
- ),
- floatingActionButton: SpeedDial(
- icon: Icons.settings,
- backgroundColor: Colors.amber,
- children: [
- SpeedDialChild(
- child: const Icon(Icons.help),
- label: 'Help',
- backgroundColor: Colors.amberAccent,
- onTap: () {},
- ),
- SpeedDialChild(
- child: const Icon(Icons.photo_camera),
- label: 'Activate/Deactivate: Take Photo',
- backgroundColor: fun.switchSendPhoto == true
- ? const Color.fromARGB(255, 109, 255, 64)
- : const Color.fromARGB(255, 255, 64, 64),
- onTap: () {
- setState(() {
- fun.switchTakePhoto = !fun.switchTakePhoto;
- });
- },
- ),
- SpeedDialChild(
- child: const Icon(Icons.send),
- label: 'Activate/Deactivate: Send Photo',
- backgroundColor: fun.switchSendPhoto
- ? const Color.fromARGB(255, 109, 255, 64)
- : const Color.fromARGB(255, 255, 64, 64),
- onTap: () {
- fun.switchSendPhoto = !fun.switchSendPhoto;
- },
- ),
- SpeedDialChild(
- child: const Icon(Icons.record_voice_over),
- label: 'Activate/Deactivate: Record Audio',
- backgroundColor: fun.switchSendPhoto
- ? const Color.fromARGB(255, 109, 255, 64)
- : const Color.fromARGB(255, 255, 64, 64),
- onTap: () {
- fun.switchRec = !fun.switchRec;
- },
- ),
- SpeedDialChild(
- child: const Icon(Icons.play_circle),
- label: 'Activate/Deactivate: Play Audio',
- backgroundColor: fun.switchSendPhoto
- ? const Color.fromARGB(255, 109, 255, 64)
- : const Color.fromARGB(255, 255, 64, 64),
- onTap: () {
- fun.switchPlay = !fun.switchPlay;
- },
- ),
- SpeedDialChild(
- child: const Icon(Icons.notifications),
- label: 'Activate/Deactivate: Notifications',
- backgroundColor: fun.switchSendPhoto
- ? const Color.fromARGB(255, 109, 255, 64)
- : const Color.fromARGB(255, 255, 64, 64),
- onTap: () {
- fun.switchNotifications = !fun.switchNotifications;
- },
- ),
- ]),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement