Skip to content

Commit

Permalink
Fixes white screen issue on MacOS. Page turning not working yet. In t…
Browse files Browse the repository at this point in the history
…his version, we can open books but then no interaction works. Page turning should be doable with keyboard and maybe arrows at the bottom of the window...
  • Loading branch information
jmgeffroy committed Sep 2, 2024
1 parent 7ba09cd commit 46bc2fc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/navigator/lib/src/epub/widget/epub_navigator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:mno_navigator/epub.dart';
import 'package:mno_navigator/publication.dart';
Expand Down Expand Up @@ -67,14 +67,19 @@ class EpubNavigatorState extends PublicationNavigatorState<EpubNavigator> {
reverse: readerContext?.readingProgression?.isReverseOrder() ?? false,
itemCount: spine.length,
itemBuilder: (context, position) =>
(Platform.isAndroid || Platform.isIOS)
(Platform.isAndroid || Platform.isIOS || Platform.isMacOS)
? WebViewScreen(
address: serverState.address,
link: spine[position],
position: position,
readerContext: readerContext!,
publicationController: epubController,
)
: const SizedBox.shrink(),
: Center(
child: Text(
'Webview not implemented (yet) on this platform',
style: TextStyle(fontSize: 16, color: Colors.red),
),
),
);
}

0 comments on commit 46bc2fc

Please sign in to comment.