Color of Mini indicator is Based on location

This commit is contained in:
clopezr1
2020-04-23 16:22:33 -04:00
parent 74aa580f28
commit ff26f31dc8
2 changed files with 11 additions and 8 deletions

View File

@@ -213,9 +213,14 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../Flutter/Flutter.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
); );
name = "[CP] Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;

View File

@@ -213,7 +213,7 @@ class _Calendar extends State<Calendar> with TickerProviderStateMixin {
miniBox.add( miniBox.add(
Positioned( Positioned(
right: 0,top: 0, left: 0, bottom: 0, right: 0,top: 0, left: 0, bottom: 0,
child: _buildEventsMarker(date, events), child: _buildEventsMarker(date, events[0].location_indicator),
), ),
); );
} }
@@ -234,7 +234,7 @@ class _Calendar extends State<Calendar> with TickerProviderStateMixin {
} }
//----- Creates event box display (mini box) ----- //----- Creates event box display (mini box) -----
Widget _buildEventsMarker(DateTime date, List events) { Widget _buildEventsMarker(DateTime date, String location) {
return AnimatedContainer( return AnimatedContainer(
duration: const Duration(milliseconds: 300), duration: const Duration(milliseconds: 300),
@@ -253,7 +253,7 @@ class _Calendar extends State<Calendar> with TickerProviderStateMixin {
//if selected date && home game / else away game //if selected date && home game / else away game
color: _calController.isSelected(date) color: _calController.isSelected(date)
? Colors.blue[400] ? Colors.blue[400]
: _homeAwayColor(), //UNCC Green : _homeAwayColor(location), //UNCC Green
//: Colors.grey, //: Colors.grey,
), ),
@@ -272,17 +272,15 @@ class _Calendar extends State<Calendar> with TickerProviderStateMixin {
); );
} }
bool homeAway = true; Color _homeAwayColor(String location){
Color _homeAwayColor(){
//TODO: Here should be the logic on if Home or Away return the colors //TODO: Here should be the logic on if Home or Away return the colors
// Do whatever you need to do to check home/away // Do whatever you need to do to check home/away
// my guess is if the game says vs its home // my guess is if the game says vs its home
// if game says at its away // if game says at its away
//print(i.location_indicator);
Color c; Color c;
if (homeAway){ // could also be if(game == "H") or something if (location == "H"){ // could also be if(game == "H") or something
c = Color.fromRGBO(0, 112, 60, 1); c = Color.fromRGBO(0, 112, 60, 1);
} else { } else {
c = Colors.grey; c = Colors.grey;