hydrated_bloc
bloc 状態管理ライブラリの拡張で、状態を自動的に永続化および復元します。
これは Library Genesis サービスの公式ではないモバイルクライアントです。
bloc 状態管理ライブラリの拡張で、状態を自動的に永続化および復元します。
Hive用の拡張機能。任意のクラスを保存するためのTypeAdapterを自動生成します。
ファイルをダウンロードするのを簡単にしてくれる強力なプラグイン。
Dartにおける関数型プログラミング。効率的な不変データ構造、モナド、レンズ、その他のFPツールを使用してDartコードを純粋化します。
v5.0.1ヘッダーまたはアイコンをクリックすることで展開または折りたたみ可能なFlutterウィジェットです。
v5.0.0このパッケージを使用すると、Flutterでテキストのスタイルに簡単なHTMLおよびインラインCSSスタイルを使用できます。css_textパッケージのフォークです。
Android のダウンロードディレクトリを取得するためのFlutterプラグイン。
{"sdk":"flutter"}{"sdk":"flutter"}^0.1.3^0.13.2^6.0.6^6.1.0^3.1.0{"git":{"url":"git://github.com/manuelvargastapia/flutter_downloader.git","ref":"timeout"}}^5.7.10^0.1.0^5.0.1+1{"git":{"url":"git://github.com/manuelvargastapia/simple_html_css_flutter.git","ref":"fix_range_error"}}^1.4.4+1^0.3.1^0.9.2^4.1.4^0.17.0^0.4.3+2{"sdk":"flutter"}^1.10.3^3.5.0^0.8.2^1.2.5以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
This is a non-offical mobile client for Library Genesis service. It's an independent side project. And it's Open Source, so feel free to collaborate.
The app is built with Flutter and it's available in FDroid.
Currently, we're working mainly in Android version.
The following is a list of desired new features within the scope of the project. Notwithstanding, we're happy to hear new ideas and feeback.
We recommend to submit first an issue to discuss ideas, instead of directly send a PR.
We're managing the different stages of the app (basically, development and production) throught compile time variables (check this article for information). The only environmental variable in use right now is LIBGEN_MOBILE_API. This allow us to pass a development and production API URL directly from CLI commands.
Also note that this app is using multiple flavors, therefore it has to be specifically referenced when running the app. Otherwise, you'll get the a "Gradle build failed to produce an .apk file" error.
To run the app with compile time variable plus the correct flavor, use the following command:
flutter run --dart-define=LIBGEN_API_URL=<VALUE> --flavor local
Finally, in VSCode, it could be useful define a launch.json file to debug. Such file would look like this:
{
"version": "0.2.0",
"configurations": [
{
"name": "emulator",
"request": "launch",
"type": "dart",
"args": [
"--dart-define=LIBGEN_API_URL=http://10.0.2.2:3000",
"--flavor",
"local"
]
},
]
}
Those flags also work with flutter build apk and others similar commands.
IMPORTANT
To use a phisical device to run the app, you'll need to pass the internal IP of the machine that's running the server as the value of LIBGEN_API_URL. "http://10.0.2.2:3000" will only provide access to emulators, as those are part of the same network.
Library Genesis doesn't provide a public API to work with, so we decided to build a backend service to consume. It's currently hosted in Heroku.
Check the repo to run your own instance and pass the corresponding URLs to the app throught compile time variables. It's an ExpressJS project; you just need to clone (or fork) the repo, install dependencies and run npm start.
During development, a forked version of this unofficial Libgen library has been used to get the data. This is the repo of our modified version.
The followings are all the official and third-party packages in use right now.
Internationalization
Additionally, for generating the needed boilerplate we used the VSCode plugin Flutter Intl. This way, is recommended using this plugin to automatically generate new code for new locales. Unfortunately, the offical docs seems to be outdated.
API requests
State management
Downloads
For downloading, we're using a fork of flutter_downloader package. Check pubspec.yaml for details.
Open download link in browser
Render HTML content
For rendering HTML, we're using a fork of simple_html_css package. Check pubspec.yaml for details.
Local storage
Code generation
Others