Added create recipe page
This commit is contained in:
15
lib/pages/create_recipe_page.dart
Normal file
15
lib/pages/create_recipe_page.dart
Normal 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'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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