Closed thanglq1 closed 2 months ago
Thank you @hm21
Hi @hm21. I'm trying to use the default FilterEditor, but it doesn't work. Please help explain.
filterEditor: CustomWidgetsFilterEditor(
appBar: (filterEditor, rebuildStream) => ReactiveCustomAppbar(
stream: rebuildStream,
builder: (_) => _appBarFilterEditor(filterEditor),
),
filterButton: (
filter,
isSelected,
scaleFactor,
onSelectFilter,
editorImage,
filterKey,
) {
return WhatsAppFilterBtn(
filter: filter,
isSelected: isSelected,
onSelectFilter: () {
onSelectFilter.call();
editorKey.currentState?.setState(() {});
},
editorImage: editorImage,
filterKey: filterKey,
scaleFactor: scaleFactor,
);
},
),
I'm not sure what didn't work because you didn't mention it. But what I saw is that you are invoking the wrong editor. In the WhatsApp example, the filter editor is inside the main editor, but in the default example, the filter editor is standalone. You can access the filter editor like below:
filterEditor: CustomWidgetsFilterEditor(
filterButton: (
filter,
isSelected,
scaleFactor,
onSelectFilter,
editorImage,
filterKey,
) {
return WhatsAppFilterBtn(
filter: filter,
isSelected: isSelected,
onSelectFilter: () {
onSelectFilter.call();
editorKey.currentState?.filterEditor.currentState
?.setState(() {});
},
editorImage: editorImage,
filterKey: filterKey,
scaleFactor: scaleFactor ?? 1,
);
},
),
Hi @hm21. Thank you so much. You are right. I'm using wrong editor.
Platforms
Android, iOS
Description
It would be nice if we could highlight the selected filter item. Please add configuration options for border width and border color for it.![Simulator Screenshot - iPhone SE (3rd generation) - 2024-06-23 at 22 03 52](https://github.com/hm21/pro_image_editor/assets/26729342/10d11683-2cd6-4977-8625-661f621d7eda)
Why
No response