mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
chore: Update flutter to 3.27 and updated packages
This commit is contained in:
parent
e607a6d19b
commit
a817d40463
24 changed files with 3848 additions and 5051 deletions
|
|
@ -1,11 +1,13 @@
|
|||
import 'dart:io';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:extended_image/extended_image.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:fladder/providers/settings/book_viewer_settings_provider.dart';
|
||||
import 'package:fladder/screens/book_viewer/book_viewer_controls.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
class BookViewerReader extends ConsumerWidget {
|
||||
final int index;
|
||||
|
|
@ -112,7 +114,6 @@ class BookViewerReader extends ConsumerWidget {
|
|||
);
|
||||
},
|
||||
File(pages[index - 1]),
|
||||
enableMemoryCache: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
|||
|
||||
import 'package:flutter_custom_tabs/flutter_custom_tabs.dart' as customtab;
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:url_launcher/url_launcher.dart' as urllauncher;
|
||||
import 'package:url_launcher/url_launcher.dart' as urilauncher;
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import 'package:fladder/models/items/item_shared_models.dart';
|
||||
|
|
@ -49,26 +49,22 @@ Future<void> launchUrl(BuildContext context, String link) async {
|
|||
final Uri url = Uri.parse(link);
|
||||
|
||||
if (AdaptiveLayout.of(context).isDesktop) {
|
||||
if (!await urllauncher.launchUrl(url, mode: LaunchMode.externalApplication)) {
|
||||
if (!await urilauncher.launchUrl(url, mode: LaunchMode.externalApplication)) {
|
||||
throw Exception('Could not launch $url');
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
await customtab.launch(
|
||||
link,
|
||||
customTabsOption: customtab.CustomTabsOption(
|
||||
toolbarColor: Theme.of(context).primaryColor,
|
||||
enableDefaultShare: true,
|
||||
enableUrlBarHiding: true,
|
||||
showPageTitle: true,
|
||||
extraCustomTabs: const <String>[
|
||||
// ref. https://play.google.com/store/apps/details?id=org.mozilla.firefox
|
||||
'org.mozilla.firefox',
|
||||
// ref. https://play.google.com/store/apps/details?id=com.microsoft.emmx
|
||||
'com.microsoft.emmx',
|
||||
],
|
||||
await customtab.launchUrl(
|
||||
Uri.parse(link),
|
||||
customTabsOptions: customtab.CustomTabsOptions(
|
||||
colorSchemes: customtab.CustomTabsColorSchemes.defaults(
|
||||
toolbarColor: Theme.of(context).primaryColor,
|
||||
),
|
||||
urlBarHidingEnabled: true,
|
||||
shareState: customtab.CustomTabsShareState.browserDefault,
|
||||
showTitle: true,
|
||||
),
|
||||
safariVCOption: customtab.SafariViewControllerOption(
|
||||
safariVCOptions: customtab.SafariViewControllerOptions(
|
||||
preferredBarTintColor: Theme.of(context).primaryColor,
|
||||
preferredControlTintColor: Colors.white,
|
||||
barCollapsingEnabled: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue