Flutter Bloc implementation
I am new to flutter and flutter bloc. I am trying to prepare an example, where i have a bulb and a switch on the screen. My idea is to glow the buld when i press the switch and put…
I am new to flutter and flutter bloc. I am trying to prepare an example, where i have a bulb and a switch on the screen. My idea is to glow the buld when i press the switch and put…
I am new to flutter_bloc and need some clarity. I am developing an app similar to TikTok, that has a PageView with VideoPlayers. I want to toggle Like, Save, and Follow buttons on the screen. The parent widget is wrapped…
I do not know English well, so I will hope for a translator) P.S I am new to the world of flutter and dart, I am a .net and angular developer. In my application, I refuse to use StatefullWidget in…
I have a generic dialog that I use for everything, such as login and logout. The constructor looks like this GenericDialog({ required String dialogTitle, required Widget dialogContent, }); Now I'm trying to add BlocConsumer into the dialog, in order for…
Message: Could not find the correct Provider above this Home Widget This happens because you used a BuildContext that does not include the provider of your choice. Here's the blocProvider and blocBuilder set up you can get the jest of…
I am building a registration flow to practice flutter and bloc. In my app I nested routes for base url '/registration'. I wrapped my Material App with my blocprovider. What I want to achieve is to save phonenumber to my…
I have a model: import 'dart:convert'; Forecast forecastFromJson(String str) => Forecast.fromJson(json.decode(str)); String forecastToJson(Forecast data) => json.encode(data.toJson()); class Forecast { List<ListElement> list; Forecast({ required this.list, }); factory Forecast.fromJson(Map<String, dynamic> json) => Forecast( list: List<ListElement>.from(json["list"].map((x) => ListElement.fromJson(x))), ); Map<String, dynamic> toJson() =>…
Requirements: Display dialog if internet is unavailable throughout app Pop off the dialog only if retry is clicked and internet is available. Needs suggestion in: Pop off the dialog only if retry is clicked and internet is available. Approach: I…
I have very simple app which use switch and bloc state management. Switch state management work, but I would like to show state of switch to user via AlertDialog. Here is switch widget: @override Widget build(BuildContext context) { return BlocProvider(…
I used BloC pattern to create an application. There is a data provider layer that is responsible to request a session code from the remote server. abstract class AppApi{ /// Logins a user to server and return a [Session]. ///…