-
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 dart sdk version & lint version * Mark receipt 'kampanja' row as discount counted * Update version number (0.13.0 -> 0.14.0) * Update Dart SDK version (2.17.0 -> 2.17.1) * Change the column order of EAN products CSV * Create an own method for arg commands handling * Print help also with empty command * Update ArgSelector enum to use new Dart 2.17 approach * Update ShopSelector enum to use new Dart 2.17 approach * Update a comment in strings2ReceiptProducts method
- Loading branch information
Showing
9 changed files
with
60 additions
and
82 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
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 |
---|---|---|
@@ -1,30 +1,14 @@ | ||
/// ArgSelector (textFile, htmlFile, foodOnlineStore, csvPath, help) | ||
/// ArgSelector (textFile, htmlFile, foodOnlineStore, csvPath, help, run) | ||
enum ArgSelector { | ||
textFile, | ||
htmlFile, | ||
foodOnlineStore, | ||
csvPath, | ||
help, | ||
run, | ||
} | ||
|
||
extension ArgSelectorExtension on ArgSelector { | ||
static const values = { | ||
ArgSelector.textFile: 'text', | ||
ArgSelector.htmlFile: 'html', | ||
ArgSelector.foodOnlineStore: 'store', | ||
ArgSelector.csvPath: 'csv', | ||
ArgSelector.help: 'help', | ||
ArgSelector.run: 'run', | ||
}; | ||
textFile('text'), | ||
htmlFile('html'), | ||
foodOnlineStore('store'), | ||
csvPath('csv'), | ||
help('help'), | ||
run('run'); | ||
|
||
String? get value => values[this]; | ||
final String term; | ||
const ArgSelector(this.term); | ||
|
||
bool isEqual(dynamic value) { | ||
if (value is String) { | ||
return toString() == value || this.value == value; | ||
} else { | ||
return false; | ||
} | ||
} | ||
String get value => term; | ||
} |
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 |
---|---|---|
@@ -1,22 +1,10 @@ | ||
/// Shop selector (sKaupat, kRuoka) | ||
enum ShopSelector { | ||
sKaupat, | ||
kRuoka, | ||
} | ||
|
||
extension ShopSelectorExtension on ShopSelector { | ||
static const values = { | ||
ShopSelector.sKaupat: 'S-kaupat', | ||
ShopSelector.kRuoka: 'K-ruoka', | ||
}; | ||
sKaupat('S-kaupat'), | ||
kRuoka('K-ruoka'); | ||
|
||
String? get value => values[this]; | ||
final String term; | ||
const ShopSelector(this.term); | ||
|
||
bool isEqual(dynamic value) { | ||
if (value is String) { | ||
return toString() == value || this.value == value; | ||
} else { | ||
return false; | ||
} | ||
} | ||
String get value => term; | ||
} |
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