bloc_list 0.0.4 bloc_list: ^0.0.4 copied to clipboard
A flexible and customizable list widget for Flutter applications using the BLoC pattern for state management. It offers dynamic data loading, state-dependent rendering, custom loader support, and erro [...]
import 'package:example/blocs/todo_bloc.dart';
import 'package:example/data/data_service.dart';
import 'package:example/screens/todo_list.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
void main() {
runApp(MultiBlocProvider(
providers: [
BlocProvider(create: (_) => TodoBloc(DataService())),
],
child: const MainApp(),
));
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(home: TodoListPage());
}
}