Question: In a logging structure, I have a list of states and within each state, there are several fields, each having a few attributes. Some of those fields have a attributes with the same name, but with different types, i.e. int versus float. Notice the 'timestamp' attribute in this particular example:

```
public class DroneState
{
    [XmlAttribute("timestamp")]
    public int timestamp;

    ...
}

public class SensorState
{
    [XmlAttribute("timestamp")]
    public float timestamp;

    ...
}

public class CombinedState
{
    [XmlElement("DroneState")]
    public DroneState droneState = null;
    [XmlElement("Sensor")]
    public SensorState sensorState = null;
}

public class FlightLog
{
    [XmlElement("States"), XmlArrayItem("State")]
    public List<CombinedState> states = new List<CombinedState>();

    public static void SaveToFile(FlightLog flightLog, string file)
    {
        XmlSerializer serializer = new XmlSerializer(typeof(FlightLog));
        string xml = string.Empty;
        // serialize and return string
        using (StringWriter writer = new StringWriter())
        {
            serializer.Serialize(writer, flightLog);
            xml = writer.ToString();
        }

        File.WriteAllText(file, xml);
    }
}

```

Using this code to generate an XML document, I get struck with the following exception:

> 
> InvalidOperationException: The XML attribute named 'timestamp' from namespace '' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the attribute.
> 
> 
> 

This is something I could have expected, but I don't seem to be capable of solving it. Whatever I try with regards to adding a namespace for each attribute, it keeps complaining that the attributes are allocated in the '' namespace.

What are the steps to take in making sure that each timestamp attribute is placed in its own namespace?

Answer: 
Do something like this:

```
appBar: AppBar(
    title: Row(
      mainAxisSize: MainAxisSize.min,
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        DropdownButton(
          value: _selectedItem,
          items: _dropdownMenuItems,
          underline: SizedBox(height: 0,),
          //underline: SizedBox(),
          onChanged: onChangeDropdownItem,
        ),
       ],
      ),
    ),

```

Then change your dropdown menu's style here:

```
/// Initialize dropdown menu
List<DropdownMenuItem<String>> buildDropdownMenuItems(List menu) {
List<DropdownMenuItem<String>> items = List();
for (String li in menu) {
  items.add(
    DropdownMenuItem(
      value: li,
      child: SizedBox(
        width: 100, 
        child: Text(li, style:  TextStyle(color: labelColor, fontWeight: 
               FontWeight.bold), 
               textAlign: TextAlign.center, overflow: TextOverflow.ellipsis,),),
    ),
  );
}
return items;

```

}
To have a white menu, change `data: new Theme.dark()` to `Theme.of(context).copyWith(brightness: Brightness.dark))`

But then another problems pop : The menu is white ; but the menu options are written in white too, making them unreadable.

After a deep inspection, it seems like it's currently not possible to have options using a different font color in the iddle state and when the dropdown is focused.
Consider creating an issue on their [github](https://github.com/flutter/flutter)