main.dart 811 B

12345678910111213141516171819202122232425262728293031
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:taskservice/src/crtacc/page_crtacc.dart';
  4. import 'package:taskservice/src/home/home.dart';
  5. void main() {
  6. runApp(MyApp());
  7. }
  8. class MyApp extends StatelessWidget {
  9. // This widget is the root of your application.
  10. @override
  11. Widget build(BuildContext context) {
  12. return MaterialApp(
  13. onGenerateRoute: (RouteSettings settings){
  14. var name = settings.name;
  15. if(name == '$CreateAccPage') {
  16. return CupertinoPageRoute(builder: (context)=> CreateAccPage());
  17. }
  18. return null;
  19. },
  20. theme: ThemeData(
  21. primarySwatch: Colors.blue,
  22. visualDensity: VisualDensity.adaptivePlatformDensity,
  23. ),
  24. home: MyHomePage(title: 'JXZS',),
  25. );
  26. }
  27. }