Issue I have many Activities which raise background tasks; the Activities will pass themselves in as having implemented a listener callback, so that the background tasks can raise an event on the Activities. The Activities in turn can show something
Continue readingTag: callback
Completion Handler Android Kotlin
Issue I’m sorry if this question has been asked previously, I really couldn’t find anything even similar! I’m also sorry if the question is dumb, I’m an iOS Developer and I’m a bit lost here in Android… So I’m using
Continue readingflutter provider ChangeNotifier class with a call-back function not working
Issue I’m using provider and my code looks like this. class AbcClass with ChangeNotifier { String abc1=’111′; String abc2=’222′; List<void Function(String)> get abcInputs { return [ (newValue) => () { abc1 = newValue; notifyListeners(); }, (newValue) => () { abc2
Continue readingHow to Trigger Callbacks on Flutter Bottom Navigation Bar Page Changes with Stateful Pages: Implementing Callbacks Between Two Classes
Issue I have a flutter application with a bottom navigation bar that keeps page states in the navigation (I use go_router). I’ve been trying for a long time to get a callback on my fav page as soon as I
Continue readingHow to create an async callback in Flutter/Dart?
Issue I’m trying to add an async callback to a model in a flutter application so the model can give the view an opportunity to show some dialog before the model continues on. However, I can’t seem to find an
Continue readingWhy is BluetoothLEScanner not calling its ScanCallback
Issue I’m trying to implement a BLE scanner right now in a bare bones android app. I have been following: startLeScan replacement to current api and https://developer.android.com/guide/topics/connectivity/bluetooth-le Unfortunately, the callback functions from my BLEScanCallback class don’t seem to be getting
Continue readingcallback function for navigation in Flutter
Issue In Navigator, we can use .then. for eg: Navigator.push( context, MaterialPageRoute( builder: (context) => XyzScreen(), ), ).then((value) => _someFuncion()); so is there any way to implement the same in go_router? Solution see https://github.com/flutter/flutter/issues/99663 and It seems like as a
Continue readingHow to get Future callback in Flutter
Issue Good day. I am a flutter beginner and now do some simple pratice. I want: Press a button and call login api, if api response is success then go to main page. but I don’t know how to get
Continue readingPass either a widget or a callback to button
Issue I’m trying to make a custom ElevatedButton widget whose constructor will receive one of two options: either a new page to push into the Navigator (my custom StatefulWidget), or a callback method to override the button’s onPressed entirely. I
Continue readingHow to make a callback between Activity and Fragment?
Issue I have this interface in my activity. public interface LogoutUser { void logout(); } My fragment implements this interface, so in my fragment, I have this: @Override public void logout() { // logout } In my activity I call
Continue reading