33 lines
873 B
Dart
33 lines
873 B
Dart
import 'package:flutter/material.dart';
|
||
import '../widgets/filter_bar.dart';
|
||
import '../widgets/todo_list.dart';
|
||
import '../widgets/todo_form.dart';
|
||
|
||
class HomeScreen extends StatelessWidget {
|
||
const HomeScreen({super.key});
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
final colorScheme = Theme.of(context).colorScheme;
|
||
|
||
return Scaffold(
|
||
appBar: AppBar(
|
||
title: const Text('Todos – Dart Flutter'),
|
||
centerTitle: false,
|
||
backgroundColor: colorScheme.primaryContainer,
|
||
foregroundColor: colorScheme.onPrimaryContainer,
|
||
),
|
||
body: const Column(
|
||
children: [
|
||
FilterBar(),
|
||
Expanded(child: TodoList()),
|
||
],
|
||
),
|
||
floatingActionButton: FloatingActionButton(
|
||
onPressed: () => showTodoDialog(context, null),
|
||
child: const Icon(Icons.add),
|
||
),
|
||
);
|
||
}
|
||
}
|