-2
import 'package:flutter/material.dart';

import 'first_page.dart';
import 'second_page.dart';

void main() {

  runApp(MyApp());
}

class MyApp extends StatelessWidget {

  // This widget is the root of your application.
  
@override
  
Widget build(BuildContext context) {
  
  return MaterialApp(
  
    theme: ThemeData.dark().copyWith(
  
      primaryColor: Color(0xFF0A0E21),
  
    scaffoldBackgroundColor:Colors.black12,
  
    ),
  
   home: First_page(),
  
    routes: {
  
      '/zero': (context)=> First_page(),
  
      '/first':(context)=> Second_page(),
  
      //'/second':(context)=>Screen2(),
  
    },

  
  );
  
}

}
4

1 回答 1

0

请用 :

ThemeData(
       primaryColor: Color(0xFF0A0E21),
       scaffoldBackgroundColor:Colors.black12,
    ),
于 2021-03-17T05:33:31.427 回答