바인딩 : Bindings
ex) class InitBinding extends Bindings {}
컨트롤러 : GetxService or GetxController 을 사용하고 static 사용
ex)
앱컨트롤러
class AppController extends GetxService {
static AppController get to => Get.find();
}
기타 컨트롤러
class HomeController extends GetxController {
static HomeController get to => Get.find();
}
레포지토리 : GetConnect 을 사용하고 static 사용
ex)
class ApiRepo extends GetConnect {
static ApiRepo get to => Get.find();
@override
void onInit(){
httpClient.baseurl = "https://aaa.com";
super.onInit();
}
}
app.dart GetView<AppController>
ex)
class App extends GetView<AppController> { }