report static method
Returns a report of the technical information and Logs.
Implementation
static String report({
List<RxSession>? sessions,
SessionId? sessionId,
String? userAgent,
MyUser? myUser,
DeviceToken? token,
bool? pushNotifications,
}) {
final Session? session = sessions
?.firstWhereOrNull((e) => e.session.value.id == sessionId)
?.session
.value;
return '''
================ Report ================
Created at: ${DateTime.now().toUtc()}
Application: ${Pubspec.ref}
User-Agent: $userAgent
Is PWA: ${CustomSafeArea.isPwa}
MyUser:
${myUser?.toJson()}
SessionId:
$sessionId
Session:
${session?.toJson()}
Push Notifications are considered active:
$pushNotifications
Token:
$token
================= Logs =================
${Log.logs.map((e) => '[${e.at.toUtc().toStamp}] [${e.level.name}] ${e.text}').join('\n')}
========================================
''';
}