Added create recipe page
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rezepte/pages/create_recipe_page.dart';
|
||||
|
||||
class Dashboard extends StatelessWidget {
|
||||
const Dashboard({super.key});
|
||||
|
||||
static const routeName = '/';
|
||||
|
||||
void _onAddTapped(BuildContext context) =>
|
||||
Navigator.of(context).pushNamed(CreateRecipe.routeName);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Dashboard'),
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () => _onAddTapped(context),
|
||||
child: const Icon(Icons.add),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user