我试着将应用程序的背景 colored颜色 改为黑色,目前它是黑色的,但不是一片漆黑.这是我的代码
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData.dark().copyWith(
colorScheme: const ColorScheme.dark().copyWith(background: Colors.black),
),
title: "Test",
home: Scaffold(body: Center(child: Text("Test"))),
);
}
}
我到底做错了什么?