Git Product home page Git Product logo

flutter_fullpdfview's Introduction

Hello World 👋!

Uncle bob said "Clean code reads like well-written prose", so why not reading my README.md like you read clean code

library arnaudelub;

export 'welcome/my_name_is_arnaud_delubac';
export 'fully_remote_worker/as_freelance/at_idelub';
export 'cross_plaform_developer/flutter';
export 'experienced_in_ecommerce';
export 'my_editor/vim_4_ever/nvim';
export 'my_os/linux_4_ever/manjaro';
part 'my_career.dart';
const oneYearExperience = '1 year of experience';
const twinapp = 'Twinapp';
const findo = 'Findo';
const elPuntAvui = 'El Punt Avui';
const reliqium = 'Reliqium';
const k8s = 'Kubernetes';
const docker = 'docker';
const azureCloud = 'Azure Cloud';
const typescript = 'typescript';

abstract class MyExperienceAsAFlutterDeveloper {
    bool wasAFlutterDeveloperAtInteractiuImpactedMyCareer();
    @deprecated
    void isAFlutterDeveloperFreelancerAtIDelub();
    @deprecated
    Future<void> willBeCTOAndCoFounderAtFindo();
    void isAJuniorArchitectAtNexplore();
}

/*
 * Quick Note, this class is a lazy singleton, but to avoid any missunderstanding,
 * i am neither lazy nor single!
**/
@LazySingleton(as: MyExperienceAsAFlutterDeveloper)
class MyExperienceAsAFlutterDeveloperImplementation implements MyExperienceAsAFlutterDeveloper {
    final MyCareerRepository _myCareerRepository;
    const MyExperienceAsAFlutterDeveloperImplementation(this._myCareerRepository);
    
    @override
    bool wasAFlutterDeveloperAtInteractiuImpactedMyCareer() {
        _myCareerRepository.addProjectDone(twinapp);
        final bool myFirstAttemptWithFlutterSucceeded = _myCareerRepository.isPublishedAndWorking(twinapp);
        final didILovedIt = true;
        _myCareerRepository.addExperience(oneYearExperience);
        return myFirstAttemptWithFlutterSucceed && didILovedIt;
    }
    
    @override
    void isAFlutterDeveloperFreelancerAtIDelub(){
        _myCareerRepository.addProjectDone(elPuntAvui);
        final today = DateTime.now();
        final startDateAsFreelance = DateTime(2020, 04, 01);
        final int numberOfYears = today.difference(startDateAsFreelance).inYears;
        final year = "year${numberOfYears > 1 ? 's' : ''}";
        _myCareerRepository.addExperience("$numberOfYears $year of experience");
    }
    
    @override
    Future<bool> willBeCTOAndCoFounderAtFindo() async {
        _myCareerRepository.addProjectDone(findo);
        final myLastProjectSucceeded = await _myCareerRepository.isPublishedAndWorking(hero);
        _myCareerRepository.canLevelUp(myLastProjectSucceeded);
        return myLastProjectSucceeded;
    }
    
    @override
    void isAJuniorArchitectAtNexplore() {
        _myCareerRepository.addNewTechStack(k8s)..addNewTechstack(docker)
            ..addNewTechStack(azureCloud)..addNewTechStack(typescript)
        final startDateAsFullStack = DateTime(2021, 03, 01);
        final startDateAsJrArchitect = DateTime(2022, 09, 01);
        final int numberOfYears = today.difference(startDateAsJrArchitect).inYears;
        final year = "year${numberOfYears > 1 ? 's' : ''}";
        _myCareerRepository.addExperience("1 year as fullstack (TS, Flutter, React)")
            ..addExperience("$numberOfYears $year of experience as Jr Architect");
    }
}

extension MyFlutterAppsAndPackages on Flutter {
    List<String> get developedApp => [
        Reliqium,
        Twinapp,
        ElPuntAvui
        Findo,
        Ecohint];
    List<String> get developedPackages => [flutter_fullpdfview, csv_picker_button, flutter_firebase_aut_facade];
}

extension MyLearningPath on AzureCloud {
    List<String> get earnedCertificates => [];
    List<String> get certsPass => [
        AZ-900-Azure-Fundamental,
        AZ-204-Azure-developer,
        AZ-104-Azure-administrator-associate,
        AZ-400-Azure-devops-engineer
    ];
}

My pubspec.yaml:

dependencies:
    - Typescript: 2+
    - Flutter: 4+
    - Python: 6+
    - Angular: 3+
    - Java: 1+
    - Kubernetes: 1+
    - Docker: 1+
    - Azure Cloud: 1+
Links

My articles

Dart isolate and Flutter Compute
Give your main thread som breath!
Flutter and NFC
Control you NFC chip with flutter
Flutter and Firebase Login
All you need to know about Firebase authentication with Flutter (Spanish only)
debounceTime from RxDart and Bloc
Use Rxdart's debounceTime with Bloc (En, Fr, Es)
Flutter, Bloc and Firestore stream
Controle Firestore's stream with Bloc

