Skip to content

Commit

Permalink
Fix missing scrolling in export pdf select dialogs, closes #633
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Mar 18, 2024
1 parent 5819d83 commit cdae317
Show file tree
Hide file tree
Showing 6 changed files with 638 additions and 522 deletions.
62 changes: 33 additions & 29 deletions app/lib/dialogs/export/pdf.dart
Original file line number Diff line number Diff line change
Expand Up @@ -268,34 +268,38 @@ class _AreaSelectionDialogState extends State<_AreaSelectionDialog> {
),
),
Flexible(
child: BlocBuilder<DocumentBloc, DocumentState>(
buildWhen: (previous, current) =>
previous.page != current.page ||
previous.pageName != current.pageName,
builder: (context, state) => Column(
mainAxisSize: MainAxisSize.min,
children: widget.document
.getPages()
.expand(
(page) =>
(page == state.pageName
? state.page
: widget.document.getPage(page))
?.areas
.where((element) =>
element.name.contains(_searchQuery))
.map((e) {
return ListTile(
title: Text(e.name),
subtitle: Text(page),
onTap: () =>
Navigator.of(context).pop((page, e)),
);
}).toList() ??
<Widget>[],
)
.toList(),
)),
child: Material(
type: MaterialType.transparency,
child: BlocBuilder<DocumentBloc, DocumentState>(
buildWhen: (previous, current) =>
previous.page != current.page ||
previous.pageName != current.pageName,
builder: (context, state) => ListView(
shrinkWrap: true,
children: widget.document
.getPages()
.expand(
(page) =>
(page == state.pageName
? state.page
: widget.document.getPage(page))
?.areas
.where((element) =>
element.name.contains(_searchQuery))
.map((e) {
return ListTile(
title: Text(e.name),
subtitle: Text(page),
key: ObjectKey(e.name),
onTap: () =>
Navigator.of(context).pop((page, e)),
);
}).toList() ??
<Widget>[],
)
.toList(),
)),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
Expand Down Expand Up @@ -367,7 +371,7 @@ class _ExportPresetsDialogState extends State<ExportPresetsDialog> {
child: BlocBuilder<DocumentBloc, DocumentState>(
builder: (context, state) {
if (state is! DocumentLoadSuccess) return Container();
return Column(mainAxisSize: MainAxisSize.min, children: [
return ListView(shrinkWrap: true, children: [
...state.info.exportPresets
.where((element) => element.name.contains(_searchQuery))
.map((e) => Dismissible(
Expand Down
4 changes: 2 additions & 2 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_native_splash
sha256: "558f10070f03ee71f850a78f7136ab239a67636a294a44a06b6b7345178edb1e"
sha256: edf39bcf4d74aca1eb2c1e43c3e445fd9f494013df7f0da752fefe72020eedc0
url: "https://pub.dev"
source: hosted
version: "2.3.10"
version: "2.4.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dependencies:
device_info_plus: ^9.1.2
image: ^4.1.7
dev_dependencies:
flutter_native_splash: ^2.3.10
flutter_native_splash: ^2.4.0
#flutter_launcher_icons: ^0.11.0
flutter_lints: ^3.0.1
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@docusaurus/theme-common": "3.1.1",
"@mdx-js/react": "^3.0.1",
"@phosphor-icons/react": "^2.0.15",
"@swc/core": "^1.4.6",
"@swc/core": "^1.4.8",
"animate.css": "^4.1.1",
"clsx": "^2.1.0",
"node-fetch": "^3.3.2",
Expand Down
Loading

0 comments on commit cdae317

Please sign in to comment.