binsaed / flutter_cached_pdfview Goto Github PK
View Code? Open in Web Editor NEWEnhanced PDF view for Flutter.
Home Page: https://pub.dev/packages/flutter_cached_pdfview
License: MIT License
Enhanced PDF view for Flutter.
Home Page: https://pub.dev/packages/flutter_cached_pdfview
License: MIT License
Describe the bug
Issue reported on Firebase crashlytics
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.github.barteksc.pdfviewer.PdfFile.getPageAtOffset(float, float)' on a null object reference
at com.github.barteksc.pdfviewer.DragPinchManager.checkLinkTapped(DragPinchManager.java:88)
at com.github.barteksc.pdfviewer.DragPinchManager.onSingleTapConfirmed(DragPinchManager.java:69)
at android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:300)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7425)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
I am to test in android system.
When I test the app on the emulator or real device, the view does not show the pdf.
Appears this error
D/com.shockwave.pdfium.PdfiumCore( 3943): Starting PdfiumAndroid 1.9.0
E/MethodChannel#flutter/platform_views( 3943): Failed to handle method call
E/MethodChannel#flutter/platform_views( 3943): java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
E/MethodChannel#flutter/platform_views( 3943): at io.endigo.plugins.pdfviewflutter.FlutterPDFView.getBoolean(FlutterPDFView.java:171)
E/MethodChannel#flutter/platform_views( 3943): at io.endigo.plugins.pdfviewflutter.FlutterPDFView.(FlutterPDFView.java:33)
E/MethodChannel#flutter/platform_views( 3943): at io.endigo.plugins.pdfviewflutter.PDFViewFactory.create(PDFViewFactory.java:22)
E/MethodChannel#flutter/platform_views( 3943): at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:179)
E/MethodChannel#flutter/platform_views( 3943): at android.app.Dialog.dispatchOnCreate(Dialog.java:389)
E/MethodChannel#flutter/platform_views( 3943): at android.app.Dialog.show(Dialog.java:293)
E/MethodChannel#flutter/platform_views( 3943): at android.app.Presentation.show(Presentation.java:235)
E/MethodChannel#flutter/platform_views( 3943): at io.flutter.plugin.platform.VirtualDisplayController.(VirtualDisplayController.java:94)
E/MethodChannel#flutter/platform_views( 3943): at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:47)
E/MethodChannel#flutter/platform_views( 3943): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:112)
E/MethodChannel#flutter/platform_views( 3943): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:95)
E/MethodChannel#flutter/platform_views( 3943): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:59)
E/MethodChannel#flutter/platform_views( 3943): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:226)
E/MethodChannel#flutter/platform_views( 3943): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter/platform_views( 3943): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:631)
E/MethodChannel#flutter/platform_views( 3943): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter/platform_views( 3943): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#flutter/platform_views( 3943): at android.os.Looper.loop(Looper.java:136)
E/MethodChannel#flutter/platform_views( 3943): at android.app.ActivityThread.main(ActivityThread.java:6077)
E/MethodChannel#flutter/platform_views( 3943): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views( 3943): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
E/MethodChannel#flutter/platform_views( 3943): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
E/flutter ( 3943): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference, null)
E/flutter ( 3943): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter ( 3943): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:18)
E/flutter ( 3943):
E/flutter ( 3943): #2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:329:12)
E/flutter ( 3943): #3 AndroidViewController._create (package:flutter/src/services/platform_views.dart:633:54)
E/flutter ( 3943): #4 AndroidViewController.setSize (package:flutter/src/services/platform_views.dart:550:14)
E/flutter ( 3943): #5 RenderAndroidView._sizePlatformView (package:flutter/src/rendering/platform_view.dart:175:29)
E/flutter ( 3943): #6 RenderAndroidView.performResize (package:flutter/src/rendering/platform_view.dart:156:5)
E/flutter ( 3943): #7 RenderObject.layout (package:flutter/src/rendering/object.dart:1746:9)
E/flutter ( 3943): #8 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:13)
E/flutter ( 3943): #9 RenderObject.layout (package:flutter/src/rendering/object.dart:1767:7)
E/flutter ( 3943): #10 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:171:11)
E/flutter ( 3943): #11 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:484:7)
E/flutter ( 3943): #12 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:240:7)
E/flutter ( 3943): #13 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:399:14)
E/flutter ( 3943): #14 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1630:7)
E/flutter ( 3943): #15 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:887:18)
E/flutter ( 3943): #16 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:402:19)
E/flutter ( 3943): #17 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:884:13)
E/flutter ( 3943): #18 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:284:5)
E/flutter ( 3943): #19 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1113:15)
E/flutter ( 3943): #20 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1052:9)
E/flutter ( 3943): #21 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:968:5)
E/flutter ( 3943): #22 _rootRun (dart:async/zone.dart:1184:13)
E/flutter ( 3943): #23 _CustomZone.run (dart:async/zone.dart:1077:19)
E/flutter ( 3943): #24 _CustomZone.runGuarded (dart:async/zone.dart:979:7)
E/flutter ( 3943): #25 _invoke (dart:ui/hooks.dart:261:10)
E/flutter ( 3943): #26 _drawFrame (dart:ui/hooks.dart:219:3)
E/flutter ( 3943):
D/ ( 3943): HostConnection::get() New Host Connection established 0x9aa91c80, tid 3955
D/ ( 3943): HostConnection::get() New Host Connection established 0x82734a80, tid 4021
D/ ( 3943): HostConnection::get() New Host Connection established 0x9aa91c00, tid 3952
Have you thought about the possibility of not only saving PDFs in cache, but also being able to save them in a database, such as sqllite data, in this package ...?
I dont know if this package have scroll handle . if yes kindly help me to set it in pdf view.
If this package don't have scroll handle, kindly add.
a blank screen is displayed when changing orientation
Steps to reproduce the behavior:
Expected behaviour
the pdf file should continue displaying
Smartphone (please complete the following information):
sample code
`
class PDFViewer extends StatefulWidget {
final String url;
PDFViewer({@required this.url});
@OverRide
_PDFViewerState createState() => _PDFViewerState();
}
class _PDFViewerState extends State {
@OverRide
Widget build(BuildContext context) {
return View(
builder: (context, model, child) {
return Scaffold(
body: SafeArea(
child: PDF(
nightMode: true,
onError: (error){
print("err");
print(error.toString());
}
).cachedFromUrl(
widget.url,
placeholder: (progress) => Center(child: Text('$progress %')),
errorWidget: (error) => Center(child: Text(error.toString())),
),
),
);
},
);
}
}`
Describe the bug
I have a Flutter application where I am placing the PDF widget as a Saffold body. The Scaffold header has a Widget which toggles between Light and Dark mode of the app. So the toggle is working perfectly for all Widgets on the page except flutter_chached_view pdf. On change of toggle switch, I toggle a boolean variable value which is assigned to night mode property i.e.
PDF(nighMode: _boolToggle)
So the application code calls set state on change in bool value which toggles night mode for all widgets but PDF doesn't toggle between the two modes. The file remains in the mode when the PDF widget was initiated and rendered for the first time. The user needs to go back to the previous page, change the theme and then open the pdf again to view the pdf as per the updated theme.
To Reproduce
Expected behaviour
On change of nightMode boolean value, the PDF view should be updated to show as per the updated mode.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
NA
I'm using cacheFromURL, and I want to get the cached filePath in order to use it with "Share".
I'm missing something, can't find the filePath property.
Please help.
App crashes while opening pdf. This is the log of error
fingerprint: 'samsung/j7popelteue/j7popelteue:8.1.0/M1AJQ/J727UUES8BTF3:user/release-keys'
Revision: '5'
ABI: 'arm'
pid: 5475, tid: 5475, name: .pdfdemo >>> com.example.pdf_demo<<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).
'
r0 00000000 r1 00001563 r2 00000006 r3 00000008
r4 00001563 r5 00001563 r6 ff8cb3e4 r7 0000010c
r8 00000000 r9 ff8cb540 sl 00000031 fp eccbbd90
ip ec851111 sp ff8cb3d0 lr ed3bbe53 pc ed3b5518 cpsr 20070030
backtrace:
#00 pc 0001a518 /system/lib/libc.so (abort+63)
#1 pc 000127c3 /data/app/com.example.pdf_demo-ry7VNoGr0K2Ce5_6tjwqQg==/lib/arm/libflutter.so (offset 0x1002000)
Hello, native_pdf_view already supports the web. Any possible timelines for your project to support web? :)
Is your feature request related to a problem? Please describe.
This is a request to add support for null safety to this package.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
See the migration guide for details about enabling null safety.
https://dart.dev/null-safety
https://dart.dev/null-safety/faq
Describe the bug
I can only change the Nightmode Setting only if I rebuild the complete App, if I do a hot Restart or Reload it does not change. I can also not set it to a variable and change that. (not by hardcoding it and also not with setState({})
To Reproduce
My Widget:
class PDFViewerPage extends StatefulWidget {
PDFViewerPage(this.url);
final url;
@override
_PDFViewerPageState createState() => _PDFViewerPageState(url);
}
class _PDFViewerPageState extends State<PDFViewerPage> {
_PDFViewerPageState(this.url);
final url;
final bool nightmode = true;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
body: PDF(
nightMode: nightmode,
).cachedFromUrl(
url,
placeholder: (progress) => Center(
child: SpinKitWave(
color: thomaeumRot,
),
),
errorWidget: (error) => ErrorMessageWidget(),
),
);
}
}
Desktop (please complete the following information):
Smartphone (please complete the following information):
I know the component is on the screen, because I put a key on your ancestor and verified that the ancestor was found
final PDFWidget = find.byType(PDF);
expect(PDFWidget, findsOneWidget);
return _WidgetTypeFinder:<zero widgets with type "PDF" (ignoring offstage widgets)
I'm using an iPhone 11, and I want to protect the text in side the PDF so that it can't be copied and shared.
how do turn off long tap so it can't copy text inside the pdf file when view in screen.?
Describe the bug
Unable to zoom-in the first page of PDF in iOS devices. Once we move to the second page and come back it can be zoomed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The pdf should be zoomable on the first page and on the initial load itself.
Smartphone (please complete the following information):
Describe the bug
When trying to get pdf from the network, the pdf gets loaded to 100% but only a white screen is shown instead of pdf itself.
I can see this error in the log.
To Reproduce
I am using the code to fetch pdf from the network from the example itself.
How about adding durability to save data in the cache?.
Like this package, you can add the time that files are stored in your cache.
Link: https://github.com/Baseflow/flutter_cache_manager/tree/develop/flutter_cache_manager
hi sir
In android version 4.4 pdf is not able to load. and show
Please fix the issue.
I use iPhone 11 for test my project.
I used onLinkHandle for handle value text link when click a link inside PDF File.
But always safari will open after click the link inside pdf file ( etc link is "https://pub.dev". )
Can I stop open safari browser after click link inside PDF File, and just get text link with onLinkHandle without open safari browser?
fromPath is not working
Please provide a example to load PDF fromPath as its not working for me
My Code is as below:
import 'package:flutter/material.dart';
import 'package:flutter_cached_pdfview/flutter_cached_pdfview.dart';
class PDFScreen extends StatelessWidget {
// static const String routeName = '/pdf_screen';
// final String path;
// PDFScreen({@required this.path});
@OverRide
Widget build(BuildContext context) {
final arguments = ModalRoute.of(context).settings.arguments;
print(arguments);
return Scaffold(
appBar: AppBar(
title: Text('PDF1'),
),
body: PDF().fromPath(
'/storage/emulated/0/Android/data/com.example.book_test/files/books/Book1.pdf'),
);
}
}
The above code should display the PDF but its is not
Please help me with the issue
Describe the bug
Before installing the plugin, my app was 26.3 Mb and After I install the ^0.2.8
version of this plugin the app size increased up to 44.6Mb on android
To Reproduce
Steps to reproduce the behavior:
Install the plugin and run flutter build apk --release
Expected behavior
There is at least an 18Mb gap between two builds. Is the plugin has this much size?
Desktop (please complete the following information):
Smartphone (please complete the following information):
How can I add pinch to Zoom?
It seems that it's enabled by default, but I can't get it to work.
Is there any special property I'm supposed to set to PDF()?
There is some solution for controlling the zoom, for more and for less.
Please, update dependencies, because right now I can't integrate the library:
Because ess_front depends on flutter_cached_pdfview ^0.3.5 which depends on path_provider ^1.6.27, path_provider ^1.6.27 is required.
So, because ess_front depends on path_provider ^2.0.1, version solving failed.
pub get failed (1; So, because ess_front depends on path_provider ^2.0.1, version solving failed.)
I can't lower path_provider, because file_picker uses a newer version.
Using this package adds up approximately 15 mb to my apk . Is there some optimization
It would be great if I could write mine own method to implement insted of open link from pdf immediately. Then ask user if he is sure to open that link.
Describe the solution you'd like
Provide own method to handle user click on links in pdf.
Is it super easy or will need extra effort? Let me know.
On android System version 9,show this error.
D/ (31775): Gralloc Register w:720, h:1344, f:0x1, usage:0x300, ui64Stamp:280791, sSize:3870720, line = 2106
D/com.shockwave.pdfium.PdfiumCore(31775): Starting PdfiumAndroid 1.9.0
D/ (31775): Gralloc Register w:720, h:1344, f:0x1, usage:0x300, ui64Stamp:280797, sSize:3870720, line = 2106
W/enhada.humbitec(31775): type=1400 audit(0.0:1419930): avc: denied { read } for name="u:object_r:jsonweb_default_prop:s0" dev="tmpfs" ino=12128 scontext=u:r:untrusted_app:s0:c229,c256,c512,c768 tcontext=u:object_r:jsonweb_default_prop:s0 tclass=file permissive=0
E/libc (31775): Access denied finding property "qemu.hw.mainkeys"
E/libc (31775): Access denied finding property "ro.vendor.hwui.texture_cache_size"
W/RenderThread(31775): type=1400 audit(0.0:1419931): avc: denied { read } for name="u:object_r:vendor_hwui_prop:s0" dev="tmpfs" ino=12177 scontext=u:r:untrusted_app:s0:c229,c256,c512,c768 tcontext=u:object_r:vendor_hwui_prop:s0 tclass=file permissive=0
D/OpenGLRenderer(31775): textureCacheSize 25165824
E/libc (31775): Access denied finding property "ro.vendor.hwui.texture_cache_size"
D/OpenGLRenderer(31775): textureCacheSize 25165824
W/RenderThread(31775): type=1400 audit(0.0:1419932): avc: denied { read } for name="u:object_r:vendor_hwui_prop:s0" dev="tmpfs" ino=12177 scontext=u:r:untrusted_app:s0:c229,c256,c512,c768 tcontext=u:object_r:vendor_hwui_prop:s0 tclass=file permissive=0
I/OpenGLRenderer(31775): queryNativeWindowStatus 0x87844808 query=0 dataspace=0
E/enhada.humbite(31775): No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2)
D/ (31775): Gralloc Register w:720, h:1344, f:0x1, usage:0xb00, ui64Stamp:280805, sSize:3870720, line = 2106
D/ (31775): Gralloc Register w:720, h:1344, f:0x1, usage:0xb00, ui64Stamp:280811, sSize:3870720, line = 2106
D/ (31775): Gralloc Register w:720, h:1344, f:0x1, usage:0x300, ui64Stamp:280813, sSize:3870720, line = 2106
On android System version 8,show this error.
D/com.shockwave.pdfium.PdfiumCore( 794): Starting PdfiumAndroid 1.9.0
D/mali_winsys( 794): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [540x888]-format:1
E/zygote ( 794): No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2)
I/zygote ( 794): Do partial code cache collection, code=61KB, data=58KB
I/zygote ( 794): After code cache collection, code=61KB, data=58KB
I/zygote ( 794): Increasing code cache capacity to 256KB
The package is very good, congratulations. I would like to know if it is possible to search for any word in the pdf, if so please could you guide me. Thanks
Describe the bug
When moving around the page, the renderer often keeps some areas blurry.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Text should be rendered cleary.
Screenshots
Smartphone (please complete the following information):
Could it be possible to add support of request headers when we preview a pdf from url?
Because some api requires authentification to download files...
Is your feature request related to a problem? Please describe.
I have a requirement whereby the users need to be provided with a draggable scrollbar. So dragging the scrollbar movement should synchronize page number in view. I tried using a draggable scrollbar plugin https://pub.dev/packages/draggable_scrollbar .
The above works in a way that DraggableScrollbar should be the parent widget of the underlying list (or pdf page in our case). The scrollable scrollbar provides a controller which needs to be passed to underlying list widget for maintaining synchronization of list position with the scroll bar position.
Since Cached_PdfView doesn't provide such controller property to which a scrollbar controller can be assigned.
Please provide a solution to the requirement which is an urgent business need. Alternatively, if there is already a solution, please direct me to the available resource to refer.
Describe the solution you'd like
The solution to the Draggable Scrollbar requirement which is integrated & synchronized with pdf view is needed.
Describe alternatives you've considered
No clear alternative found. Although I did try unsuccessfully to force-fit and integrate the 2 components that didn't work.
Additional context
NA
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
i this code that i used in our application i get zero for getting page count
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_cached_pdfview/flutter_cached_pdfview.dart';
import 'package:velocity_x/velocity_x.dart';
class ShowPdfFromUrl extends StatefulWidget {
final String pdfUrl;
final String productName;
ShowPdfFromUrl({@required this.pdfUrl, @required this.productName});
@override
_ShowPdfFromUrlState createState() => _ShowPdfFromUrlState();
}
class _ShowPdfFromUrlState extends State<ShowPdfFromUrl> {
final Completer<PDFViewController> _pdfViewController = Completer<PDFViewController>();
final ValueNotifier<int> _pageCount = ValueNotifier<int>(0);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
'${widget.productName}',
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
),
body: Stack(
children: [
PDF(
onViewCreated: (PDFViewController pdfViewController) async {
_pdfViewController.complete(pdfViewController);
_pageCount.value = await pdfViewController.getPageCount();
},
).cachedFromUrl(
'${widget.pdfUrl}',
placeholder: (progress) => Center(child: Text('Yükleniyor $progress % ...')),
errorWidget: (error) {
return Center(
child: Container(
width: context.screenWidth,
height: context.screenHeight,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text('PDF hatası indiriliyor'),
Padding(
padding: const EdgeInsets.only(top: 16.0),
child: OutlineButton(
onPressed: () {
setState(() {});
},
child: Text('lütfen tekrar deneyin'),
),
),
],
),
));
},
),
Positioned(
top: 8.0,
left: 8.0,
child: ValueListenableBuilder(
valueListenable: _pageCount,
builder: (_,value,__){
return Container(
padding: EdgeInsets.all(8.0),
color: Colors.black,
child: Text('($value)',style: TextStyle(
color: Colors.white,
),),
);
},
),
),
],
),
);
}
}
ok, so once i try to run the app this happen...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Launching lib\main.dart on G011A in debug mode...
lib\main.dart
√ Built build\app\outputs\flutter-apk\app-debug.apk.
E/FlutterLoader(11738): Flutter initialization failed.
E/FlutterLoader(11738): java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.int2.ecommerce_int2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.int2.ecommerce_int2-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libflutter.so"
E/FlutterLoader(11738): at java.util.concurrent.FutureTask.report(FutureTask.java:93)
E/FlutterLoader(11738): at java.util.concurrent.FutureTask.get(FutureTask.java:163)
E/FlutterLoader(11738): at io.flutter.embedding.engine.loader.FlutterLoader.ensureInitializationComplete(FlutterLoader.java:178)
E/FlutterLoader(11738): at io.flutter.view.FlutterMain.ensureInitializationComplete(FlutterMain.java:78)
E/FlutterLoader(11738): at io.flutter.app.FlutterActivityDelegate.onCreate(FlutterActivityDelegate.java:145)
E/FlutterLoader(11738): at io.flutter.app.FlutterActivity.onCreate(FlutterActivity.java:91)
E/FlutterLoader(11738): at com.int2.ecommerce_int2.MainActivity.onCreate(MainActivity.kt:10)
E/FlutterLoader(11738): at android.app.Activity.performCreate(Activity.java:5990)
E/FlutterLoader(11738): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
E/FlutterLoader(11738): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
E/FlutterLoader(11738): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
E/FlutterLoader(11738): at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/FlutterLoader(11738): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
E/FlutterLoader(11738): at android.os.Handler.dispatchMessage(Handler.java:102)
E/FlutterLoader(11738): at android.os.Looper.loop(Looper.java:135)
E/FlutterLoader(11738): at android.app.ActivityThread.main(ActivityThread.java:5254)
E/FlutterLoader(11738): at java.lang.reflect.Method.invoke(Native Method)
E/FlutterLoader(11738): at java.lang.reflect.Method.invoke(Method.java:372)
E/FlutterLoader(11738): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/FlutterLoader(11738): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
E/FlutterLoader(11738): Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.int2.ecommerce_int2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.int2.ecommerce_int2-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libflutter.so"
E/FlutterLoader(11738): at java.lang.Runtime.loadLibrary(Runtime.java:366)
E/FlutterLoader(11738): at java.lang.System.loadLibrary(System.java:988)
E/FlutterLoader(11738): at io.flutter.embedding.engine.loader.FlutterLoader$1.call(FlutterLoader.java:129)
E/FlutterLoader(11738): at io.flutter.embedding.engine.loader.FlutterLoader$1.call(FlutterLoader.java:123)
E/FlutterLoader(11738): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
E/FlutterLoader(11738): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/FlutterLoader(11738): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/FlutterLoader(11738): at java.lang.Thread.run(Thread.java:818)
E/AndroidRuntime(11738): FATAL EXCEPTION: main
E/AndroidRuntime(11738): Process: com.int2.ecommerce_int2, PID: 11738
E/AndroidRuntime(11738): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.int2.ecommerce_int2/com.int2.ecommerce_int2.MainActivity}: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.int2.ecommerce_int2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.int2.ecommerce_int2-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libflutter.so"
E/AndroidRuntime(11738): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
E/AndroidRuntime(11738): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
E/AndroidRuntime(11738): at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/AndroidRuntime(11738): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
E/AndroidRuntime(11738): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(11738): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(11738): at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime(11738): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(11738): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(11738): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime(11738): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
E/AndroidRuntime(11738): Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.int2.ecommerce_int2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.int2.ecommerce_int2-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libflutter.so"
E/AndroidRuntime(11738): at io.flutter.embedding.engine.loader.FlutterLoader.ensureInitializationComplete(FlutterLoader.java:243)
E/AndroidRuntime(11738): at io.flutter.view.FlutterMain.ensureInitializationComplete(FlutterMain.java:78)
E/AndroidRuntime(11738): at io.flutter.app.FlutterActivityDelegate.onCreate(FlutterActivityDelegate.java:145)
E/AndroidRuntime(11738): at io.flutter.app.FlutterActivity.onCreate(FlutterActivity.java:91)
E/AndroidRuntime(11738): at com.int2.ecommerce_int2.MainActivity.onCreate(MainActivity.kt:10)
E/AndroidRuntime(11738): at android.app.Activity.performCreate(Activity.java:5990)
E/AndroidRuntime(11738): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
E/AndroidRuntime(11738): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
E/AndroidRuntime(11738): ... 10 more
E/AndroidRuntime(11738): Caused by: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.int2.ecommerce_int2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.int2.ecommerce_int2-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libflutter.so"
E/AndroidRuntime(11738): at java.util.concurrent.FutureTask.report(FutureTask.java:93)
E/AndroidRuntime(11738): at java.util.concurrent.FutureTask.get(FutureTask.java:163)
E/AndroidRuntime(11738): at io.flutter.embedding.engine.loader.FlutterLoader.ensureInitializationComplete(FlutterLoader.java:178)
E/AndroidRuntime(11738): ... 17 more
E/AndroidRuntime(11738): Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.int2.ecommerce_int2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.int2.ecommerce_int2-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libflutter.so"
E/AndroidRuntime(11738): at java.lang.Runtime.loadLibrary(Runtime.java:366)
E/AndroidRuntime(11738): at java.lang.System.loadLibrary(System.java:988)
E/AndroidRuntime(11738): at io.flutter.embedding.engine.loader.FlutterLoader$1.call(FlutterLoader.java:129)
E/AndroidRuntime(11738): at io.flutter.embedding.engine.loader.FlutterLoader$1.call(FlutterLoader.java:123)
E/AndroidRuntime(11738): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
E/AndroidRuntime(11738): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/AndroidRuntime(11738): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/AndroidRuntime(11738): at java.lang.Thread.run(Thread.java:818)
Exited (1)
the problem will be gone by disabling "flutter_cached_pdfview: ^0.3.3" in pubspec.yamel
thank you.
Describe the bug
java.io.IOException: cannot create document: File not in PDF format or corrupted.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
I expected the pdf to load again on the same default page
PDF link:
https://www.dbc.mandhdevelopments.co.za/system/qrcode/qrcode.php?id=19
Describe the bug
On an Android device when open the keyboard it causes pdf to show nothing.
To Reproduce
Steps to reproduce the behaviour:
Smartphone (please complete the following information):
Additional context
NA
在iOS中调用setPage
返回的是当前的page,但是Android和flutter中解析的都是bool值;FlutterPDFView.m
返回需要修改为true
- (void)setPage:(FlutterMethodCall*)call result:(FlutterResult)result {
NSDictionary<NSString*, NSNumber*>* arguments = [call arguments];
NSNumber* page = arguments[@"page"];
[_pdfView goToPage: [_pdfView.document pageAtIndex: page.unsignedLongValue ]];
result(YES);
}
This is awesome plugin, It's working fine when running on the emulator but I have some issue when released app to pay store, it show the error app has stopped when pdf view try to loading,
thought might need to add this line "-keep class com.shockwave.**" but not sure where need to add it,
could you please advise, thank you.
I like this plug-in very much, which saves me a lot of time. For example, I want to share online pdf. How can I operate it?
Describe the bug
While in iOS it is possible to select, mark, and copy text from inside the PDF_View, I am unable to do so on Android.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Text gets marked/selected.
Smartphone (please complete the following information):
OS: Android
Once the Pdf will download it displays correctly but after screen will rotate it displays as blank screen even after I will return to previous rotation screen. Is there some option I can provide or is it someting on my side?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Blank screen instead of pdf document.
Video
https://streamable.com/8hk3jv
Screenshot of code
https://prnt.sc/trly4l
This is an awesome plugin for pdf viewer in a flutter, It looks clean and easy to implement, I have tried many plugins on "pub.dev", May I ask some question how can we show page total and page controller Could you please advise.
The pdf from URL is already cached by the package, so it would be super convenient to be able to share and print that cached pdf.
is any solution store current page and navigate that to restore?
you suppose we need to read pdf from latest page which we see and read it
In the DownloadIndicator class, if Text ('Downloading ...') appears, you should have the programmer's option to write whatever he wants in place of "Downloading".
So Text ('Downloading ...'), it should just be a Widget, which for anyone who wants to use the library should, put whatever he wants, while downloading the pdf ...
It may be the case that in place of Text ('Downloading ...'), I want to put a Gif ... or something else ...
Do you understand what I want?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.