Skip to content

Commit

Permalink
Swipe-navigation (#238)
Browse files Browse the repository at this point in the history
* added page View, need help with states in PageView Builder (#224)

* added page View, need help with states in PageView Builder

* added changes, also have problem with Tags, bad state

---------

Co-authored-by: Danil Zdoryk <[email protected]>
Co-authored-by: Sanketh B K <[email protected]>

* wip

* fix nullptr issue

* remove print

* fix formatting

* fix format

---------

Co-authored-by: Danil <[email protected]>
Co-authored-by: Danil Zdoryk <[email protected]>
  • Loading branch information
3 people committed Oct 11, 2024
1 parent 2302988 commit 052ed35
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 150 deletions.
5 changes: 3 additions & 2 deletions lib/app/routes/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import 'package:flutter/material.dart';
class RouteGenerator {
static Route<dynamic> generateRoute(RouteSettings settings) {
final args = settings.arguments;

final log = printer("Router");

log.i("routing to ${settings.name} with args $args");
Expand All @@ -27,7 +26,9 @@ class RouteGenerator {
return MaterialPageRoute(builder: (_) => const NoteCreatePage());
} else if (settings.name == NotesReadOnlyPage.routeThroughHome) {
return MaterialPageRoute(
builder: (_) => NotesReadOnlyPage(id: settings.arguments as String));
builder: (_) => NotesReadOnlyPage(
id: settings.arguments as String,
));
} else if (settings.name == NotesReadOnlyPage.routeThoughNotesCreate) {
return MaterialPageRoute(
builder: (_) => const NotesReadOnlyPage(id: null));
Expand Down
1 change: 1 addition & 0 deletions lib/core/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
first: index == 1,
last: index == state.notePreviewList.length,
note: note,
index: index - 1,
);
},
itemCount: state.notePreviewList.length + 1,
Expand Down
4 changes: 2 additions & 2 deletions lib/features/notes/presentation/bloc/notes/notes_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class NoteInitialState extends NotesState {

@override
String toString() {
return "NoteInitialState(newNote: $newNote,createdAt: $createdAt, id: ${this.id}, title: $title, controller: ${controller!.document.toDelta().toJson()}, tags: $tags, hash: $hash,)";
return "NoteInitialState(newNote: $newNote,createdAt: $createdAt, id: ${this.id}, title: $title, tags: $tags, hash: $hash,)";
}
}

Expand Down Expand Up @@ -99,7 +99,7 @@ class NoteUpdatedState extends NotesState {

@override
String toString() {
return "NoteUpdatedState(newNote: $newNote,createdAt: $createdAt, id: ${this.id}, title: $title, controller: ${controller!.document.toDelta().toJson()}, allNoteAssets: $allNoteAssets)";
return "NoteUpdatedState(newNote: $newNote,createdAt: $createdAt, id: ${this.id}, title: $title, allNoteAssets: $allNoteAssets)";
}
}

Expand Down
Loading

0 comments on commit 052ed35

Please sign in to comment.