My open source projects

Flutterence Open source Project, so it can evolve thanks to the community and for the community!
Anyone who want to contribute is welcome to contact me
csv_picker_button Pub Version Load and read you CSV!
Parse your CSV data from a simple button
firebase auth facade Pub Version Login with Firebase!
All the power from firebase authentication in a simple plugin!

flutter_fullpdfview's People

Contributors

arnaudelub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

flutter_fullpdfview's Issues

ios platform downgrade

Hi,

it's possible downgrade
s.platform = :ios, '11.0' to s.platform = :ios, '9.0'

Best Regards

Unable to create PDF

I was creating a PDF file with the help of the PDF dependency & creating a file. Passed that file to the PDFView but getting an error stating as

E/flutter ( 7509): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: plugins.endigo.io/pdfview
E/flutter ( 7509): 	at io.flutter.plugin.platform.PlatformViewsController$1.createVirtualDisplayForPlatformView(PlatformViewsController.java:197)
E/flutter ( 7509): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:107)
E/flutter ( 7509): 	at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:59)
E/flutter ( 7509): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/flutter ( 7509): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:178)
E/flutter ( 7509): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$handleMessageFromDart$0$DartMessenger(DartMessenger.java:206)
E/flutter ( 7509): 	at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$6ZD1MYkhaLxyPjtoFDxe45u43DI.run(Unknown Source:12)
E/flutter ( 7509): 	at android.os.Handler.handleCallback(Handler.java:938)
E/flutter ( 7509): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter ( 7509): 	at android.os.Looper.loop(Looper.java:246)
E/flutter ( 7509): 	at android.app.ActivityThread.main(ActivityThread.java:8633)
E/flutter ( 7509): 	at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 7509): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
E/flutter ( 7509): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
E/flutter ( 7509): , null, null)
E/flutter ( 7509): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter ( 7509): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18)
E/flutter ( 7509): <asynchronous suspension>
E/flutter ( 7509): #2      TextureAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1061:18)
E/flutter ( 7509): <asynchronous suspension>
E/flutter ( 7509): #3      AndroidViewController.create (package:flutter/src/services/platform_views.dart:771:5)
E/flutter ( 7509): <asynchronous suspension>
E/flutter ( 7509): #4      RenderAndroidView._sizePlatformView (package:flutter/src/rendering/platform_view.dart:191:7)
E/flutter ( 7509): <asynchronous suspension>
E/flutter ( 7509): 

swipeHorizontal true persists on IOS even when set to false. i want vertical scroll only

Vertical scroll working fine on android but turns to horizontal scroll on IOS.

PDFView(
filePath: widget.path,
fitEachPage: true,
dualPageMode: true,
enableSwipe: true,
swipeHorizontal: false,
autoSpacing: false,
pageFling: true,
defaultPage: 1,
pageSnap: true,
onRender: (_pages) {
print("OK RENDERED!!!!!");
setState(() {
pages = _pages;
isReady = true;
});
},
onError: (error) {
setState(() {
errorMessage = error.toString();
});
print(error.toString());
},
onPageError: (page, error) {
setState(() {
errorMessage = '$page: ${error.toString()}';
});
print('$page: ${error.toString()}');
},
onViewCreated: (PDFViewController pdfViewController) {
_controller.complete(pdfViewController);
},
onPageChanged: (int page, int total) {
print('page change: $page/$total');
},
)

JumpToPage Web throws an Exception

Calling jumpToPage with Flutter web it does not work

final pdfController = PdfController(
      document: PdfDocument.openAsset('assets/mypdf.pdf'),
);
return PdfView(
      controller: pdfController,
      scrollDirection: Axis.vertical,
      onDocumentLoaded: (_) => pdfController.jumpToPage(3),
);

