简体   繁体   English

Flutter 条码_扫描变色

[英]Flutter barcode_scan change color

I am trying to change the color of the flutter barcode scanner :我正在尝试更改 flutter条码扫描仪的颜色:

在此处输入图像描述

I want to change the yellow and the gray color of the top bar.我想更改顶部栏的黄色和灰色。

I already tried to do something with the ScanOptions:我已经尝试使用 ScanOptions 做一些事情:

void barcode() async {

  var options = ScanOptions(
    
  );

  var result = await BarcodeScanner.scan();
  print(result.rawContent);

}

I couldn't find anything for this in the internet.我在互联网上找不到任何东西。

Thank you for your help!谢谢您的帮助!

Unfortunately this barcode scanner does not have any options for changing the color of Option menu不幸的是,此条码扫描仪没有任何更改选项菜单颜色的选项

but if you want you can change it from android manifest: add theme in the application tag of manifest and change the color of popupMenu from theme但如果你愿意,你可以从 android 清单中更改它:在清单的应用程序标签中添加主题并从主题更改 popupMenu 的颜色

 <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="My App"
        android:theme="@style/LaunchTheme"
        android:icon="@mipmap/ic_launcher">
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM