flutter Image.asset external package another library module
 
If you work flutter on multiple library/module/package;
How to show images in another package in main application? I will explain this.
 
Example Package Names
Main Application Package: my.app.imagetest
Business Flutter Library Name : my_business
 
 
MainApplication
    pubspec.yaml 
        dependencies:
              my_business:
                  path: ..\..\my_business
 
 
 
my_business
     assets/images/warning.png (file exists current library)
 
my_business
      pubspec.yaml 
         assets:
           - assets/images/
 
 
my_business
    testPage.dart
         Image.assets("assets/images/warning.png")  
 
In this way, the image is not displayed in the main application.
The following code is used to show it in the Main Application.
 
my_business
     testPage.dart
         AssetImage("assets/images/warning.png", package: "my_business")


TAGS
flutter Image.asset external package
flutter Image.asset multiple library
flutter Image.asset current module
flutter Image.asset dependency library
flutter Image.asset include library images
flutter Image.asset library not loaded
 
 

Author: Engin ATALAY
Date: 16.01.2021 20:12:17
View Count: 134
 
 

COMMENTS
 
No comments yet. Be the first to comment who you are.
 
 
 
 
 
 
 
WRITE COMMENT
 
 
Your Name :
 
 
 
E-mail :
 
 
 
Your Message :
 
 
 
 
 
 
 
This project : ASP.NET MVC , RAZOR, Entity Framework , CSS , HTML , JQUERY(2.0.2) , AJAX the C# side-tier architecture was developed with logic.
 
Yukarı Çık