android - 使用 Flutter 更改 TaskDescription 栏的颜色

标签 android android-activity flutter

有没有办法在 Flutter 应用中更改 TaskDescription 栏的颜色?

Here is a link到我正在努力实现的目标。

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {

    // Change the status bar color
    FlutterStatusbarcolor.setStatusBarColor(Colors.white);

    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'SMS 2 Server',
      color: Colors.white,
      theme: ThemeData(
        //brightness: Brightness.light,
        primarySwatch: primaryWhite,

        inputDecorationTheme: InputDecorationTheme(

        )
      ),
      home: HomePage(),
    );
  }
}

最佳答案

你可以这样做

Scaffold(
      appBar: new AppBar(
        backgroundColor: new Color(Color you want),
      ),
    );

  theme: ThemeData(
   primaryColor: YourExpected Color,
   )

关于android - 使用 Flutter 更改 TaskDescription 栏的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56649575/

相关文章:

android - 从后台线程调用 startActivity 且主线程被阻塞时,Activity 启动有延迟

android - 当我单击另一个自定义 ListView 项时填充自定义 ListView

flutter - 文本通过边框 flutter

dart - 在文本小部件中使用变量

android - 更改 Android 音频记录默认输入源

android - paypal initWithAppID() 应该是什么?

java - 检查动态创建的类是否是一个 Activity

java - 在 Eclipse 中使用 Git 会导致很多错误

java - Android findViewById()、getComponentName() 和 getSystemService() : Cannot make a static reference to a nonstatic field from type Activity

flutter - 如何在Flutter中增加计数器并禁用按钮?