在Flutter中使用intl库格式化时间需要先在pubspec.yaml文件中添加intl依赖,然后在dart文件中导入intl库。 具体使用方法如下: 在pubspec.yaml文件中添加intl依赖: dependencies: intl: ^0.16.1