https://github.com/zuki/zuki_catalog
Offline catalog for iOS developed by Flutter
https://github.com/zuki/zuki_catalog
Last synced: 8 months ago
JSON representation
Offline catalog for iOS developed by Flutter
- Host: GitHub
- URL: https://github.com/zuki/zuki_catalog
- Owner: zuki
- Created: 2020-05-22T01:11:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-04T05:26:34.000Z (almost 6 years ago)
- Last Synced: 2024-12-27T13:10:09.275Z (over 1 year ago)
- Language: Dart
- Size: 1.17 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zuki_catalog
Flutterで作成したオフライン目録検索。バーコードスキャンによるISBN検索とタイトルの中間一致検索が可能。
## 実装
1. データベース検索には`sqflite`を使用。
2. バーコードスキャンには`barcode_scan`を使用。
3. v1.0は逐次検索、v1.1は検索キー入力で検索, v1.2で1画面にして再度逐次検索。
## 参考サイト
- [Building a Cupertino app with Flutter](https://codelabs.developers.google.com/codelabs/flutter-cupertino/index.html)
iOS UI(Cupertino Library)アプリを作成するためのコードを借用。
- [Open an asset database](https://github.com/tekartik/sqflite/blob/master/sqflite/doc/opening_asset_db.md)
既存のSQLite3データベースを使用するためのコードを借用。
- [Using Sqflite in Flutter Application](https://medium.com/pharos-production/using-sqflite-in-flutter-application-bc21bf446154)
データベースをシングルトンで使用するためのコードを借用。
## iOSアプリのサイズ
このソースを普通に`flutter run --release`で作成したアプリは200MB超えのバカでかいサイズとなった。これは[バグではない](https://github.com/flutter/flutter/issues/47101#issuecomment-567522077)そうで、[次のようにする](https://github.com/flutter/flutter/issues/49855)と半分以下(108.4MB)になった。もっとも、それでもまだまだ大きい。同等機能のネイティブアプリのサイズは28.8MBで3倍強である。まだ方法はありそう。
```bash
$ flutter build ios --profile
$ flutter install
```
以下の難読化とシンボルの書き出しを行ったが、サイズは102.8MBとあまり小さくならなかった。
```bash
$ flutter build ios --profile --obfuscate --split-debug-info=./info
```
## TODO
`CupertinoTextField`の`onChanged`で入力文字を取得して逐次検索しているが、漢字変換途中の文字も拾ってしまう。拾わない方法をいろいろ調べたがまだ見つからない。