Created with <3 with dartpad.dev.
Created
January 3, 2023 07:50
-
-
Save adryanev/0a4758ace189e83f1c64a575602f9ab0 to your computer and use it in GitHub Desktop.
flying-vibration-0254
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main(){ | |
final menuOrderModel = OrderCalculationFacade.calculate(params); | |
} | |
/// DO NOT CALL DIRECTLY!!!!!!! | |
/// PANGGIL LEWAT FACADE NYA YA!!!!! | |
class OrderCalculation{ | |
OrderCalculation(this.repoA, this.repoB); | |
final RepoA repoA; | |
final RepoB repoB; | |
MenuOrderModel calculate() | |
} | |
class OrderCalculationFacade{ | |
RepoA repoA = getIt<RepoA>(); | |
RepoB repoB = getIt<RepoB>(); | |
static MenuOrderModel calculate(params){ | |
final orderFacade = OrderCalculation(repoA, repoB); | |
return orderFacade.calculate(params); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment