34 Commits

Author SHA1 Message Date
b6b49e84e4 Simplify the code
Now the Note's modified/created can never have a date with a year = 10
meaning a special thing.
2020-01-07 23:56:58 +01:00
011962db5d Fix flutter analyze 2019-12-27 13:44:20 +01:00
72f1620e7e JournalListing: Use 'modified' date if 'created' is missing / invalid 2019-12-27 11:42:33 +01:00
2b09708793 JournalListing: Show the title
It's no longer a simple JournalListing and instead we also show the
title. The main problem is with what to do when the title is not there.
Just leaving it blank seems to feel weird, specially when the note is
too small.

Maybe it's time to change it such that each row size is not the same.
We're effectively wasting whitespace right now for very small notes.
2019-12-27 11:34:15 +01:00
0a7f00af7b Stop overwriting the default divider color
It can be configured from the theme if I want it to be different. The
light grey actually seems fine, for now.
2019-12-06 20:12:00 +01:00
4c2285a2cc JournalList: Implement Hero transition
This was especially challenging because of this bug -
https://github.com/flutter/flutter/issues/36220

It's why we need the extra flightShuttleBuilder
2019-12-06 12:32:51 +01:00
464b7512e9 Move Note and NoteFolder class into a core folder 2019-12-04 14:18:11 +01:00
ffc0af12a3 Enable prefer_const_constructors 2019-10-20 01:11:53 +01:00
df96467353 UndoSnackbar: Pass the StateContainer down
Not sure why fetching the StateContainer from the context seems to be
failing and throwing an exception.
2019-10-09 00:22:17 +02:00
7f557d3d3e Use Flushbar for Snackbars
The flutter default Snackbars are a major PITA to use as they require a
Scaffold, additionaly, they will not be shown if the parent Scaffold is
destroyed, which is the case when deleting a note and returning to the
main screen.
2019-10-09 00:12:58 +02:00
69003cf0ac Rename package from journal -> gitjournal
It's about time.
2019-10-07 19:30:50 +02:00
1683d4af73 JournalList: Move IconDismissable to its own widget 2019-10-07 19:04:42 +02:00
a806013554 JournalList: Swipe actions show a delete icon
Also changed the color to Red to make it very clear that the note is
being deleted.
2019-10-07 16:31:03 +02:00
d4718e9fc9 Search: Show a better message when not found
It used to show "Why don't you add a new note"
2019-10-06 12:46:06 +02:00
ad2e4ac9b1 Rename markdownToPlainText -> stripMarkdownFormatting
It better reflects what the function actually does
2019-05-13 22:57:49 +02:00
f2af5c9c75 Improve markdown to text conversion
Use a proper markdown parser to convert the text. This way more of the
formatting is correctly removed.
2019-05-13 22:36:32 +02:00
0e88479db2 JournalList: Remove #
They are jarring, as reported by a user.
2019-05-13 21:58:04 +02:00
6e5a6255a3 Move empty text inside the JournalList 2019-05-01 23:59:00 +02:00
139f1bc5cd JournalList: Show the fileName if the note has an invalid date 2019-02-16 19:57:20 +01:00
62f22ef18d Give some widgets keys
This should result in a bit of a performance boost. I'm not sure if I
understand the concept of keys correctly, though.
2019-02-16 19:32:49 +01:00
a32f01b2c4 Implement undo delete properly
This way the git History is not modified.
2019-02-15 19:58:58 +01:00
0ff71dda2b JournalList: Add a separator between the entries 2019-02-15 12:48:55 +01:00
4344d4d618 JournalList: Make it slightly prettier
I'm not using the Theme everywhere, and I should ideally be changing
it instead of using custom fonts, but lets just go with this for now.
2019-02-15 12:23:53 +01:00
8345f1424e Note: Rename 'fileName' to 'filePath'
A note can reside in a subfolder, so lets just use the path as an
identifier instead of using just the fileName.
2019-02-14 12:07:23 +01:00
acede95536 Dart: Add analysis_options
For now I've mostly tried to follow the same style guide as the flutter
repository, with many options disabled. Eventually, maybe it would make
sense to be far stricter.
2019-02-13 13:08:15 +01:00
b9b42d950f ListView: Remove the padding
This way it properly aligns up with the hamburger menu.

I also discovered this 'debugShowMaterialGrid' option which makes
working with padding issues much much easier.
2019-01-23 15:19:54 +01:00
c99fe854a1 Note: Replace 'id' with 'fileName'
It all just makes far more since when each Note has a fileName.

Though we don't save the fileName in the YAML header. It seems quite
redundant to do that.

Another advantage of this is that if we can read any file ending with a
'.md' in a git repo. It doesn't need to be named exactly how we want it,
and we will still save the details correctly.
2019-01-18 16:12:03 +01:00
fc40e4cef1 JournalList: Use color from Theme
Also cleanup the code a bit
2019-01-15 14:14:29 +01:00
eb2c9eb33f Note: Rename 'createdAt' to 'created'
My notes already use the key 'created', and I don't want to have to
change that.
2018-06-01 19:04:48 +02:00
0551cc0538 Note Deletion: Implement undo 2018-05-25 01:05:17 +02:00
69eb5f2ed5 JournalList: Only show the first 2 lines of the note
Instead of trying to guess how many characters one should show.
2018-05-25 00:47:35 +02:00
46c0abc525 NoteViewer: Implement the left/right buttons works 2018-05-25 00:09:22 +02:00
b6c38dde3c Use an InheritedWidget instead of passing the callbacks
This simplifies the code quite a bit, at the cost of using this
strange flutter magic of an 'InheritedWidget'.

It basically make a class a global variable.
2018-05-24 12:33:46 +02:00
af81fd5a45 Move a widget into its own dir 2018-05-21 18:03:56 +02:00