mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 09:47:35 +08:00
Show the actual date and time
This commit is contained in:
@ -3,6 +3,8 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
|
||||
class Note {
|
||||
final DateTime createdAt;
|
||||
@ -81,8 +83,11 @@ class JournalList extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildRow(BuildContext context, Note journal) {
|
||||
var title = journal.createdAt.toString();
|
||||
var time = "10:24";
|
||||
var formatter = new DateFormat('dd MMM, yyyy');
|
||||
var title = formatter.format(journal.createdAt);
|
||||
|
||||
var timeFormatter = new DateFormat('Hm');
|
||||
var time = timeFormatter.format(journal.createdAt);
|
||||
|
||||
var body = journal.body;
|
||||
if (body.length >= 100) {
|
||||
|
Reference in New Issue
Block a user