Skip to main content

Delete Category with Confirmation Dialog

Premium
7:08

The Full Lesson is Only for Premium Members

Want to access all of our courses? (36 h 00 min)

You also get:

61 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Rehan Azher avatar

Adding row to trail will throws an error, as it tried to occupy complete width. One may want to put training Row within a constrained box. Something like below:

ConstrainedBox( constraints: BoxConstraints(maxWidth: 100), child: Row( children: <Widget>[ IconButton( icon: const Icon(Icons.edit), onPressed: () { showModalBottomSheet( isScrollControlled: true, context: context, builder: (BuildContext context) { return CategoryEdit( category, provider.updateCategory); }); }, ), IconButton( icon: const Icon(Icons.delete), onPressed: () { // delete the category }, ), ], ), ),

Rehan Azher avatar

And looks like u can avoid that by using mainAxisSize as well :)