Store object as app state variable

Custom Code

Hi,

I'm using a third party package that provides a client object. This object opens a long-running connection to a service, stores state, and provides functions to access the service's APIs.

I need to access the same instance of this object throughout my custom actions and widgets.

Does anybody know how to instantiate this object once and then store it such that it is globally available?

Thanks!

What have you tried so far?

I tried using data types, but they only support primitive types for fields

Did you check FlutterFlow's Documentation for this topic?
Yes
4
10 replies