import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:taskservice/src/crtacc/page_crtacc.dart'; import 'package:taskservice/src/home/home.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( onGenerateRoute: (RouteSettings settings){ var name = settings.name; if(name == '$CreateAccPage') { return CupertinoPageRoute(builder: (context)=> CreateAccPage()); } return null; }, theme: ThemeData( primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, ), home: MyHomePage(title: 'JXZS',), ); } }