getSession method

  1. @override
Future<Session?> getSession()
override

Implementation

@override
Future<Session?> getSession() {
  return SharedPreferences.getInstance().then((prefs) {
    var sesString = prefs.getString( getObjectKey("Session") );
    Session? session;
    if (sesString != null) {
      session = Session(json: jsonDecode(sesString));
    }
    return session;
  });
}