saveSession method

Future<void> saveSession(
  1. Session session
)

Implementation

Future<void> saveSession(Session session) async {
  // Create the parent directory if it doesn't exist
  await tokenFile.parent.create(recursive: true);
  await tokenFile.writeAsString(
    jsonEncode(session.toJson()),
  );
}