I want to send name to this method, which is in module class of dagger 2, I know It's Impossible nut I want to know is there any way to send data every time?
@Provides
Toast provideToast(String name){
Toast toast = Toast.makeText(context, "", Toast.LENGTH_SHORT);
toast.setText(name);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
return toast;
}
follow below is my component class
@Singleton
@Component(modules = {ApiModule.class,AppModule.class})
public interface ApiComponent {
void inject(MainActivity activity);
}