This commit is contained in:
Giulia
2023-09-29 09:09:26 +02:00
parent c2196663ae
commit bf3a9c552d
3 changed files with 10 additions and 32 deletions

View File

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

View File

@@ -1,5 +1,3 @@
import 'dart:ffi';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'pages/testUI.dart'; import 'pages/testUI.dart';
import 'pages/TodayView.dart'; import 'pages/TodayView.dart';

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../Components/Note.dart';
import 'CreateNewNote.dart'; import 'CreateNewNote.dart';
import 'NoteDetailView.dart'; import 'NoteDetailView.dart';
@@ -16,8 +17,7 @@ class _NotesViewState extends State<NotesView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text('Note', style: TextStyle(color: Colors.white),), title: Text('Note'),
backgroundColor: Colors.cyan.shade700,
), ),
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
onPressed: () { onPressed: () {
@@ -32,28 +32,12 @@ class _NotesViewState extends State<NotesView> {
), ),
body: Container( body:ListView(
child: ListView.builder( children: const <Widget>[
itemCount: 5, Note(),
itemBuilder: (context, index) { Note(),
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(),
),
);
},
),
);
},
),
),
); );
} }
} }