Categories
Mastering Development

Expanded Widget got exception(Each child must be laid out exactly once)?

I have implemented app to read captured image text using Firebase ML kit,In my screen I have display the captured image and place a button bellow the image to read the image and display extract text below the button, but when I have click the button I got following exception, “Each child must be laid […]

Categories
Mastering Development

Can not switch to another page

Here is two classes, that I use, and I want to go from home.dart to map.dart I need to be working that FlatButton, where onPressed is MapPage(); I also tried to add MaterialApp, because anything I have seen is done with that, but I didn’t understood how and what is wrong with all of that. […]

Categories
Mastering Development

Flutter : How to disable drag down to close showModalBottomSheet

I want to disable drag down to close the showModalBottomSheet I have already tried using enableDrag:false, When i’m using enableDrag:false, is showing me below error Below is my code modal(BuildContext context) { showModalBottomSheet( context: context, enableDrag:false, isDismissible: false, backgroundColor: Colors.transparent, builder: (context) { return Container( width: MediaQuery.of(context).size.width, child: Stack( alignment: Alignment.topCenter, children: <Widget>[ Container( width: […]

Categories
Development

How to open screen on each item without losing animation

I want to know how to add click-on items on every position. I have added a gesture detector on the icon but then it loses animation. import ‘package:curved_navigation_bar/curved_navigation_bar.dart’; bottomNavigationBar: CurvedNavigationBar( key: _bottomNavigationKey, index: 2, height: h/15, items: <Widget>[ Icon(Icons.home, size: h/25), Icon(Icons.playlist_add_check, size: h/25), Icon(Icons.camera, size:h/18,color: Colors.black,), Icon(Icons.message, size: h/25), Icon(Icons.layers_clear, size: h/25), ], color: […]