Created
December 14, 2019 15:19
-
-
Save rrifafauzikomara/a14943cc8dec7284c6ff387c69e31e46 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
class VoteColorHelper { | |
static Color getColor(double s) { | |
Color r = Colors.red; | |
if (s > 4.5 && s < 7) | |
r = Colors.yellow; | |
else if (s >= 7) r = Colors.green; | |
return r; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment