cubitGridFileContent constant

String const cubitGridFileContent

Implementation

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

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

part '<screen_name>_state.dart';

class <cubit_name> extends Cubit<<state_name>> {
<cubit_name>() : super(<state_name>());

Future<void> fetchInitialData() async {
  await Future.delayed(const Duration(seconds: 2));
  state.currentState = ActivityState.loaded;
  emit(state.copy());
}

Future<void> searchData({required String query}) async {
  state.currentState = ActivityState.loading;
  emit(state.copy());
  await Future.delayed(const Duration(seconds: 1));
  state.currentState = ActivityState.loaded;
  emit(state.copy());
}

}""";