Kivymd speed dial button callback doesn't work

Viewed 16

I'm using kivymd version 1.1.0dev0, and I just want the stack button to be able to call a distinct function for each of them, I've tried the correct way that supposed to work but not for me. I tried on version 1.0.2 and it worked, but unfortunately style theme M3 is unusable.

from kivy.lang import Builder
from kivymd.app import MDApp

screen = '''
Screen: 

    MDFloatingActionButtonSpeedDial:
        data:app.data
        callback: app.callback 
'''


class testApp(MDApp):
    data = {
        'register': 'key', 
        }

    def callback(self, instance):
        if instance.icon == 'key':
            print('Callback self.key()')

    def build(self):
        return Builder.load_string(screen)

testApp().run()
0 Answers
Related