A new Flutter package project for displaying fuzzy time.
Add dependency to your pubspec.yaml:
ago: any
Get the packages:
flutter packages get
import 'package:ago/ago.dart';
var justNow = DateTime.now().subtract(Duration(minutes: 3));
ago(justNow); // 刚刚
Run flutter test
in the terminal.
- Remember to update version.
- Run
pub publish --dry-run
. - If no warnings or erros,remove
--dry-run
and executepub publish
.
For help getting started with Flutter, view our online documentation.
For help on editing package code, view the documentation.