Is there a way to pass a parameter known only at run time to an object created by getit dependency injection when the object is being created or retrieved from a Dependency Injector?
class WatchVideoPage extends StatelessWidget {
Widget build(BuildContext context) {
return BlocProvider(
create: () => locator<WatchVideoPageBloc>(), // I want the bloc to know of the videoId.
child: new RandomWidget()
);
}
final VideoId videoId;
}
'locator' is the dependency injection thing in the code.
Or is there another way of making the bloc know the value of videoId?
Thanks!