dart – Flutter中的日期时间格式dd / MM / YYYY hh:mm

My Date-Time format at the moment is this

通过使用这个:

Text(new DateTime.fromMillisecondsSinceEpoch(values[index]["start_time"]*1000).toString(),

我得到了图片中附带的格式,但是我想知道我是否可以用dd / MM / YYYY得到它……嗯?

解决方法

如果您使用 intl package

final f = new DateFormat('yyyy-MM-dd hh:mm');

Text(f.format(new DateTime.fromMillisecondsSinceEpoch(values[index]["start_time"]*1000)));

相关文章

这篇文章主要讲解了“FlutterComponent动画的显和隐怎么实现...
这篇文章主要讲解了“flutter微信聊天输入框功能如何实现”,...
本篇内容介绍了“Flutter之Navigator的高级用法有哪些”的有...
这篇文章主要介绍“Flutter怎么使用Android原生播放器”,在...
Flutter开发的android端如何修改APP名称,logo,版本号,具体...
Flutter路由管理初识路由概念一.路由管理1.1.Route1.2.Mater...