Courses

Flutter v2 Mobile App with Laravel API

Delete Category with Confirmation Dialog

Previous: Refresh Data Between Widgets with Providers
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 }, ), ], ), ),

avatar

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

avatar
You can use Markdown
avatar
You can use Markdown