grafica pagina TodayView.dart

This commit is contained in:
Tito Arrigo
2023-09-28 09:49:09 +02:00
parent 330d0e4c61
commit 29a54bbcbc
5 changed files with 106 additions and 14 deletions

View File

@@ -0,0 +1,55 @@
import 'package:flutter/material.dart';
class EditReminder extends StatelessWidget{
@override
Widget build(BuildContext context) {
return FloatingActionButton.small(
onPressed: () {
showModalBottomSheet(
context: context,
showDragHandle: true,
builder: (BuildContext context) {
return Container(
// Contenuto del BottomSheet modale
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
ListTile(
title: const TextField(
decoration: InputDecoration(
hintText: "Title",
border: OutlineInputBorder(),
),
),
onTap: () {
// Azione da eseguire quando viene selezionato "Share"
Navigator.pop(context);
},
),
ListTile(
title: const TextField(
decoration: InputDecoration(
hintText: "Title",
border: OutlineInputBorder(),
),
),
onTap: () {
// Azione da eseguire quando viene selezionato "Share"
Navigator.pop(context);
},
),
//spacer
Container(
height: 600
),
],
),
);
},
);
},
child: Icon(Icons.edit),
);
}
}

View File

@@ -0,0 +1,33 @@
import 'package:flutter/material.dart';
import '../Components/EditReminder.dart';
class Reminder extends StatefulWidget {
const Reminder({super.key});
@override
State<Reminder> createState() => _ReminderState();
}
class _ReminderState extends State<Reminder> {
bool _value = false;
void _onChanged(bool? newValue) {
setState(() {
_value = newValue ?? false;
});
}
@override
Widget build(BuildContext context) {
return ListTile(
leading: Checkbox(
value: _value,
onChanged: _onChanged,
),
title: Text("Reminder"),
subtitle: Text(DateTime.now().toString()),
trailing: EditReminder(),
);
}
}