Browse Source

修复路径错误

liuyuqi-dellpc 1 year ago
parent
commit
3fae2fc055
3 changed files with 5 additions and 3 deletions
  1. 1 1
      .gitignore
  2. 1 1
      lib/screen/home/home.dart
  3. 3 1
      pubspec.yaml

+ 1 - 1
.gitignore

@@ -42,4 +42,4 @@ app.*.map.json
 /android/app/debug
 /android/app/profile
 /android/app/release
-0/0.tflite
+/files/0.tflite

+ 1 - 1
lib/screen/home/home.dart

@@ -26,7 +26,7 @@ class _HomeScreenState extends State<HomeScreen> {
       mode: DetectionMode.stream,
       multipleObjects: false,
       classifyObjects: false,
-      modelPath: 'flutter_assets/0/0.tflite',
+      modelPath: 'flutter_assets/files/0.tflite',
     ),
   );
   final TextRecognizer _textDetector = TextRecognizer(

+ 3 - 1
pubspec.yaml

@@ -20,4 +20,6 @@ dev_dependencies:
 
   flutter_lints: ^2.0.0
 flutter:
-  uses-material-design: true
+  uses-material-design: true
+  assets:
+    - files/