Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
8e81842
gen code
julien-gautier-munic Mar 8, 2023
ec9c833
Import BookMetadataFinder rust code and basic UI
julien-gautier-munic Mar 9, 2023
d57e930
Rework cache so it works with flutter run
julien-gautier-munic Mar 9, 2023
50c362d
Better UI, display images
julien-gautier-munic Mar 9, 2023
87973a0
Publish ad with images, simplify GoogleBooks, show better error for c…
julien-gautier-munic Mar 9, 2023
abd20ee
clean
julien-gautier-munic Mar 9, 2023
cbc2551
WIP drag and drop
julien-gautier-munic Mar 10, 2023
2103ece
drop clean
julien-gautier-munic Mar 10, 2023
c1a6ddb
Drag and Drop works
julien-gautier-munic Mar 10, 2023
785d486
Make babelio more resistant to no blurb
julien-gautier-munic Mar 11, 2023
5d483dd
Undo part of commit 50c362d, which oversimplified GoogleBooks
julien-gautier-munic Mar 11, 2023
c59fdc7
Add GoogleBook comment
julien-gautier-munic Mar 11, 2023
1105a53
Babelio return None instead of panic if there is no book itemscope
julien-gautier-munic Mar 12, 2023
3360a4d
GoogleBooks better handle no matche for isbn
julien-gautier-munic Mar 12, 2023
b1f0cf1
Big refacto
julien-gautier-munic Mar 15, 2023
6999e83
compile
julien-gautier-munic Mar 15, 2023
eb099d0
Add isbn decoder
julien-gautier-munic Mar 15, 2023
dcd3aaa
show basic metadatacollecting
julien-gautier-munic Mar 15, 2023
c53ef46
Use gridview for MetadataCollectingStep
julien-gautier-munic Mar 15, 2023
3ed60c5
SelectableText non scroll grid view
julien-gautier-munic Mar 15, 2023
a99a42c
Use Table instead of GridView
julien-gautier-munic Mar 16, 2023
e8390e4
Mock Step2
julien-gautier-munic Mar 16, 2023
d02b912
Add FutureWidget
julien-gautier-munic Mar 16, 2023
70704a4
Going to AdEditing works
julien-gautier-munic Mar 16, 2023
a22da44
Remove Windows, macos and ios target
julien-gautier-munic Mar 16, 2023
40052c7
Small adjustment in justfile
julien-gautier-munic Mar 16, 2023
ba4f122
AdEditing: Fix scrolling, add check before enabling publishing
julien-gautier-munic Mar 16, 2023
cbba5a4
Fix lint
julien-gautier-munic Mar 17, 2023
1c3e2f8
Clean and use book title as ad title if only one book
julien-gautier-munic Mar 17, 2023
557e97e
Clean
julien-gautier-munic Mar 17, 2023
e8d6ea1
Better description if one book
julien-gautier-munic Mar 17, 2023
b732991
publish_ad return bool
julien-gautier-munic Mar 17, 2023
8e351c5
Better handle BookMD = null, add begining of test when desc is better…
julien-gautier-munic Mar 17, 2023
cbe554d
Convert title to Option, Add GB.extract_metadata_from_isbn_response a…
julien-gautier-munic Mar 19, 2023
26421ad
Rust: GB: remove all field not useful
julien-gautier-munic Mar 19, 2023
3b6e135
Babelio handle authors with only last name
julien-gautier-munic Mar 22, 2023
22fa294
All test pass without internet. GB with mock folder, Babelio with cache
julien-gautier-munic Mar 22, 2023
5750c5f
Move credential to dart
julien-gautier-munic Mar 23, 2023
d9cb49b
MetadataCollectingWidget: Add deep copy to fix bug where manual blurb…
julien-gautier-munic Mar 23, 2023
5f9cc9d
MetadataCollectingWidget: add controller and SelectableTextAndUse for…
julien-gautier-munic Mar 23, 2023
aaffa87
Replace title from provider if better
julien-gautier-munic Mar 24, 2023
40c1130
Replace blurb from provider if better
julien-gautier-munic Mar 24, 2023
ed5096a
Store LBC credential in credential.json
julien-gautier-munic Mar 24, 2023
5a8583f
Add jwt token validator
julien-gautier-munic Mar 25, 2023
dca23c1
Add bookprices with basic example of Selenium
julien-gautier-munic Mar 27, 2023
2c95d48
WIP Selenium offline test work
julien-gautier-munic Mar 29, 2023
398cac9
WIP
julien-gautier-munic Mar 29, 2023
3098a29
Parse booksPrice works
julien-gautier-munic Apr 1, 2023
ad31bd2
clean
julien-gautier-munic Apr 1, 2023
cee744c
Extract selenium POC into useful function
julien-gautier-munic Apr 3, 2023
40b2e48
Add market price and add BooksPrice provider
julien-gautier-munic Apr 3, 2023
82593b0
Run rust codegen
julien-gautier-munic Apr 3, 2023
3884605
Rename BookMetaData to BookMetaDataFromProvider
julien-gautier-munic Apr 4, 2023
54790b4
Adaot flutter
julien-gautier-munic Apr 4, 2023
624eca7
BooksPrice: remove assert, add wait_until
julien-gautier-munic Apr 4, 2023
4719031
Price works
julien-gautier-munic Apr 10, 2023
6a8a8b0
Convert html encoded text to String
julien-gautier-munic Apr 12, 2023
f7c39e1
ISBNDeconding: use Wrap
julien-gautier-munic Apr 12, 2023
c3869d0
Select bundle from phone
julien-gautier-munic Apr 18, 2023
5975106
Add drag and drop images
julien-gautier-munic Apr 18, 2023
f32ebfc
Remove LBC tokenm cookie and publish button
julien-gautier-munic Apr 18, 2023
b8340b2
Add state and weight in AdEditing
julien-gautier-munic Apr 18, 2023
ec4cc4e
Add copy button for text field
julien-gautier-munic Apr 18, 2023
1cf3257
Remove unused credentials
julien-gautier-munic Apr 18, 2023
a6bd4ab
Fix Authors not taken into account in AdEditing step. Better hanle Au…
julien-gautier-munic Apr 18, 2023
cf4be4a
BundleSelection: sort images by date, antialiase
julien-gautier-munic Apr 19, 2023
35010be
AdEditing: images are draggable, add "Mark as Publish" button
julien-gautier-munic Apr 19, 2023
87513e4
Come back to BundleSelection after publish
julien-gautier-munic Apr 19, 2023
9861383
Fix ISBN decoding split on new line
julien-gautier-munic Apr 19, 2023
e2ca448
Move 4 steps into enrichment/
julien-gautier-munic Apr 27, 2023
08a0e30
Merge Camera_app. Compile on Android
julien-gautier-munic Apr 27, 2023
6751dcf
Camera: initialize _camera list
julien-gautier-munic Apr 27, 2023
707373a
Add storage permission to write metadata.json
julien-gautier-munic Apr 28, 2023
f342949
Better explorer, use Card
julien-gautier-munic Apr 28, 2023
c2a009a
Better ISBNDecoding ui
julien-gautier-munic Apr 28, 2023
7fd9a64
BundleSelection: delete button move to booky_deleted
julien-gautier-munic Apr 28, 2023
bb1fd7f
Bundle Selection: Better message if no device connected
julien-gautier-munic Apr 28, 2023
7defe21
ISBNDecding: Add AppBar and back button
julien-gautier-munic Apr 28, 2023
a992c39
Add README
julien-gautier-munic Apr 30, 2023
b1501df
Add TODO
julien-gautier-munic Apr 30, 2023
f30b8f3
build.gradle: Remove uneeded android target
julien-gautier-munic May 1, 2023
f4b6531
BundleSelection: catch SystemFileException as well
julien-gautier-munic May 1, 2023
ae718d0
Booksprice: save file to cache
julien-gautier-munic May 1, 2023
58f3ac4
Use Bundle functions
julien-gautier-munic May 1, 2023
df7c7fd
Compressed image when opening BundleSelection on Android, and use com…
julien-gautier-munic May 1, 2023
b26c757
Stop using GallerySaver and use XFile.saveTo to specify the name of t…
julien-gautier-munic May 1, 2023
45be6df
TODO: Update
julien-gautier-munic May 2, 2023
6d9b16e
Ignore compressed/ dir in .gitignore
julien-gautier-munic May 2, 2023
fb63863
Use Navigator instead of callback. Can go on every screen on linux and
julien-gautier-munic May 2, 2023
65fd6a2
MetadataCollecting: Create multiple textFieldController when multiple…
julien-gautier-munic May 3, 2023
6c1fc23
MetadataCollecting: Add back the keywords
julien-gautier-munic May 3, 2023
e155f05
AdEditing: _getDescriptions does not write TitleAndAuthors if blurb i…
julien-gautier-munic May 3, 2023
97c2bc1
MetadataCollecting: Price auto fill
julien-gautier-munic May 3, 2023
cd3f4a1
MetadataCollecting: Remove "use" button for empty keyword list
julien-gautier-munic May 3, 2023
7e7a7f2
ISBNDecoding: Sort image by name
julien-gautier-munic May 3, 2023
ce0be19
ISBNDecoding: Only consider ISBN starting with 978
julien-gautier-munic May 3, 2023
e7cb79b
MetadataCollecting: Authors field maxLine: null to have multiple line…
julien-gautier-munic May 3, 2023
5ca9e40
BundleSelection: better UI if more than 3 images overflow
julien-gautier-munic May 3, 2023
27c6ee1
ISBNDecoding: Increase image size. Add SingleChildScrollView
julien-gautier-munic May 3, 2023
a387d1d
README: Add new potential providers
julien-gautier-munic May 4, 2023
7362d76
Add Serialize/Deserialize providerMetadata and show then in the bundl…
julien-gautier-munic May 12, 2023
ca6dc6c
BundleSelection: Better handle title overflow
julien-gautier-munic May 12, 2023
6b1a67e
bridge_generated.dart: Add explicit cast from dynamic to int
julien-gautier-munic May 12, 2023
54ce2c1
Camera: Add live barcode detection while pressing button
julien-gautier-munic May 12, 2023
78292d9
Camera: Remove imageFormatGroup
julien-gautier-munic May 12, 2023
9c0676f
Camera: preview keep camera ratio
julien-gautier-munic May 12, 2023
a33da58
Camera: remove barcode by tappin bin icon
julien-gautier-munic May 12, 2023
a7e7399
Camera: Look for barcode in each picture taken
julien-gautier-munic May 12, 2023
d33be66
BundleSelection: add show in folder button on Linux
julien-gautier-munic May 12, 2023
cf6378f
Camera: save ISBNs list to metadata.json
julien-gautier-munic May 12, 2023
301772c
BundleSelection: show a snackbar when compression is finished
julien-gautier-munic May 12, 2023
5ad259e
BundleSelection: show compression progress and better use async
julien-gautier-munic May 13, 2023
6dad90b
BundleSelection: Add refresh button to refresh list and compress images
julien-gautier-munic May 14, 2023
de547af
BundleSelection: Skip compression if not on Android, skip metadata fe…
julien-gautier-munic May 14, 2023
3482d07
Use ISBN and MD from json file, not from detect binary or scrappers
julien-gautier-munic May 15, 2023
772dd07
Camera: Clear _registeredBarcodes when submitting
julien-gautier-munic May 15, 2023
e37f5c8
TODO: Update
julien-gautier-munic May 15, 2023
f430822
AdEditing: Fix bug where cursor goes back to the beginning on edit
julien-gautier-munic May 15, 2023
fcc9797
CachedClient: create cache sub-directory if needed
julien-gautier-munic May 16, 2023
d8c691a
Rust: Add AbeBooks provider for prices
julien-gautier-munic May 22, 2023
2c52228
MetadataCollecting: Prefill with minimum price instead of average
julien-gautier-munic May 22, 2023
be75ec3
Rust: Add LesLibraires providers
julien-gautier-munic May 22, 2023
a63ee1f
Fix LesLibraires providers
julien-gautier-munic May 22, 2023
952ebfb
Rust: LesLibraires: Allow for optional Title and Author
julien-gautier-munic May 23, 2023
688a4ed
ISBNDecoding: Add back. Can manualy add and delete ISBN
julien-gautier-munic May 24, 2023
4b6347b
AdEditing: Show only one author if there is more than 2
julien-gautier-munic May 26, 2023
2fb0613
Add linux barcode detection
julien-gautier-munic May 26, 2023
43c1baa
TODO: Update
julien-gautier-munic May 26, 2023
97f7ed6
BundleSelection: Show little icons
julien-gautier-munic May 26, 2023
f9a19ac
FutureWidget: Show exclamation point and error in tooltip
julien-gautier-munic May 30, 2023
5720387
Rust: LesLibraires: Parse price
julien-gautier-munic May 30, 2023
c78127c
TODO: update
julien-gautier-munic May 30, 2023
8f950f7
Add weight_grams in Ad
julien-gautier-munic May 30, 2023
aaa5575
Weight take into account wrapping. Price take into account shipping cost
julien-gautier-munic May 31, 2023
52730fa
BundleSelection: Add action button to invalidate all metadata from pr…
julien-gautier-munic May 31, 2023
db500b6
Rust: LesLibraires: Add fixed shipping price
julien-gautier-munic Jun 1, 2023
d3c1f6f
Apply minimum price after excluding shipping cost
julien-gautier-munic Jun 1, 2023
ab0d4bb
TODO: Update
julien-gautier-munic Jun 2, 2023
46b20ef
ISBNDecoding: Use pannable image to show barcode
julien-gautier-munic Jun 2, 2023
ffff9b8
BundleSelection: Refresh button refresh already present Bundle in cas…
julien-gautier-munic Jun 2, 2023
e46decb
TODO: Update
julien-gautier-munic Jun 2, 2023
f8248c0
BundleSelection: Better padding
julien-gautier-munic Jun 2, 2023
ef95f8c
AdEditing: Show the weight with LBC category
julien-gautier-munic Jun 2, 2023
14c3143
AdEditing: Better alignement, better color
julien-gautier-munic Jun 2, 2023
473ef04
Camera: Add TextField to manually add ISBN
julien-gautier-munic Jun 4, 2023
be5ac59
Display ISBN in AdEditing
julien-gautier-munic Jun 5, 2023
8c49f6b
Rust: Booksprice: remove lints
julien-gautier-munic Jun 5, 2023
282a299
Fix lesLibraires test
julien-gautier-munic Jun 6, 2023
86a5439
Rust: JustBooks: add new provider
julien-gautier-munic Jun 6, 2023
377be63
Bump flutter_image_compress from 1.1.3 to 2.0.3
dependabot[bot] Jun 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
compressed/

