浏览代码

replace rootbundle

Melon 1 年之前
父节点
当前提交
0102d0cbd9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/view/3d_view/measure_3d_view.dart

+ 1 - 1
lib/view/3d_view/measure_3d_view.dart

@@ -46,7 +46,7 @@ class _Measure3DViewState extends State<Measure3DView> {
 
   Future<String> _loadHTMLFromAssets(String path) async {
     try {
-      return await rootBundle.loadString(path);
+      return await DefaultAssetBundle.of(context).loadString(path);
     } catch (e) {
       return Future.error(e);
     }