skip to Main Content

ListView inside Alert Dialog displays empty transparent window – Flutter

Below is my Alertdialog: return AlertDialog( title: const Text('Choose Device'), content: ListView.builder( shrinkWrap: true, itemCount: listDevices.length, itemBuilder: (_, int index) => deviceList(listDevices[index]), ), ); Below is deviceList function: Widget deviceList(String strDevice) => SizedBox( height: 150.0, child: Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children:…

VIEW QUESTION

Flutter Bloc Listen to stream and emit state with Cubit

How can I listen to stream and emit state with Cubit? With Bloc we can do something like this: on<VideoStreamPlayPauseEvent>( (event, emit) async { if (event.play) { await emit.forEach( videoStreamingRepo.videoDataStream, onData: (VideoData videoStreamData) => VideoStreamState( currentFrame: videoStreamData, isPlaying: true, ),…

VIEW QUESTION

Flutter – Null check operator used on a null value Error when use StreamBuilder

When using StreamBuilder it shows below error. The following _CastError was thrown building StreamBuilder<DocumentSnapshot<Map<String, dynamic>>>(dirty, state: _StreamBuilderBaseState<DocumentSnapshot<Map<String, dynamic>>, AsyncSnapshot<DocumentSnapshot<Map<String, dynamic>>>>#65942): Null check operator used on a null value My try:  I set CircularProgressIndicator for ConnectionState.none, ConnectionState.waiting,!streamSnapshot.hasData   It didn't work. There is…

VIEW QUESTION
Back To Top
Search