# Miscellaneous
*.class
*.log
Expand Down Expand Up @@ -31,6 +33,9 @@
.pub/
/build/

personal_info.*
credential.json

# Web related

# Symbolication related
Expand Down
141 changes: 91 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,102 @@
# flutter_rust_bridge_template
# Booky

This repository serves as a template for Flutter projects calling into native Rust
libraries via `flutter_rust_bridge`.
Booky is an application to help publish second-hand book.
It enable taking multiple picture of the book(s). Add books state (brand new, worn out), add the weight (for shipping), then extract the ISBN from the barcode in the pictures to have additional metadata by scrapping some website.

## Getting Started
Metadata include:
- Title
- Author
- Blurb. A book blurb is a short promotional description, whereas a synopsis summarizes the twists, turns, and conclusion of the story.
- Keywords or genres

To begin, ensure that you have a working installation of the following items:
- [Flutter SDK](https://docs.flutter.dev/get-started/install)
- [Rust language](https://rustup.rs/)
- `flutter_rust_bridge_codegen` [cargo package](https://cjycode.com/flutter_rust_bridge/integrate/deps.html#build-time-dependencies)
- Appropriate [Rust targets](https://rust-lang.github.io/rustup/cross-compilation.html) for cross-compiling to your device
- For Android targets:
- Install [cargo-ndk](https://github.com/bbqsrc/cargo-ndk#installing)
- Install [Android NDK 22](https://github.com/android/ndk/wiki/Unsupported-Downloads#r22b), then put its path in one of the `gradle.properties`, e.g.:
## Enrichment
### Example using Babelio as source
#### Input

```rust
let isbn = 9782266071529;
```
echo "ANDROID_NDK=.." >> ~/.gradle/gradle.properties
```

- For iOS targets:
- Install [cargo-xcode](https://gitlab.com/kornelski/cargo-xcode#installation)
- [Web dependencies](http://cjycode.com/flutter_rust_bridge/template/setup_web.html) for the Web

Then go ahead and run `flutter run` (for web, run `dart run flutter_rust_bridge:serve` instead). When you're ready, refer to our documentation
[here](https://fzyzcjy.github.io/flutter_rust_bridge/index.html) to learn how to write and use binding code.

Once you have edited `api.rs` to incorporate your own Rust code, the bridge files `bridge_definitions.dart` and `bridge_generated.dart` are generated using the following command (note: append ` --wasm` to add web support):

### Windows
```
flutter_rust_bridge_codegen --rust-input native\src\api.rs --dart-output .\lib\bridge_generated.dart --dart-decl-output .\lib\bridge_definitions.dart
#### Output
```rust
BookMetaData {
title: "Le nom de la bête",
author: {
surname: "Daniel",
name: "Easterman",
},
blurb: "Janvier 1999. Peu à peu, les pays arabes ont sombré dans l'intégrisme. Les attentats terroristes se multiplient en Europe attisant la haine et le racisme. Au Caire, un coup d'état fomenté par les fondamentalistes permet à leur chef Al-Kourtoubi de s'installer au pouvoir et d'instaurer la terreur. Le réseau des agents secrets britanniques en Égypte ayant été anéanti, Michael Hunt est obligé de reprendre du service pour enquêter sur place. Aidé par son frère Paul, prêtre catholique et agent du Vatican, il apprend que le Pape doit se rendre à Jérusalem pour participer à une conférence œcuménique. Au courant de ce projet, le chef des fondamentalistes a prévu d'enlever le saint père.Dans ce récit efficace et à l'action soutenue, le héros lutte presque seul contre des groupes fanatiques puissants et sans grand espoir de réussir. Comme dans tous ses autres livres, Daniel Easterman, spécialiste de l'islam, part du constat que le Mal est puissant et il dénonce l'intolérance et les nationalismes qui engendrent violence et chaos.--Claude Mesplède<br>\t\t",
key_words: [
"roman", "fantastique", "policier historique", "romans policiers et polars", "thriller", "terreur", "action", "démocratie", "mystique", "islam", "intégrisme religieux", "catholicisme", "religion", "terrorisme", "extrémisme", "egypte", "médias", "thriller religieux", "littérature irlandaise", "irlande"
],
}
```

### Linux/MacOS/any other Unix
```
flutter_rust_bridge_codegen --rust-input native/src/api.rs --dart-output ./lib/bridge_generated.dart --dart-decl-output ./lib/bridge_definitions.dart
### Sources

| Source | Metadata (in addition to title and authors) | Notes |
|-------------------------------------------------------|--------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Babelio](https://www.babelio.com/) | blurb, keyword | No API available. No plan to build one.<br/>Babelio seem to block the IP if it detect this bot is doing some scrapping |
| [Decitre](https://www.decitre.fr/) | blurb, keywords in commentaries | |
| [GoodReads](https://www.goodreads.com/) | blurb, genres in english | An API was available, but GoodRead does not create new developer key. [See this](https://help.goodreads.com/s/article/Does-Goodreads-support-the-use-of-APIs) |
| [Google Books](https://www.google.fr/books/) | blurb, genres | [A real API](https://developers.google.com/books/docs/overview) is available to look up a book by ISBN <br/> Some book can't be search by ISBN, even though a search by title can find them, and they display the right ISBN |
| [ISBSearcher](https://www.isbnsearcher.com/) | blurb, main category in english | |
| [Label Emmaus](https://www.label-emmaus.co/) | blurb, genres | |
| [OpenLibrary](https://openlibrary.org/) | blurb are not translated | Its is based on physical books, it is not really a book database |
| [Chasse Aux Livre](https://www.chasse-aux-livres.fr/) | price only | it is not possible to parse with Selenium |
| [AbeBooks](https://www.abebooks.fr/) | Seems to have good french blurb | |
| [Fnac](https://www.fnac.com/) | blurb, second-hand price | |
| [Librarie Kleber](https://www.librairie-kleber.com/) | blurb, price | |
| [JustBooks](https://www.justbooks.fr/) | blurb (seldom), prices | |

#### GoogleBooks
GoogleBooks has some inconsistencies:
https://www.googleapis.com/books/v1/volumes?q=isbn:9782744170812
says te publishedDate is 2004.
But https://www.googleapis.com/books/v1/volumes/DQUFSQAACAAJ
says the publishedDate is 2005.

In the first response, we don't have a publisher, in the second we have.
In the first response, the title use a big C for "Cité", but in the second, it use a small 'c'

## Contributing
### Build the barcode detector binary
Clone the 3 OpenCV repo:
- https://github.com/opencv/opencv.git (main repo)
- https://github.com/pixelshot91/open_cv_barcode_book_metadata_finder
(fork of https://github.com/opencv/opencv_contrib.git)
Contain the barcode contrib module
- https://github.com/opencv/opencv_extra.git (optionnal, contain the test data to test OpenCV)

```shell
$ cd <open_cv>/
$ mkdir build
$ cd build/
build/ $ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules ..
```

## Scaffolding in existing projects

If you would like to generate boilerplate for using `flutter_rust_bridge` in your existing projects,
check out the [`flutter_rust_bridge` brick](https://brickhub.dev/bricks/flutter_rust_bridge/)
for more details.

## Disclaimer

This template is not affiliated with flutter_rust_bridge. Please file issues and PRs related to the template here,
not flutter_rust_bridge.

## License

Copyright 2022 Viet Dinh.

This template is licensed under either of
- [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) ([LICENSE-APACHE](LICENSE-APACHE))
- [MIT license](https://opensource.org/licenses/MIT) ([LICENSE-MIT](LICENSE-MIT))

at your option.
You can test the barcode module with:
```shell
build/ $ make opencv_test_barcode
build/ $ OPENCV_TEST_DATA_PATH=<opencv_extra>/testdata/ bin/opencv_test_barcode
```

The [SPDX](https://spdx.dev/) license identifier for this project is `MIT OR Apache-2.0`.
### Install the rust/android toolchain
#### flutter_rust_bridge_template
Follow the instruction of flutter_rust_bridge_template. Here is an extract

> To begin, ensure that you have a working installation of the following items:
> - [Flutter SDK](https://docs.flutter.dev/get-started/install)
> - [Rust language](https://rustup.rs/)
> - `flutter_rust_bridge_codegen` [cargo package](https://cjycode.com/flutter_rust_bridge/integrate/deps.html#build-time-dependencies)
> - Appropriate [Rust targets](https://rust-lang.github.io/rustup/cross-compilation.html) for cross-compiling to your device
> - For Android targets:
> - Install [cargo-ndk](https://github.com/bbqsrc/cargo-ndk#installing)
> - Install [Android NDK 22](https://github.com/android/ndk/wiki/Unsupported-Downloads#r22b), then put its path in one of the `gradle.properties`, e.g.:
>
> ```
> echo "ANDROID_NDK=.." >> ~/.gradle/gradle.properties
> ```

#### super_native_extension
Follow this tutorial: https://pub.dev/packages/super_clipboard
28 changes: 28 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# TODO

* [ ] ISBNDecoding: Delete an image
* [ ] ISBNDecoding: Pan and zoom on an image
* [ ] ISBNDecoding: Check the ISBN checksum
* [ ] BUG: BundleList fail to refresh after: autoMetadata download
* [ ] BUG: BundleList show autoMetadata from other bundle when some bundle are deleted
* [ ] MetadataCollecting: Disable 'Validate Metadatas' button if price field is empty
* [ ] AdEditing: Disable 'Mark as published' if the title is empty
* [ ] Search with Selenium in headless mode

# DONE

* [x] Add the ISBNs in the ad description for better indexing
* [x] Show LBC weight category instead of weight in grams
* [x] Better price suggestion. Take into account shipping cost
* [x] BundleSelection: Delete some bundle
* [x] BundleSelection: Show icons to represent how much metadata is available
* [x] ISBNDecoding: Show barcode zone, add and remove barcode
* [x] BundleSelection: Automatically update bundle list when a bundle is removed or added by the app
* [x] BundleSelection: Allow manual refresh if the bundle list has been modified by external device
* [x] Launch the scrapping asynchronously to avoid waiting for the provider (notably BooksPrice)
* [x] Camera: Grab the ISBN in real-time with ML Kit (add a minimum repetition of about 20 to avoid false ISBN detection)
* [x] MetadataCollecting: Price auto fill
* [x] MetadataCollecting: Add back the keywords
* [x] MetadataCollecting: Create multiple textFieldController when multiple ISBN
* [x] Navigate between enrichment and camera
* [x] Compress the images to upload them quicker
40 changes: 15 additions & 25 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
use_key_in_widget_constructors: false
avoid_print: false
prefer_single_quotes: true
prefer_interpolation_to_compose_strings: false
prefer_is_empty: false
avoid_function_literals_in_foreach_calls: false
analyzer:
enable-experiment:
- records
- patterns
- sealed-class
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
10 changes: 5 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
ndkVersion "25.2.9519653"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -47,7 +47,7 @@ android {
applicationId "com.example.flutter_rust_bridge_template"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
minSdkVersion 23
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down Expand Up @@ -87,12 +87,12 @@ dependencies {
environment ANDROID_NDK_HOME: "$ANDROID_NDK"
commandLine 'cargo', 'ndk',
// the 2 ABIs below are used by real Android devices
'-t', 'armeabi-v7a',
// '-t', 'armeabi-v7a',
'-t', 'arm64-v8a',
// the below 2 ABIs are usually used for Android simulators,
// add or remove these ABIs as needed.
'-t', 'x86',
'-t', 'x86_64',
// '-t', 'x86',
// '-t', 'x86_64',
'-o', '../android/app/src/main/jniLibs', 'build'
if (profileMode != null) {
args profileMode
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.flutter_rust_bridge_template">
<application
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
<application
android:label="flutter_rust_bridge_template"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
Expand Down
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
ANDROID_NDK=/home/julien/Android/Sdk/ndk/
34 changes: 0 additions & 34 deletions ios/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions ios/Flutter/AppFrameworkInfo.plist

This file was deleted.

1 change: 0 additions & 1 deletion ios/Flutter/Debug.xcconfig

This file was deleted.

1 change: 0 additions & 1 deletion ios/Flutter/Release.xcconfig

This file was deleted.

Loading