notification_page.dart 751 B

12345678910111213141516171819202122232425262728
  1. import 'package:cpt_main/router/page/main_page_router.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:auto_route/auto_route.dart';
  4. import 'package:router/ext/auto_router_extensions.dart';
  5. @RoutePage()
  6. class NotificationPage extends StatelessWidget {
  7. const NotificationPage({Key? key}) : super(key: key);
  8. static void startInstance({BuildContext? context}) {
  9. if (context != null) {
  10. context.router.push(const NotificationPageRoute());
  11. } else {
  12. appRouter.push(const NotificationPageRoute());
  13. }
  14. }
  15. @override
  16. Widget build(BuildContext context) {
  17. return Scaffold(
  18. appBar: AppBar(title: Text("NotificationPage")),
  19. body: Center(
  20. child: Text("Notification Page"),
  21. ),
  22. );
  23. }
  24. }