I'm new to dart and having a hard time figuring out things. so, I just need some help completing the program below. I have no idea where I'm going wrong. All I'm getting is an error related to null safety
question :- Write a program to obtain a number N and increment its value by 1 if the number is divisible by 4 otherwise decrement its value by 1.
import 'dart:io';
void main(){
String? input = stdin.readLineSync();
int number = int.parse(input);
}
This is all that came to my mind, I know the logic, but I'm stuck at getting the user input and converting it.