小编Zve*_*r64的帖子

如何覆盖应用程序的一部分主题?

我有一个小型 Flutter 应用程序,其主题配置如下:

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  static final list = [
    {
      'name': 'test',
      'password': 'foobar'
    }
  ];
  final store = Store(appStateReducers, initialState: AppState(list));
  @override
  Widget build(BuildContext context) {
    return StoreProvider(
      store: store,
      child: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.red,
          appBarTheme: AppBarTheme(
            color: Color.fromRGBO(250, 136, 54, 1)
          ),
          textTheme: TextTheme(
            body1: TextStyle(
              color: Colors.red // text color is red for the whole applicatioin
            )
          )
        ),
        initialRoute: …
Run Code Online (Sandbox Code Playgroud)

android dart flutter

5
推荐指数
1
解决办法
4921
查看次数

标签 统计

android ×1

dart ×1

flutter ×1