Skip to content

Commit

Permalink
בעיה בתצוגת מספרי עמוד במסמך PDF
Browse files Browse the repository at this point in the history
Fixes #480
  • Loading branch information
Sivan22 committed Feb 5, 2025
1 parent 46d6945 commit 6b76f05
Showing 1 changed file with 18 additions and 24 deletions.
42 changes: 18 additions & 24 deletions lib/widgets/page_number_dispaly.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,37 +58,31 @@ class _PageNumberDisplayState extends State<PageNumberDisplay> {
@override
Widget build(BuildContext context) {
if (!widget.controller.isReady) {
return SizedBox(
width: 65,
child: Center(
child: Text(
"",
style: Theme.of(context).textTheme.titleMedium,
),
),
);
return SizedBox.shrink();
}

final pageNumber = widget.controller.pageNumber ?? 1;
final pageCount = widget.controller.pages.length;

return SizedBox(
width: 80,
return Center(
child: _isEditing
? TextField(
controller: _textController,
focusNode: _focusNode,
keyboardType: TextInputType.number,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleMedium,
decoration: InputDecoration(
contentPadding:
const EdgeInsets.symmetric(horizontal: 4, vertical: 0),
isDense: true,
hintText: '1-$pageCount',
border: const OutlineInputBorder(),
? SizedBox(
width: 80,
child: TextField(
controller: _textController,
focusNode: _focusNode,
keyboardType: TextInputType.number,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleMedium,
decoration: InputDecoration(
contentPadding:
const EdgeInsets.symmetric(horizontal: 4, vertical: 0),
isDense: true,
hintText: '1-$pageCount',
border: const OutlineInputBorder(),
),
onSubmitted: _handleSubmitted,
),
onSubmitted: _handleSubmitted,
)
: Center(
child: Tooltip(
Expand Down

0 comments on commit 6b76f05

Please sign in to comment.