I have an intl and I want to show local time(15:15, 16:27) but intl shows me 03:16 AM and so on. How can I transfer time to local time?
This is my code:
Text(
DateFormat('hh:mm').format(trackballDetails.point!.x),
style: TextStyle(
color: Colors.white,
fontSize: 10.sp,
fontFamily: "Mont"
),
)
2
Answers
If you meet the same problem, try this:
Try below code just set format like
HH:mm
:Output->
30-09-2022 15:15 PM
Result Screen->