Client constructor
Client({
- required ClientOptions options,
- String overrideSession = "",
the main client object
Implementation
Client({
required ClientOptions options,
String overrideSession = "",
}) {
_clientOptions = options;
Logger.root.level = _clientOptions.logLevel;
Logger.root.onRecord.listen((record) {
// print(
// '${record.time.toString().split(" ")[1].split(".")[0]} [${record.level.name}] ${record.message}');
});
/// initialize http object
http = HTTP(
client: this,
);
/// initialize auth object
auth = FortniteAuth(this);
/// initialize athena object
athena = AthenaProfile(this);
/// initialize common core profile object
commonCore = CommonCoreProfile(this);
/// initialize campaign profile object
campaign = CampaignProfile(this);
if (overrideSession != "") {
session = overrideSession;
}
log(LogLevel.info, "Initialized fortnite client object [$accountId]");
}