API Table Investasi Admin

This commit is contained in:
2025-02-04 22:35:44 +08:00
parent 257c1ebaad
commit c53ca6d355
40 changed files with 1737 additions and 378 deletions

View File

@@ -0,0 +1,21 @@
import 'dart:async';
import 'dart:developer' as developer;
import 'package:bloc/bloc.dart';
import 'package:${appName}${relative}/index.dart';
class ${upperName}Bloc extends Bloc<${upperName}Event, ${upperName}State> {
${upperName}Bloc(${upperName}State initialState) : super(initialState){
on<${upperName}Event>((event, emit) {
return emit.forEach<${upperName}State>(
event.applyAsync(currentState: state, bloc: this),
onData: (state) => state,
onError: (error, stackTrace) {
developer.log('$error', name: '${upperName}Bloc', error: error, stackTrace: stackTrace);
return Error${upperName}State(error.toString());
},
);
});
}
}