diff --git a/lib/database/database.dart b/lib/database/database.dart index 2f81885..78b2ed5 100644 --- a/lib/database/database.dart +++ b/lib/database/database.dart @@ -1,4 +1,3 @@ - import 'package:progetto_m335_flutter/model/note.dart'; class Database{ diff --git a/lib/pages/NotesView.dart b/lib/pages/NotesView.dart index 70ccb07..6ae0886 100644 --- a/lib/pages/NotesView.dart +++ b/lib/pages/NotesView.dart @@ -1,7 +1,8 @@ import 'package:flutter/material.dart'; +import 'NoteDetailView.dart'; class NotesView extends StatefulWidget { - const NotesView({super.key}); + const NotesView({Key? key}) : super(key: key); @override State createState() => _NotesViewState(); @@ -10,12 +11,21 @@ class NotesView extends StatefulWidget { class _NotesViewState extends State { @override Widget build(BuildContext context) { - return const Scaffold( - body: Center( - child: Icon(Icons.note), - ), - + return Scaffold( + appBar: AppBar( + title: Text('Note'), + ), + floatingActionButton: FloatingActionButton( + onPressed: () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => const NoteDetailView(), + ), + ); + }, + child: Icon(Icons.add), + ), ); - } } +