skip to Main Content

Rerendering widgets in flutter

I am having trouble understanding state management in flutter I have the folloing build method: Widget build(BuildContext context) { print("calling build with selectedItem: $selectedItem"); // TODO: implement build return SafeArea( child: SingleChildScrollView( child: Padding( padding: const EdgeInsets.all(8.0), child: Column( mainAxisAlignment:…

VIEW QUESTION

Flutter Build failed with an exception

When performing flutter run on my visual studio code, I get the error message below: FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':flutter_plugin_android_lifecycle:compileDebugJavaWithJavac'. Could not resolve all files for configuration ':flutter_plugin_android_lifecycle:androidJdkImage'. Failed to transform…

VIEW QUESTION

Flutter – Bloc emit state issue

import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:moms/features/chat/domain/entities/message_entity.dart'; import 'package:moms/features/chat/domain/usecases/send_message.dart'; import 'package:moms/features/chat/domain/usecases/get_messages.dart'; import 'package:moms/features/chat/domain/usecases/get_or_create_thread_usecase.dart'; part 'chat_event.dart'; part 'chat_state.dart'; class ChatBloc extends Bloc<ChatEvent, ChatState> { final GetOrCreateThread getOrCreateThread; final GetMessages getMessages; final SendMessage sendMessage; ChatBloc({ required this.getOrCreateThread, required this.getMessages, required this.sendMessage, }) : super(ChatInitial()) {…

VIEW QUESTION
Back To Top
Search