MatexCountryBloc constructor

MatexCountryBloc({
  1. String? jsonData,
  2. MatexCountryBlocState? initialState,
})

Factory constructor to provide a singleton instance of the MatexCountryBloc. If an instance doesn't exist, it will be created.

Implementation

factory MatexCountryBloc({
  String? jsonData,
  MatexCountryBlocState? initialState,
}) {
  if (!_hasBeenInstantiated) {
    _hasBeenInstantiated = true;
    instance = MatexCountryBloc._(
      initialState: initialState,
      jsonData: jsonData,
    );
  }

  return instance;
}