-
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.
- Loading branch information
Showing
77 changed files
with
2,086 additions
and
2,027 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | ||
import 'package:wrestling_scoreboard_common/common.dart'; | ||
|
||
String getFullNameFromBoutResult(BoutResult? result, BuildContext context) { | ||
return '${getAbbreviationFromBoutResult(result, context)} | ${getDescriptionFromBoutResult(result, context)}'; | ||
} | ||
|
||
String getDescriptionFromBoutResult(BoutResult? result, BuildContext context) { | ||
AppLocalizations loc = AppLocalizations.of(context)!; | ||
switch (result) { | ||
case BoutResult.vfa: | ||
return loc.boutResultVfa; | ||
case BoutResult.vin: | ||
return loc.boutResultVin; | ||
case BoutResult.vca: | ||
return loc.boutResultVca; | ||
case BoutResult.vsu: | ||
return loc.boutResultVsu; | ||
case BoutResult.vsu1: | ||
return loc.boutResultVsu1; | ||
case BoutResult.vpo: | ||
return loc.boutResultVpo; | ||
case BoutResult.vpo1: | ||
return loc.boutResultVpo1; | ||
case BoutResult.vfo: | ||
return loc.boutResultVfo; | ||
case BoutResult.dsq: | ||
return loc.boutResultDsq; | ||
case BoutResult.dsq2: | ||
return loc.boutResultDsq2; | ||
default: | ||
return ''; | ||
} | ||
} | ||
|
||
String getAbbreviationFromBoutResult(BoutResult? result, BuildContext context) { | ||
AppLocalizations loc = AppLocalizations.of(context)!; | ||
switch (result) { | ||
case BoutResult.vfa: | ||
return loc.boutResultVfaAbbr; | ||
case BoutResult.vin: | ||
return loc.boutResultVinAbbr; | ||
case BoutResult.vca: | ||
return loc.boutResultVcaAbbr; | ||
case BoutResult.vsu: | ||
return loc.boutResultVsuAbbr; | ||
case BoutResult.vsu1: | ||
return loc.boutResultVsu1Abbr; | ||
case BoutResult.vpo: | ||
return loc.boutResultVpoAbbr; | ||
case BoutResult.vpo1: | ||
return loc.boutResultVpo1Abbr; | ||
case BoutResult.vfo: | ||
return loc.boutResultVfoAbbr; | ||
case BoutResult.dsq: | ||
return loc.boutResultDsqAbbr; | ||
case BoutResult.dsq2: | ||
return loc.boutResultDsq2Abbr; | ||
default: | ||
return ''; | ||
} | ||
} |
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,6 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:wrestling_scoreboard_common/common.dart'; | ||
|
||
MaterialColor getColorFromBoutRole(BoutRole role) { | ||
return role == BoutRole.red ? Colors.red : Colors.blue; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Oops, something went wrong.