added routing
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rezepte/pages/dashboard_page.dart';
|
||||||
|
|
||||||
import 'theme.dart';
|
import 'theme.dart';
|
||||||
|
|
||||||
@@ -15,10 +16,9 @@ class MyApp extends StatelessWidget {
|
|||||||
title: 'Flutter Demo',
|
title: 'Flutter Demo',
|
||||||
theme: lightTheme,
|
theme: lightTheme,
|
||||||
darkTheme: darkTheme,
|
darkTheme: darkTheme,
|
||||||
home: Scaffold(
|
routes: {
|
||||||
appBar: AppBar(
|
Dashboard.routeName: (_) => const Dashboard(),
|
||||||
title: Text('ietn'),
|
},
|
||||||
)),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
lib/pages/dashboard_page.dart
Normal file
15
lib/pages/dashboard_page.dart
Normal 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'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user