Added create recipe page

This commit is contained in:
SomnusVeritas
2023-10-02 19:09:09 +02:00
parent ef2ffc3e14
commit c1df09e55b
3 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';
class CreateRecipe extends StatelessWidget {
const CreateRecipe({super.key});
static const routeName = '/createRecipe';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Create Recipe'),
),
);
}
}

View File

@@ -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),
),
);
}
}