hydrated_bloc
一個擴展 bloc 狀態管理庫的外掛程式,可自動持久化和還原 bloc 狀態。
這是 Library Genesis 服務的非官方行動客戶端。
一個擴展 bloc 狀態管理庫的外掛程式,可自動持久化和還原 bloc 狀態。
Hive 的擴展。自動為任何類別產生 TypeAdapters 來儲存資料。
功能強大的外掛程式,讓下載檔案變得輕鬆。
Dart 中的函數式程式設計。使用高效能的不可變資料結構、單子、透鏡及其他 FP 工具來淨化您的 Dart 程式碼。
v5.0.1一個可點擊標題或圖示來展開或收起的 Flutter 小部件。
v5.0.0此套件允許您在 Flutter 中使用簡單的 HTML 和內嵌 CSS 樣式來設定文字樣式。這是 css_text 套件的分支。
Flutter 插件,用於取得 Android 的下載目錄。
{"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