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 – how resolve that: the constructor being called isnt' a const constructor. Try to remove 'const' from the invocation

import 'package:flutter/material.dart'; class Something { Something({required this.first, required this.second}); final String first; final String second; } class MapGood extends StatefulWidget { const MapGood({Key? key}) : location = **const** Something( // the constructor being called isnt' a const constructor. Try to…

VIEW QUESTION

useEffect or useMemoized in Flutter

If I want to initialize object in hook widget, should I use useEffect or useMemoized? class CreateUserScreen extends HookWidget { late ABC abc; CreateUserScreen({super.key}); @override Widget build(BuildContext context) { useEffect(() { abc = ABC(); return null; }); ... } or…

VIEW QUESTION
Back To Top
Search