Flutter library classes not in readable format

321 Views Asked by At

I am working for a flutter application with android studio ide. I am using a supporting libraries for casting video using dart_chromecast my application. Initially i can see the code implementation of supporting library. Like methods and callbacks.

Problem is: Now due to some changes in my Android studio ide, i am not able to see the code implementation of supporting libraries. Still can navigate to the library classes but the code is not in readable format. I know that clearly, the problem is not because of using supporting library.

Please find the attached screen for the problem. And let me know how to reset my android studio to show the code again.

screen: enter image description here

More information:

Here is the git hub link for one of the problematic file.

https://github.com/terrabythia/dart_chromecast/blob/master/lib/casting/cast_sender.dart

Attached is the screen of problematic file which is not readable through Android studio ide.

enter image description here

2

There are 2 best solutions below

3
Jenea Vranceanu On

Looks like cast_sender.dart is actually a PNG file. Try to change this file extension from dart to png.

Here is an example of PNG file opened as text file:

enter image description here

0
Raghu Mudem On

After so much research on my problem, i have identified the solution. Posting this information to help other with this kind of rare scenario.

Root cause: Identified a folder with the name .pub_cache under flutter sdk folder.(path_to_flutter_sdk/flutter/.pub_cache)

Solution: 1. Closed Android Studio and emulator. 2. Deleted .pub_cache folder from flutter sdk folder through file explorer. 3. Launched android studio again. 4. Run 'pub get' command for my flutter application.

Problem solved and actual code showing.