I have a question,
I am developing an application using flutter, and inside the pubspec.yaml file I have included the assets directory. However, this directory only works on my PC. Say, when im opening a file I use the directory File("assets/data.txt"). But when I run the application e.g. on my phone, it doesn't run the same way. Can anyone help me with that?
Thanks a lot
Edit: pubspec.yaml file:
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ">=2.17.6 <3.0.0"
dependencies:
intl: ^0.17.0
flutter:
sdk: flutter
path_provider: ^1.6.27
cupertino_icons: ^1.0.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter:
uses-material-design: true
assets:
- assets/logo.png
- assets/states.txt
- assets/states1.txt