Problem: Trying to run a Flutter application throws this error:
Error: Member not found: 'packageRoot'. ../…/interface/local_platform.dart:45 String get packageRoot => io.Platform.packageRoot; ^^^^^^^^^^^
Solution: This error is most likely caused by the
platform package not being included in application. To fix this error add the
package: ^3.1.0 line in the
dependencies section of the
dependencies: ... platform: ^3.1.0
Don't forget to run
flutter pub get afterwards!
Thanks for reading this blog post!
If you have any questions or concerns please feel free to post a comment in this post and I will get back to you when I find the time.