onInit method

  1. @override
void onInit()
override

Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.

Implementation

@override
void onInit() async {
  visibleItem.value = 12;
  tripStream = TripStreamController();
  showFlightTypesAgain.value = Preferences.getFlightTypeShowAgain();
  showDeepSearchAgain.value = Preferences.getDeepSearchShowAgain();
  listenToMainStream();
  donationController.text = '\$ 0';
  donationFocus.addListener(_focusListener);
  toAirportController.addListener(_toAirPortListener);
  fromAirportController.addListener(_fromAirPortListener);
  loadCommonAirports();
  ever(authenticationController.userProfileModel, (_) => updateSubscriptionStatus());
  super.onInit();
}