Skip to content
Mahgoub

A Software Developer who does not let his schooling interfere with his education

Mahgoub

A Software Developer who does not let his schooling interfere with his education

Tag: Flutter

Tip: Parsing doubles and integers in Dart

mmahgoub, October 18, 2023February 20, 2024

In order to gracefully handle potential exceptions when parsing a string into a double, one effective technique is to prepend a "0" to the input string before performing the conversion. By employing this approach, the default value becomes zero, ensuring that no exceptions are raised even when the input is…

Use Flutters StatefulBuilder to update state of a ModalBottomSheet

mmahgoub, November 1, 2019November 4, 2023

You can use Flutter’s StatefulBuilder to wrap your ModalBottomSheet as follows: Please note that the new setState will override your main widget setState but sure you can just rename it so you would be able to set state of your parent widget and the modal’s This was originally posted as an answer to a question on Stackoverflow but…

©2026 Mahgoub | WordPress Theme by SuperbThemes