-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update 'strings2ReceiptProducts' (notice campaign rows) * Add 'ansicolor' dependency & use it in 'eanHandler' * Update 'eanHandler' (better logic for selecting from multiple products) * Update 'eanHandler' Temporarily comment problematic parts before a proper fix * Initially add 'hive' dependency A plan: save an asked product to a local Hive database Continue later to implement this feature * Add 2 generator dependencies * Add 'HiveProduct' class & generated adapter * Initially update 'eanHandler' Starting point for using Hive * Update readme Add section for generating 'hive_product.g.dart' file * Update 'eanHandler' & '_handleFoundCases' Continue to implement hive_product handling (saving names to the local database) * Add 'ansipen_helper.dart' For refactoring usage * Update 'ansipen_helper.dart' Add 'peachPen' method * Update 'ean_handler.dart' - Refactor ansiPens - Update '_filterEANProducts' method - Add '_initializeHiveProducts' & '_filterHiveProducts' methods - Add 'nonFoundReceiptProducts2' list helper * Cleaning in 'ean_handler.dart'
- Loading branch information
Showing
9 changed files
with
584 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import 'package:hive/hive.dart'; | ||
|
||
part 'hive_product.g.dart'; | ||
|
||
@HiveType(typeId: 0) | ||
class HiveProduct extends HiveObject { | ||
@HiveField(0) | ||
String receiptName; | ||
|
||
@HiveField(1) | ||
String eanName; | ||
|
||
HiveProduct({required this.receiptName, required this.eanName}); | ||
|
||
@override | ||
String toString() { | ||
return 'ReceiptName: $receiptName, eanName: $eanName'; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import 'package:ansicolor/ansicolor.dart'; | ||
|
||
AnsiPen greenPen() { | ||
return AnsiPen() | ||
..black(bold: true) | ||
..green(bold: true); | ||
} | ||
|
||
AnsiPen redPen() { | ||
return AnsiPen() | ||
..black(bold: true) | ||
..red(bold: true); | ||
} | ||
|
||
AnsiPen peachPen() { | ||
return AnsiPen() | ||
..black(bold: true) | ||
..rgb(r: 1.0, g: 0.8, b: 0.2); | ||
} |
Oops, something went wrong.