Flutter 如何编辑flappy_search_bar颤振包?

Flutter 如何编辑flappy_search_bar颤振包?,flutter,flutter-layout,flutter-dependencies,Flutter,Flutter Layout,Flutter Dependencies,我想编辑的一些功能 正如您看到的,加载微调器是蓝色的,我似乎无法将其编辑为任何其他颜色。我也无法编辑同样为蓝色的光标颜色 这是我当前代码块的副本: @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: SearchBar<Post>( searchBarPadding: EdgeInsets.symme

我想编辑的一些功能

正如您看到的,加载微调器是蓝色的,我似乎无法将其编辑为任何其他颜色。我也无法编辑同样为蓝色的光标颜色

这是我当前代码块的副本:

 @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: SearchBar<Post>(
          searchBarPadding: EdgeInsets.symmetric(horizontal: 20),
          headerPadding: EdgeInsets.symmetric(horizontal: 10),
          listPadding: EdgeInsets.symmetric(horizontal: 10),
          onSearch: _getALlPosts,
          hintStyle: TextStyle(color: Colors.black87),
          hintText: 'Search',
          iconActiveColor: Colors.deepPurpleAccent,
//          cursorColor: Colors.deepPurpleAccent,
//          loader: Colors.deepPurpleAccent,
          textStyle: TextStyle(
            fontFamily: 'OpenSans',
            fontSize: 18.0,
          ),`
我也尝试过直接编辑软件包文件,但也没有成功


有人建议如何编辑flappy_search_bar包的光标颜色和加载微调器颜色吗

我也一直在尝试这样做,并成功地完成了

要编辑光标,请将以下内容应用于主题数据下的顶级MaterialApp:

cursorColor: Colors.red,
cupertinoOverrideTheme: CupertinoThemeData(
    primaryColor: Colors.red,
),
这将在所有文本字段中设置光标的颜色,我不知道如何仅为
flappy\u search\u bar
小部件中的文本字段编辑它

对于加载指示,请将其添加到您正在使用的
搜索栏下:

SearchBar<SomeClass>(
....
loader: const Center(child: CircularProgressIndicator(valueColor: AlwaysStoppedAnimation<Color>(Colors.red))),
....
);
搜索栏(
....
加载器:常量中心(子项:循环加载器指示器(值颜色:AlwaysStoppedAnimation(Colors.red)),
....
);
如果您查看源代码,这就是小部件内部所做的。 更改
颜色。红色
为您需要的任何颜色


希望能有所帮助。

非常感谢您的尝试!加载程序现在加载所需的颜色。我仍然无法在搜索栏文本字段中编辑光标。您还有其他建议吗?您是否尝试过更新
主题数据下MaterialApp中的cursorColor,如上所示?这就是我的工作!
SearchBar<SomeClass>(
....
loader: const Center(child: CircularProgressIndicator(valueColor: AlwaysStoppedAnimation<Color>(Colors.red))),
....
);