chore: Update flutter_matrix_html
This commit is contained in:
parent
7876164dfc
commit
4981cf4295
|
@ -33,6 +33,8 @@ class HtmlMessage extends StatelessWidget {
|
|||
|
||||
// there is no need to pre-validate the html, as we validate it while rendering
|
||||
|
||||
final matrix = Matrix.of(context);
|
||||
|
||||
final themeData = Theme.of(context);
|
||||
return Html(
|
||||
data: renderHtml,
|
||||
|
@ -50,12 +52,18 @@ class HtmlMessage extends StatelessWidget {
|
|||
getMxcUrl: (String mxc, double width, double height) {
|
||||
final ratio = MediaQuery.of(context).devicePixelRatio;
|
||||
return Uri.parse(mxc)?.getThumbnail(
|
||||
Matrix.of(context).client,
|
||||
matrix.client,
|
||||
width: (width ?? 800) * ratio,
|
||||
height: (height ?? 800) * ratio,
|
||||
method: ThumbnailMethod.scale,
|
||||
);
|
||||
},
|
||||
setCodeLanguage: (String key, String value) async {
|
||||
await matrix.store.setItem('code_language.$key', value);
|
||||
},
|
||||
getCodeLanguage: (String key) async {
|
||||
return await matrix.store.getItem('code_language.$key');
|
||||
},
|
||||
getPillInfo: (String identifier) async {
|
||||
if (room == null) {
|
||||
return null;
|
||||
|
|
|
@ -62,7 +62,7 @@ class Store {
|
|||
if (!PlatformInfos.isMobile) {
|
||||
await _setupLocalStorage();
|
||||
try {
|
||||
return await storage.getItem(key).toString();
|
||||
return await storage.getItem(key)?.toString();
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
|
|
18
pubspec.lock
18
pubspec.lock
|
@ -309,6 +309,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
flutter_highlight:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_highlight
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.0"
|
||||
flutter_keyboard_visibility:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -348,7 +355,7 @@ packages:
|
|||
name: flutter_matrix_html
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.9"
|
||||
version: "0.1.10"
|
||||
flutter_olm:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -408,6 +415,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
highlight:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: highlight
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.0"
|
||||
html:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -540,7 +554,7 @@ packages:
|
|||
name: matrix_link_text
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.1"
|
||||
version: "0.3.2"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -37,7 +37,7 @@ dependencies:
|
|||
firebase_messaging: ^7.0.2
|
||||
flutter_local_notifications: ^1.4.3
|
||||
# desktop_notifications: ^0.0.0-dev.4 // Currently blocked by: https://github.com/canonical/desktop_notifications.dart/issues/5
|
||||
matrix_link_text: ^0.3.1
|
||||
matrix_link_text: ^0.3.2
|
||||
path_provider: ^1.5.1
|
||||
downloads_path_provider_28: ^0.1.0
|
||||
permission_handler: ^5.0.1+1
|
||||
|
@ -53,7 +53,7 @@ dependencies:
|
|||
open_file: ^3.0.1
|
||||
mime_type: ^0.3.0
|
||||
bot_toast: ^3.0.0
|
||||
flutter_matrix_html: ^0.1.9
|
||||
flutter_matrix_html: ^0.1.10
|
||||
moor: ^3.3.1
|
||||
sqlite3_flutter_libs: ^0.2.0
|
||||
sqlite3: ^0.1.4
|
||||
|
|
Loading…
Reference in a new issue