added routing

This commit is contained in:
SomnusVeritas
2023-10-02 19:02:14 +02:00
parent f6cfc31036
commit ef2ffc3e14
2 changed files with 19 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:rezepte/pages/dashboard_page.dart';
import 'theme.dart';
@@ -15,10 +16,9 @@ class MyApp extends StatelessWidget {
title: 'Flutter Demo',
theme: lightTheme,
darkTheme: darkTheme,
home: Scaffold(
appBar: AppBar(
title: Text('ietn'),
)),
routes: {
Dashboard.routeName: (_) => const Dashboard(),
},
);
}
}

View File

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