This commit is contained in:
Giulia
2023-09-29 09:09:26 +02:00
committed by Joe Küng
parent a8074c8701
commit 4b46c8cc01
2 changed files with 10 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'NoteDetailView.dart';
import '../pages/NoteDetailView.dart';
class Note extends StatefulWidget {
const Note({super.key});
@@ -12,10 +12,7 @@ class _NotesViewState extends State<Note> {
@override
Widget build(BuildContext context) {
return Card(
color: Colors.white,
child: ListTile(
return ListTile(
title: Text("ciao", style: TextStyle(color: Colors.lightBlue.shade900, fontWeight: FontWeight.bold),),
subtitle: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [Text('Descrizione della nota:'),],),
onTap: () {
@@ -25,7 +22,6 @@ class _NotesViewState extends State<Note> {
),
);
},
),
);
}
}

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import '../Components/Note.dart';
import 'CreateNewNote.dart';
import 'NoteDetailView.dart';
@@ -16,8 +17,7 @@ class _NotesViewState extends State<NotesView> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Note', style: TextStyle(color: Colors.white),),
backgroundColor: Colors.cyan.shade700,
title: Text('Note'),
),
floatingActionButton: FloatingActionButton(
onPressed: () {
@@ -32,28 +32,12 @@ class _NotesViewState extends State<NotesView> {
),
body: Container(
child: ListView.builder(
itemCount: 5,
itemBuilder: (context, index) {
return Card(
color: Colors.white,
child: ListTile(
title: Text("ciao", style: TextStyle(color: Colors.cyan.shade700, fontWeight: FontWeight.bold),),
subtitle: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [Text('Descrizione della nota:'),],),
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => const NoteDetailView(),
),
);
},
),
);
},
),
),
body:ListView(
children: const <Widget>[
Note(),
Note(),
],
)
);
}
}