How can I merge multiple Streams into a higher level Stream?

I have two streams, Stream<A> and Stream<B>. I have a constructor for a type C that takes an A and a B. How do I merge the two Streams into a Stream<C>?

how to get selected index of dropdownbutton in flutter

How to get selectedIndex of dropdown in flutter, In dropdownbutton there is no property to get selected index, if there how to get the selected index and my code look like this: new...

Flutter GridView footer (for indicating load with infinite scrolling)

I have a GridView which works pretty smooth. I use the grid in the context of infinite scrolling where more items are loaded via a REST API whenever scrolling is close to the bottom. No problems...

List of horizontal list in Flutter

I have followed this tutorial and fully implemented a horizontally scrolling list. Now, what I would like to do is to create a vertical list where each row is a horizontal list. I tried different...

Flutter: Add box shadow to a transparent Container

I'm trying to make a widget that renders one of the circles shown in this image. It is a transparent circle with a box-shadow. The circle should show whichever color or background image that is...

Is there a way to display an image if the requested image is not in my assets?

the title might be a bit confusing but i'll try to explain it better with an example. I am using the widget Image.asset( 'assets/images/${object.name}.jpg', ), but i want to...

Bad state: Cannot set the body fields of a Request with content-type "application/json"

Map<String,String> headers = {'Content-Type':'application/json','authorization':'Basic c3R1ZHlkb3RlOnN0dWR5ZG90ZTEyMw=='}; var response = await post(Urls.getToken, headers: headers, ...

Special Symbol or Single Quote or apostrophe in JSON String in flutter

JSON response String containing an apostrophe This is the key and value coming from the server. "name": "men’s basketball wear with free product", When I'm converting this JSON into pojo...

How to build signed apk from Android Studio for Flutter

Is there a way to build an apk for flutter in Android Studio? I have seen this guideline: https://flutter.dev/docs/deployment/android But here flutter console is used to build apk.

Error thrown on navigator pop until : "!_debugLocked': is not true."

When popping a screen navigating to other one by clicking on the showBottomSheet, this error is thrown through the following code . I cant get why this is occurring. class _CheckoutButtonState...

Dart/Flutter: build_value vs json_serializable

Wondering what is the different between the dart libraries build_value vs json_serializable ? both appears to be doing the same thing.

How to use JWT with WebSocketChannel in Flutter

I have an existing Websocket Channel which needs authenticate user by his JWT in order to send/receive messages using this socket connection. The problem is - I don't know how to send my access...

can I use multiple repositories in flutter bloc pattern

Hi I am new with flutter and trying to implement bloc pattern. I have checked so many tutorials in those tutorials. this is one of them. they always using a single repository for small sample...

Flutter - Hide hint text when Text Field have focus

I need to know how to hide the hint text when I focus on the text field. This is my code: class _ContactoState extends State<Contacto> { FocusNode focusMsj; @override void initState() { ...

Flutter in_app_purchase '_enablePendingPurchases': enablePendingPurchases() must be called before calling startConnection

I am using the simple code below bool available = await InAppPurchaseConnection.instance.isAvailable(); however it is returning the error E/flutter (14525):...

Implement realtime online/offline status with flutter and firebase

Hy, what is the best way to show in an app if the user is online or offline? Frontend -> Flutter Backend -> Firestore Cloud and Firebase Auth. I have a collection of users in firestore that...

(No implementation found for method init on channel plugins.flutter.io/google_sign_in

I am trying to implement the Google Sign-in feature for an app that I am currently working on, however, I keep running into this error when the "Sign in" button is...

how to check two maps are equal in dart

Is it possible to check two maps are equals or not like java equals? void main() { Map map1 = {'size': 38, 'color': 'red'}; Map map2 = {'size': 38, 'color': 'red'}; if(map1== map2){//both...

How to navigate from Error dialog with flutter

I'm using Firebase with Flutter. After I retrieve documents as a contents list, I don't know how to handling screen. The code is in StreamBuilder. I would like to show dialog at first, and after...

Flutter: Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatform

I am new to flutter and i am building a social media App through tutorial which i am now customizing. Now I tried to add more input fields to a users profile page then i started getting the...

Class AMSupportURLConnectionDelegate is implemented in both

I'm trying to build a flutter app on M1 mac and getting the following error. $ flutter build ios --release Building XXX for device (ios-release)... Automatically signing iOS for device deployment...

I get a `cannot open camera "0" without camera permission` Error when I try to open a camera to scan a QR code

I get a cannot open camera "0" without camera permission Error when I try to open a camera to scan a QR code. I have a QR code scanner function that does not open the camera. The scanner screen...

LateInitializationError: Field '[email protected]' has not been initialized

Getting this when trying to initialize data. The following LateError was thrown building UserProfile(dirty, state: _UserProfileState#752a9): LateInitializationError: Field '[email protected]'...

flutter error: This widget has been unmounted, so the State no longer has a context (and should be considered defunct)

when I clicking on login button when my mobile number is wrong then open one error dialog box after that when I clicked okey on dialog box then i got this error. I got this message This widget has...

type '_JsonQuerySnapshot' is not a subtype of type 'Map<String, dynamic>' in type cast"

I have issues to display data from Firebase. Here is the code I used in my FutureBuilder. This is the error that I got "The following _CastError was thrown building...

valuenotifier not updating the widget on udating the list

import 'package:flutter/material.dart'; import '../../Data/Globalvariable.dart' as global; class MenuBar extends StatefulWidget { final key = UniqueKey(); // final pin; //...

flutter form validator with null safety

i got a problem while trying to make a form validator on my login screen it just doesn t work when i tape login and the text field is already null. here s my code if u have any help, i m down to...

Flutter Web: Cannot scroll with mouse down (drag) (Flutter 2.5+)

[Update] I can confirm this issue happened in flutter above 2.5. Using 2.2.3 is fine. The question becomes why this feature been removed in 2.5 ? And how to enable it in flutter 2.5? [Origin...

LateInitializationError: Field has not been initialized in Flutter

I'm considerably new to Flutter and I'm to build a Messenger Chap App on Flutter, and I face the issue of "LateInitilization: Field 'searchSnapShot' has not been initialized. Following is the...

Flutter The Scrollbar's ScrollController has no ScrollPosition attached

I get this error when using the AppBar: The Scrollbar's ScrollController has no ScrollPosition attached. This is my CustomScrollBar: class CustomScrollBar extends StatelessWidget { final...