notification_page.dart 624 B

123456789101112131415161718192021222324
  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. @RoutePage()
  5. class NotificationPage extends StatelessWidget {
  6. const NotificationPage({Key? key}) : super(key: key);
  7. //启动当前页面
  8. static void startInstance({required BuildContext context}) {
  9. context.router.push(const NotificationPageRoute());
  10. }
  11. @override
  12. Widget build(BuildContext context) {
  13. return Scaffold(
  14. appBar: AppBar(title: Text("NotificationPage")),
  15. body: Center(
  16. child: Text("Notification Page"),
  17. ),
  18. );
  19. }
  20. }