TF-2537 Fix app crash when user trying attach file to composer in web app

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2024-02-21 08:31:40 +07:00
committed by Dat H. Pham
parent 20fe348672
commit 7e96d09f52
9 changed files with 96 additions and 52 deletions
@@ -0,0 +1 @@
export 'canvas_kit_stub.dart' if (dart.library.html) 'canvas_kit_web.dart';
@@ -0,0 +1,4 @@
/// Whether the CanvasKit renderer is being used on web.
///
/// Always returns `false` on non-web.
bool get isRendererCanvasKit => false;
@@ -0,0 +1,6 @@
import 'dart:js' as js;
/// Whether the CanvasKit renderer is being used on web.
///
/// Always returns `false` on non-web.
bool get isRendererCanvasKit => js.context['flutterCanvasKit'] != null;