I spent today trying to find any way in FlutterFlow to hold onto reference to a non-native object (such as a Flutter Blue Plus BluetoothDevice object). So that I can do things like create a device and connect to it. Then in another custom action, do something else with the device (disconnect it, say, or cancel subscriptions, or close down unneeded listeners).
I see no way to create a global, or get around that limitation. Such as: No way to create a custom class that is a singleton to hold states. App states can't hold references to objects. Jsons won't give you back an object -- just at most allow you to create a new object with some fields filled in (not all the subscriptions and listeners attached). You can't create a custom file to define your own class. You can't edit main.dart. You can't use the function where you can call an action in main.dart to do it because that doesn't hold onto globals, it seems.
Without ability to hold onto references to objects, the whole framework is so highly restrictive it seems like it is unusable for a lot of app development.
Am I missing something?