For anyone else running into this issue, I changed my flutter/material.dart import to this: import 'package:flutter/material.dart' hide Router;