- séparation des taches faite et non,
- rapettisage de la taille des taches
This commit is contained in:
@@ -2,39 +2,54 @@ import 'package:flutter/material.dart';
|
||||
import 'package:todo/utils/my_button.dart';
|
||||
|
||||
class DialogBox extends StatelessWidget {
|
||||
DialogBox(
|
||||
const DialogBox(
|
||||
{Key? key,
|
||||
required this.controller,
|
||||
required this.onSave,
|
||||
required this.onCancel})
|
||||
: super(key: key);
|
||||
|
||||
final controller;
|
||||
VoidCallback onSave;
|
||||
VoidCallback onCancel;
|
||||
final TextEditingController controller;
|
||||
final VoidCallback onSave;
|
||||
final VoidCallback onCancel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
title: Text("New Task"),
|
||||
content: Container(
|
||||
title: const Text(
|
||||
"Nouvelle tache",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
content: SizedBox(
|
||||
height: 120,
|
||||
child: Column(
|
||||
children: [
|
||||
TextField(
|
||||
controller: controller,
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(), hintText: "Add new task"),
|
||||
autofocus: true,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
decoration: const InputDecoration(
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.white),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: Colors.white),
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
gapPadding: 4, borderSide: BorderSide(color: Colors.white)),
|
||||
hintText: "Ajouter une tache",
|
||||
hintStyle: TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
height: 40,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
MyButton(text: "Cancel", onPressed: onCancel),
|
||||
MyButton(text: "Save", onPressed: onSave),
|
||||
MyButton(text: "Annuler", onPressed: onCancel),
|
||||
MyButton(text: "Sauvegarder", onPressed: onSave),
|
||||
],
|
||||
)
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user