chore: upgrade lints
This commit is contained in:
parent
23776e53ad
commit
82492f92e1
|
|
@ -1205,8 +1205,7 @@ const knownHashes = ['sha256'];
|
||||||
const knownHashesAuthentificationCodes = ['hkdf-hmac-sha256'];
|
const knownHashesAuthentificationCodes = ['hkdf-hmac-sha256'];
|
||||||
|
|
||||||
class _KeyVerificationMethodSas extends _KeyVerificationMethod {
|
class _KeyVerificationMethodSas extends _KeyVerificationMethod {
|
||||||
_KeyVerificationMethodSas({required KeyVerification request})
|
_KeyVerificationMethodSas({required super.request});
|
||||||
: super(request: request);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
// ignore: overridden_fields
|
// ignore: overridden_fields
|
||||||
|
|
|
||||||
|
|
@ -79,10 +79,10 @@ class Event extends MatrixEvent {
|
||||||
|
|
||||||
Event({
|
Event({
|
||||||
this.status = defaultStatus,
|
this.status = defaultStatus,
|
||||||
required Map<String, dynamic> content,
|
required Map<String, dynamic> super.content,
|
||||||
required String type,
|
required super.type,
|
||||||
required String eventId,
|
required String eventId,
|
||||||
required String senderId,
|
required super.senderId,
|
||||||
required DateTime originServerTs,
|
required DateTime originServerTs,
|
||||||
Map<String, dynamic>? unsigned,
|
Map<String, dynamic>? unsigned,
|
||||||
Map<String, dynamic>? prevContent,
|
Map<String, dynamic>? prevContent,
|
||||||
|
|
@ -91,10 +91,7 @@ class Event extends MatrixEvent {
|
||||||
MatrixEvent? originalSource,
|
MatrixEvent? originalSource,
|
||||||
}) : _originalSource = originalSource,
|
}) : _originalSource = originalSource,
|
||||||
super(
|
super(
|
||||||
content: content,
|
|
||||||
type: type,
|
|
||||||
eventId: eventId,
|
eventId: eventId,
|
||||||
senderId: senderId,
|
|
||||||
originServerTs: originServerTs,
|
originServerTs: originServerTs,
|
||||||
roomId: room.id,
|
roomId: room.id,
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
|
|
@ -1381,7 +1381,7 @@ class Room {
|
||||||
);
|
);
|
||||||
|
|
||||||
final events = [
|
final events = [
|
||||||
if (resp.eventsAfter != null) ...resp.eventsAfter!.reversed.toList(),
|
if (resp.eventsAfter != null) ...resp.eventsAfter!.reversed,
|
||||||
if (resp.event != null) resp.event!,
|
if (resp.event != null) resp.event!,
|
||||||
if (resp.eventsBefore != null) ...resp.eventsBefore!
|
if (resp.eventsBefore != null) ...resp.eventsBefore!
|
||||||
].map((e) => Event.fromMatrixEvent(e, this)).toList();
|
].map((e) => Event.fromMatrixEvent(e, this)).toList();
|
||||||
|
|
|
||||||
|
|
@ -43,25 +43,17 @@ class User extends Event {
|
||||||
}
|
}
|
||||||
|
|
||||||
User.fromState({
|
User.fromState({
|
||||||
Map<String, dynamic>? prevContent,
|
super.prevContent,
|
||||||
required String stateKey,
|
required String super.stateKey,
|
||||||
Map<String, dynamic> content = const {},
|
super.content = const {},
|
||||||
required String typeKey,
|
required String typeKey,
|
||||||
required String eventId,
|
required super.eventId,
|
||||||
required String senderId,
|
required super.senderId,
|
||||||
required DateTime originServerTs,
|
required super.originServerTs,
|
||||||
dynamic unsigned,
|
super.unsigned,
|
||||||
required Room room,
|
required super.room,
|
||||||
}) : super(
|
}) : super(
|
||||||
stateKey: stateKey,
|
|
||||||
prevContent: prevContent,
|
|
||||||
content: content,
|
|
||||||
type: typeKey,
|
type: typeKey,
|
||||||
eventId: eventId,
|
|
||||||
senderId: senderId,
|
|
||||||
originServerTs: originServerTs,
|
|
||||||
unsigned: unsigned,
|
|
||||||
room: room,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/// The full qualified Matrix ID in the format @username:server.abc.
|
/// The full qualified Matrix ID in the format @username:server.abc.
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,8 @@ class SimpleSignableKey extends MatrixSignableKey {
|
||||||
@override
|
@override
|
||||||
String? identifier;
|
String? identifier;
|
||||||
|
|
||||||
SimpleSignableKey.fromJson(Map<String, dynamic> json) : super.fromJson(json);
|
SimpleSignableKey.fromJson(Map<String, dynamic> super.json)
|
||||||
|
: super.fromJson();
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class SignableKey extends MatrixSignableKey {
|
abstract class SignableKey extends MatrixSignableKey {
|
||||||
|
|
@ -166,8 +167,8 @@ abstract class SignableKey extends MatrixSignableKey {
|
||||||
bool get crossVerified => hasValidSignatureChain();
|
bool get crossVerified => hasValidSignatureChain();
|
||||||
bool get signed => hasValidSignatureChain(verifiedOnly: false);
|
bool get signed => hasValidSignatureChain(verifiedOnly: false);
|
||||||
|
|
||||||
SignableKey.fromJson(Map<String, dynamic> json, this.client)
|
SignableKey.fromJson(Map<String, dynamic> super.json, this.client)
|
||||||
: super.fromJson(json) {
|
: super.fromJson() {
|
||||||
_verified = false;
|
_verified = false;
|
||||||
_blocked = false;
|
_blocked = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ abstract class TimeoutHttpClient extends http.BaseClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
class FixedTimeoutHttpClient extends TimeoutHttpClient {
|
class FixedTimeoutHttpClient extends TimeoutHttpClient {
|
||||||
FixedTimeoutHttpClient(http.Client inner, this.timeout) : super(inner);
|
FixedTimeoutHttpClient(super.inner, this.timeout);
|
||||||
@override
|
@override
|
||||||
Duration timeout;
|
Duration timeout;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/// Workaround until [File] in dart:io and dart:html is unified
|
/// Workaround until [File] in dart:io and dart:html is unified
|
||||||
|
library;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
@ -91,15 +92,14 @@ class MatrixFile {
|
||||||
|
|
||||||
class MatrixImageFile extends MatrixFile {
|
class MatrixImageFile extends MatrixFile {
|
||||||
MatrixImageFile({
|
MatrixImageFile({
|
||||||
required Uint8List bytes,
|
required super.bytes,
|
||||||
required String name,
|
required super.name,
|
||||||
String? mimeType,
|
super.mimeType,
|
||||||
int? width,
|
int? width,
|
||||||
int? height,
|
int? height,
|
||||||
this.blurhash,
|
this.blurhash,
|
||||||
}) : _width = width,
|
}) : _width = width,
|
||||||
_height = height,
|
_height = height;
|
||||||
super(bytes: bytes, name: name, mimeType: mimeType);
|
|
||||||
|
|
||||||
/// Creates a new image file and calculates the width, height and blurhash.
|
/// Creates a new image file and calculates the width, height and blurhash.
|
||||||
static Future<MatrixImageFile> create({
|
static Future<MatrixImageFile> create({
|
||||||
|
|
@ -355,13 +355,12 @@ class MatrixVideoFile extends MatrixFile {
|
||||||
final int? duration;
|
final int? duration;
|
||||||
|
|
||||||
MatrixVideoFile(
|
MatrixVideoFile(
|
||||||
{required Uint8List bytes,
|
{required super.bytes,
|
||||||
required String name,
|
required super.name,
|
||||||
String? mimeType,
|
super.mimeType,
|
||||||
this.width,
|
this.width,
|
||||||
this.height,
|
this.height,
|
||||||
this.duration})
|
this.duration});
|
||||||
: super(bytes: bytes, name: name, mimeType: mimeType);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get msgType => 'm.video';
|
String get msgType => 'm.video';
|
||||||
|
|
@ -379,11 +378,10 @@ class MatrixAudioFile extends MatrixFile {
|
||||||
final int? duration;
|
final int? duration;
|
||||||
|
|
||||||
MatrixAudioFile(
|
MatrixAudioFile(
|
||||||
{required Uint8List bytes,
|
{required super.bytes,
|
||||||
required String name,
|
required super.name,
|
||||||
String? mimeType,
|
super.mimeType,
|
||||||
this.duration})
|
this.duration});
|
||||||
: super(bytes: bytes, name: name, mimeType: mimeType);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get msgType => 'm.audio';
|
String get msgType => 'm.audio';
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,10 @@ class ToDeviceEvent extends BasicEventWithSender {
|
||||||
|
|
||||||
ToDeviceEvent({
|
ToDeviceEvent({
|
||||||
required String sender,
|
required String sender,
|
||||||
required String type,
|
required super.type,
|
||||||
required Map<String, dynamic> content,
|
required Map<String, dynamic> super.content,
|
||||||
this.encryptedContent,
|
this.encryptedContent,
|
||||||
}) : super(senderId: sender, type: type, content: content);
|
}) : super(senderId: sender);
|
||||||
|
|
||||||
factory ToDeviceEvent.fromJson(Map<String, dynamic> json) {
|
factory ToDeviceEvent.fromJson(Map<String, dynamic> json) {
|
||||||
final event = BasicEventWithSender.fromJson(json);
|
final event = BasicEventWithSender.fromJson(json);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ dev_dependencies:
|
||||||
coverage: ">=0.15.0 <2.0.0"
|
coverage: ">=0.15.0 <2.0.0"
|
||||||
file: ^6.1.1
|
file: ^6.1.1
|
||||||
import_sorter: ^4.6.0
|
import_sorter: ^4.6.0
|
||||||
lints: ^2.0.0
|
lints: ^3.0.0
|
||||||
test: ^1.15.7
|
test: ^1.15.7
|
||||||
#flutter_test: {sdk: flutter}
|
#flutter_test: {sdk: flutter}
|
||||||
#dependency_overrides:
|
#dependency_overrides:
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ Uint8List secureRandomBytes(int len) {
|
||||||
}
|
}
|
||||||
|
|
||||||
class MockSSSS extends SSSS {
|
class MockSSSS extends SSSS {
|
||||||
MockSSSS(Encryption encryption) : super(encryption);
|
MockSSSS(super.encryption);
|
||||||
|
|
||||||
bool requestedSecrets = false;
|
bool requestedSecrets = false;
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue