Error:
A non-null String must be provided to a Text widget. 'package:flutter/src/widgets/text.dart': text.dart:1 Failed assertion: line 394 pos 10: 'data != null' The relevant error-causing widget was ProfileEdit

Solution:
It seems that the issue might be with the keys in the city map when constructing DropdownMenuItem. The key 'city_name ' might have an extra space at the end, which could be causing the mismatch. Please try removing the extra space in the key.
Here’s the modified code:








