Edit: With null safety, this can’t be null anymore in an extension on a non-optional type. We all know the this keyword in Dart (and many other languages). When used in a method, it refers to the instance of the object that the method is invoked on. Therefore, it can…