blocGridFileContent constant

String const blocGridFileContent

Implementation

static const String blocGridFileContent = """import 'package:bloc/bloc.dart';

import 'package:<app_name>/App/core/enums/enums.dart';

part '<screen_name>_event.dart';

part '<screen_name>_state.dart';

class <bloc_name> extends Bloc<<event_name>, <state_name>> {
<bloc_name>() : super(<state_name>()) {
  on<FetchInitialData>((event, emit) async {
    await Future.delayed(const Duration(seconds: 2));
    state.currentState = ActivityState.loaded;
    emit(state.copy());
  });
  on<SearchData>((event, emit) async {
    state.currentState = ActivityState.loading;
    emit(state.copy());
    await Future.delayed(const Duration(seconds: 1));
    state.currentState = ActivityState.loaded;
    emit(state.copy());
  });
}
}""";