When you upgraded flutter to version 1.22.0. It will be conflict between Router class in library 'package:flutter/src/widgets/router.dart' and the generated file 'router.gr.dart'.
If you are not using the Router class from 'package:flutter/src/widgets/router.dart' in the same file you can hide it while importing material package.
you should rename the file and the class with different name ex:AppRouter app_router, because there is a conflicting between the standard class Route of flutter
When you upgraded flutter to version 1.22.0. It will be conflict between Router class in library 'package:flutter/src/widgets/router.dart' and the generated file 'router.gr.dart'.
If you are not using the Router class from 'package:flutter/src/widgets/router.dart' in the same file you can hide it while importing material package.
import 'package:flutter/material.dart' hide Router;