Skip to content

Instantly share code, notes, and snippets.

View Jaeder42's full-sized avatar
🖖
Cøding

Johan Jäderblom Jaeder42

🖖
Cøding
View GitHub Profile
ColorTween colors = ColorTween(begin: Colors.red[900], end: Colors.green);
Widget renderChoices(BuildContext context) {
return Container(
child: Row(children: [
Text('0'),
Expanded(
child: Slider(
min: 0,
max: 1,
toBig = number => {
const multiplier = Math.pow(10, countDecimalPlaces(someValue))
// How to make sure there are no decimal points?? I know lets convert to string and back
return parseInt((number * multiplier).toFixed(0))
}
Calendar c = Calendar.getInstance();
for(int i = 0; i < days; i++){
int daysToAdd = i - (i-1);
c.add(Calendar.DAY_OF_YEAR, daysToAdd);
}