Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given an n x n binary matrix grid. You are allowed to change at most one 0 to be 1.
Return the size of the largest island in grid after applying this operation.
An island is a 4-directionally connected group of 1s.
 
Please complete the following python code precisely:
```python
class Solution:
    def largestIsland(self, grid: List[List[int]]) -> int:
```