onSelectFarm method Null safety

Future<void> onSelectFarm(
  1. int idx
)

농장을 선택했을때

Implementation

Future<void> onSelectFarm(int idx) async {
  SharedPreferences _prefs = await SharedPreferences.getInstance();
  ApiService().farmState.currentFarm = ApiService().farmState.farms![idx];
  _prefs.setString(PrefsConstants.PREFS_KEY_CURRENT_FARM, ApiService().farmState.currentFarm!.id);
  splashScreenKey.currentState?.init();
  Navigator.of(ApiService().context, rootNavigator: true).popUntil((route) => route.settings.name == SplashScreen.routeName);
}