Exception:
InternalError: frontend server failed to compile '_positions' Error: Expected a value of type 'Exception', but got one of type 'AssertionErrorImpl' at Object.throw_ [as throw] (http://localhost:59065/dart_sdk.js:4336:11) at Object.castError (http://localhost:59065/dart_sdk.js:4307:15) at Object.cast [as as] (http://localhost:59065/dart_sdk.js:4623:17) at dart.LegacyType.new.as (http://localhost:59065/dart_sdk.js:6192:60) at http://localhost:59065/packages/native_pdf_view/src/native_pdf_view.dart.lib.js:1261:46 at native_pdf_view.PdfController.new._loadDocument (http://localhost:59065/packages/native_pdf_view/src/native_pdf_view.dart.lib.js:1264:13) at _loadDocument.next (<anonymous>) at http://localhost:59065/dart_sdk.js:37672:33 at _RootZone.runUnary (http://localhost:59065/dart_sdk.js:37526:58) at _FutureListener.thenAwait.handleValue (http://localhost:59065/dart_sdk.js:32500:29) at handleValueCallback (http://localhost:59065/dart_sdk.js:33047:49) at Function._propagateToListeners (http://localhost:59065/dart_sdk.js:33085:17) at _Future.new.[_completeWithValue] (http://localhost:59065/dart_sdk.js:32928:23) at async._AsyncCallbackEntry.new.callback (http://localhost:59065/dart_sdk.js:32950:35) at Object._microtaskLoop (http://localhost:59065/dart_sdk.js:37787:13) at _startMicrotaskLoop (http://localhost:59065/dart_sdk.js:37793:13) at http://localhost:59065/dart_sdk.js:33302:9

Android embedding

Using v. 1.1.5 and getting a deprecation warning about Android embedding:

"The plugin flutter_fullpdfview uses a deprecated version of the Android embedding." Still works for the moment, but update needed.

Links inside pdf leads to crashing when tapped

I just put a link inside a pdf it works fine on desktop, but in my app these links just crashes the application with following errors:-

Screenshot_2020-07-07-09-31-07-419_com google android apps playconsole

Screenshot_2020-07-07-09-31-58-015_com google android apps playconsole

Sir its my humble request., please help because links are crucial part of documents...

PDF is blank after using share sheet

PDF is blank after using share sheet to email a pdf and then returning to the app

console logs "Destroy FPDF library" upon return

not sure how to fix

Double tap zoom not detected by onZoomChanged

I was implementing custom zooming but found out that when we double tap then PDFView automatically zooms the page, but this thing is not detected by the onZoomChanged method and when we zoom via pdfController it starts from the initial zoom value.
Update
I have tested this in Android emulator and it is working fine there, but not working in iOS simulator.

Getting PDF Pages in Landscape to be Separate

Hello,
In Portrait, the PDF pages are separated but while in Landscape, the pages can't be separated making the pdf page look more like a slideshow...
I can't get the pages to the separated when in Landscape or I'm doing something wrong.

Enhancement - Make the pdf Searchable

Hi there, I am wondering if you will be supporting a Search Function in up coming releases?

I think that this would be Immensely useful!

Thank you

Gesture Recognizers doesnt works.

Gesture Recognizers doesnt works.

This is how i tried to use it:

gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>[ Factory<TapGestureRecognizer>( () => new TapGestureRecognizer() ..onTap = () { debugPrint("Tap PDF View!"); }, ), ].toSet(),

Background color

how can i add new background color what i want. could you help me please ?

i add there but it's not working me .

enum bgcolors { BLACK, GREY, WHITE, CYAN, BLUE }

static String convertTtoString(bgcolors bg) {
    switch (bg) {
      case bgcolors.BLACK:
        return 'black';
      case bgcolors.GREY:
        return 'grey';
      case bgcolors.BLUE:
        return 'blue';
      case bgcolors.CYAN:
        return 'cyan';
      case bgcolors.WHITE:
        return 'white';
      default:
        return 'white';
    }
  }

throwing this error

Exception has occurred. PlatformException (PlatformException(error, Unknown color: grey, null))

How can I show last opened page after configuration change?

If you add an example how to use PdfViewControllar class and it's method, it will help.
Is it possible to add spacing between two Pages, Since auto spacing add big Margin.
Thanks, this plugin is better than any other flutter pdf viewer plugin

app crash in release

opening pdf in release gives me white screen for 2 seconds and then the app crashes, but in debug it works fine, i'm not using proguard;

this is my code

PDFView( key: pdfKey, fitPolicy: FitPolicy.BOTH, filePath: pdfPath, displayAsBook: true, swipeHorizontal: false, autoSpacing: false, pageFling: false, defaultPage: _currentPage, pageSnap: false, backgroundColor: bgcolors.WHITE, onViewCreated: (PDFViewController pvc) => _controller = pvc, onRender: (i) { setState(() { totalPages = i; }); }, onPageChanged: (int page, int total) { setState(() { _currentPage = page + 1; }); }, )

and this is stacktrace

backtrace:
#00 pc 0000000000023cfc /system/lib64/libc.so (abort+116)
#1 pc 0000000000464294 /system/lib64/libart.so (art::Runtime::Abort(char const*)+1196)
#2 pc 0000000000008cd4 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+724)
#3 pc 00000000002e4fd0 /system/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1640)
#4 pc 0000000000331ce0 /system/lib64/libart.so (art::JNI::GetMethodID(_JNIEnv*, _jclass*, char const*, char const*)+1464)
#5 pc 0000000000004620 /data/app/com.-BVrGXRJty1aWPnChv-N37Q==/lib/arm64/libjniPdfium.so (Java_com_shockwave_pdfium_PdfiumCore_nativeGetPageSizeByIndex+328)
#6 pc 0000000000039704 /data/app/com.
-BVrGXRJty1aWPnChv-N37Q==/oat/arm64/base.odex (offset 0x39000)

How to change the file without exit the page?

I want to change the filePath parameter with other file after the first PDF appear, but I cannot refresh PDF display with the second one.

How can I do that without close and reopen the page?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.