add note button
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:progetto_m335_flutter/model/note.dart';
|
import 'package:progetto_m335_flutter/model/note.dart';
|
||||||
|
|
||||||
class Database{
|
class Database{
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'NoteDetailView.dart';
|
||||||
|
|
||||||
class NotesView extends StatefulWidget {
|
class NotesView extends StatefulWidget {
|
||||||
const NotesView({super.key});
|
const NotesView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<NotesView> createState() => _NotesViewState();
|
State<NotesView> createState() => _NotesViewState();
|
||||||
@@ -10,12 +11,21 @@ class NotesView extends StatefulWidget {
|
|||||||
class _NotesViewState extends State<NotesView> {
|
class _NotesViewState extends State<NotesView> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return const Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
appBar: AppBar(
|
||||||
child: Icon(Icons.note),
|
title: Text('Note'),
|
||||||
|
),
|
||||||
|
floatingActionButton: FloatingActionButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => const NoteDetailView(),
|
||||||
),
|
),
|
||||||
|
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
child: Icon(Icons.add),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user