title: Flutter - Convert 24 hour format to 12 hour format
body: <p>I'm getting time using showTimePicker().</p>
  
  <pre><code>  TimeOfDay _selectedTime;
  
    Future&lt;Null&gt; _selectTime(BuildContext context) async {
      final TimeOfDay timePicked = await showTimePicker(
          context: context,
          initialTime: TimeOfDay.now(),
  
        );
      if (timePicked != null)
        setState(() {
          _selectedTime = timePicked;
        });
    }
  </code></pre>
  
  <p>But here <code>_selectedTime</code> is in 24-hour format. Suppose if I select 3.00 PM then it shows 15.00 i.e. it's in 24-hour format. </p>
  
  <p>How can I convert this time into 12-hour format? i.e It should show me 3.00 PM and not 15.00.</p>
  
  <p>I can write the logic to convert it. But is there anything built in to do so?</p>