From 5b13e0442e40fc53ae8b69edca21c9a636303a8e Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Tue, 7 Sep 2021 14:47:12 +0200 Subject: [PATCH] refactor: Make Uri extension null safe --- lib/src/utils/uri_extension.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/src/utils/uri_extension.dart b/lib/src/utils/uri_extension.dart index e7b151a4..e4d875a4 100644 --- a/lib/src/utils/uri_extension.dart +++ b/lib/src/utils/uri_extension.dart @@ -1,4 +1,3 @@ -// @dart=2.9 /* * Famedly Matrix SDK * Copyright (C) 2019, 2020, 2021 Famedly GmbH @@ -35,10 +34,10 @@ extension MxcUriExtension on Uri { /// If `animated` (default false) is set to true, an animated thumbnail is requested /// as per MSC2705. Thumbnails only animate if the media repository supports that. Uri getThumbnail(Client matrix, - {num width, - num height, - ThumbnailMethod method = ThumbnailMethod.crop, - bool animated = false}) { + {num? width, + num? height, + ThumbnailMethod? method = ThumbnailMethod.crop, + bool? animated = false}) { if (!isScheme('mxc')) return this; if (matrix.homeserver == null) { return Uri();