Check out example codes for "fluter check that date is greater than another date". It will help you in understanding the concepts better.

Code Example 1

var now = new;
var berlinWallFellDate = new DateTime.utc(1989, 11, 9);
// 0 denotes being equal positive value greater and negative value being less
  //peform logic here.....

Learn ReactJs, React Native from