Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
[flutter]: format time of trash cell
annie19968010af36
diff --git a/app_flowy/lib/workspace/presentation/stack_page/trash/widget/trash_cell.dart b/app_flowy/lib/workspace/presentation/stack_page/trash/widget/trash_cell.dartindex f0b57e0e7b..7de74f9ef0 100644--- a/app_flowy/lib/workspace/presentation/stack_page/trash/widget/trash_cell.dart+++ b/app_flowy/lib/workspace/presentation/stack_page/trash/widget/trash_cell.dart@@ -4,6 +4,8 @@ import 'package:flowy_infra_ui/style_widget/text.dart';import 'package:flowy_infra_ui/widget/spacing.dart';import 'package:flowy_sdk/protobuf/flowy-workspace-infra/trash_create.pb.dart';import 'package:flutter/material.dart';+import 'package:intl/intl.dart';+import 'package:fixnum/fixnum.dart' as $fixnum;import 'sizes.dart';@@ -18,8 +20,8 @@ class TrashCell extends StatelessWidget {return Row(children: [SizedBox(width: TrashSizes.fileNameWidth, child: FlowyText(object.name, fontSize: 12)),- SizedBox(width: TrashSizes.lashModifyWidth, child: FlowyText("${object.modifiedTime}", fontSize: 12)),- SizedBox(width: TrashSizes.createTimeWidth, child: FlowyText("${object.createTime}", fontSize: 12)),+ SizedBox(width: TrashSizes.lashModifyWidth, child: FlowyText(dateFormatter(object.modifiedTime), fontSize: 12)),+ SizedBox(width: TrashSizes.createTimeWidth, child: FlowyText(dateFormatter(object.createTime), fontSize: 12)),const Spacer(),FlowyIconButton(width: 16,@@ -35,4 +37,11 @@ class TrashCell extends StatelessWidget {],);}++ String dateFormatter($fixnum.Int64 inputTimestamps) {+ var outputFormat = DateFormat('MM/dd/yyyy hh:mm a');+ var date = DateTime.fromMillisecondsSinceEpoch(inputTimestamps.toInt() * 1000);+ var outputDate = outputFormat.format(date);+ return outputDate;+ }}diff --git a/app_flowy/macos/Podfile.lock b/app_flowy/macos/Podfile.lockindex 6386c577c3..23a664637f 100644--- a/app_flowy/macos/Podfile.lock+++ b/app_flowy/macos/Podfile.lock@@ -55,4 +55,4 @@ SPEC CHECKSUMS:PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c-COCOAPODS: 1.10.1+COCOAPODS: 1.11.2