added bookmarks page
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../model/collection.dart';
|
||||
import '../service/bookmarks_provider.dart';
|
||||
import '../service/storage.dart';
|
||||
import '../widgets/create_bookmark_collection_dialog.dart';
|
||||
import 'bookmarks_page.dart';
|
||||
|
||||
class CollectionsPage extends StatefulWidget {
|
||||
const CollectionsPage({super.key});
|
||||
@@ -43,6 +45,13 @@ class _CollectionsPageState extends State<CollectionsPage> {
|
||||
}
|
||||
|
||||
Widget itemBuilder(BuildContext context, int index) {
|
||||
return ListTile(title: Text(collections.elementAt(index).name));
|
||||
final collection = collections.elementAt(index);
|
||||
return ListTile(
|
||||
title: Text(collection.name),
|
||||
onTap: () {
|
||||
BookmarksProvider.selectedCollectionId = collection.id;
|
||||
Navigator.pushNamed(context, BookmarksPage.routeName);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user