-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* redesign match detail * change highlight btn * code refactor * transform data in models * fix data repeating * change image avatar * add status tag * use tab button
- Loading branch information
1 parent
afc7df9
commit a32a415
Showing
54 changed files
with
3,613 additions
and
1,810 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
1,340 changes: 1,340 additions & 0 deletions
1,340
data/lib/api/ball_score/ball_score_model.freezed.dart
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,4 @@ enum InningStatus { | |
final int value; | ||
|
||
const InningStatus(this.value); | ||
} | ||
} |
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,34 @@ | ||
import 'package:data/extensions/int_extensions.dart'; | ||
|
||
extension OverExtensionOnDouble on double { | ||
double add(int ballsToAdd) { | ||
int totalBalls = toBalls() + ballsToAdd; | ||
return totalBalls.toOvers(); | ||
} | ||
|
||
double remove(int ballsToRemove) { | ||
int totalBalls = toBalls() - ballsToRemove; | ||
if (totalBalls < 0) totalBalls = 0; | ||
return totalBalls.toOvers(); | ||
} | ||
|
||
int getBallNumberFromOver() { | ||
String valueString = toString(); | ||
|
||
List<String> parts = valueString.split('.'); | ||
|
||
if (parts.length > 1) { | ||
return int.parse(parts[1]); | ||
} else { | ||
return 0; | ||
} | ||
} | ||
|
||
int getOverNumberFromOver() { | ||
return toInt(); | ||
} | ||
|
||
int toBalls() { | ||
return (getOverNumberFromOver() * 6) + getBallNumberFromOver(); | ||
} | ||
} |
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,7 @@ | ||
extension OverExtensionOnInt on int { | ||
double toOvers() { | ||
int overs = this ~/ 6; | ||
int additionalBalls = this % 6; | ||
return double.parse("$overs.$additionalBalls"); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -201,4 +201,4 @@ class BallScoreChange { | |
final BallScoreModel ballScore; | ||
|
||
BallScoreChange(this.type, this.ballScore); | ||
} | ||
} |
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
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
Oops, something went wrong.