skip to Main Content

Router based navigation with flutter bloc

I am trying to build my own router similar to go_router, based on flutter_bloc. What I am trying to achieve is very similar to this guide that inspired the minimal implementation below: import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; void main()…

VIEW QUESTION

Flutter AutoFillGroup/Autofill hints not working

My code to show and submit login form: class LoginWidget extends StatelessWidget { const LoginWidget({ super.key, }); @override Widget build(BuildContext context) { final citiesLoaded = context.select((LoginBloc bloc) => bloc.state.citiesLoaded); final loginBloc = context.read<LoginBloc>(); final selectedCity = (citiesLoaded && loginBloc.state.cities.length ==…

VIEW QUESTION

Flutter – How to manage an enum-typed BLoC event?

I am using these packages for the following codes: flutter_bloc, oxidized, freezed, and get_it tmdb_bloc.dart typedef TmdbState = PageState<List<MovieEntity>>; class TmdbBloc extends Bloc<TmdbEvent, TmdbState> { final TmdbPublicUseCases useCases; TmdbBloc(this.useCases) : super(const PageState.initial()) { on<TmdbEvent>((event, emit) async { event.map( getPopularMovies: (_)…

VIEW QUESTION
Back To Top
Search