0

I am developing white-label Flutter app. I am using dependency approach, inspired by this article.

That means, I have a base project and in the same folder have brand1, brand2, ... , brandn projects. Each brandi project has dependancy inside of its pubspec.yaml:

dependencies:
  base:
    path: ../base

Inside of base project, I have a folder name flavor which contains assets, widgets, etc..., which are resources that need to be overridden in brandi project. It is done by simply creating flavor folder and setting the same file structure and simply providing different files (for example, file logo.png in base/flavor will be different in basei/flavor and it will correspond with logo of related brand).

Also, main.dart in brand project will simply look like this:

import 'package:base/main.dart' as base;

void main() => base.main();

I only can't figure out is how can I access assets from base projects in brandi projects? These common assets could be navigation arrows, stuff like that...

Draško
  • 2,119
  • 4
  • 41
  • 73

0 Answers0