feat: custom horizontal preview

Closes #117

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-08 19:13:37 +08:00
parent 0b9d4d970a
commit 8d4294ba75
22 changed files with 255 additions and 97 deletions

View File

@@ -10,11 +10,13 @@ class DynamicPanel extends StatelessWidget {
final dynamic item;
final String? source;
final Function? onRemove;
final Function(List<String>, int)? callback;
DynamicPanel({
required this.item,
this.source,
this.onRemove,
this.callback,
super.key,
});
@@ -58,8 +60,8 @@ class DynamicPanel extends StatelessWidget {
),
if (item!.modules!.moduleDynamic!.desc != null ||
item!.modules!.moduleDynamic!.major != null)
Content(item: item, source: source),
forWard(item, context, _dynamicsController, source),
content(context, item, source, callback),
forWard(item, context, _dynamicsController, source, callback),
const SizedBox(height: 2),
if (source == null) ActionPanel(item: item),
],