Unable to infer base type using `is` on Flutter 2.0

I am getting this error The getter 'loadFromNetwork' isn't defined for the type 'Event & LoadEvent'.

Before flutter 2.0 this wasn’t an issue with is check it was able to infer types from base classes.

Steps to Reproduce

Here is an example snippet identical to our code.

import 'package:flutter/material.dart';
abstract class Base{
  String get eventType;
  int get originator;
  // other data
}
abstract class NetworkLoadEvent extends Base {
  bool get loadFromNetwork;
  bool get showLoading;
  bool get showToast;
  String get toastMessage;
}

abstract class BaseEventClass<
  Event extends Base,
  LoadEvent extends NetworkLoadEvent>{
  
  @protected
  void mapEventToState(
    Event event,
  ) {
    if (event is LoadEvent) {
      // event.loadFromNetwork is error
     // The getter 'loadFromNetwork' isn't defined for the type 'Event & LoadEvent'.
      if (event.loadFromNetwork) {
        // load from network
      }
    }
  }
  
  @protected
  void doSomething(LoadEvent e){
    // more work
  }

  @protected
  void doSomethingMore(LoadEvent e);
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Center(
        child: Container(
          child: Text('Hello world'),
        ),
      ),
    );
  }
}

Future<void> main() async {
  runApp(MyApp());
}

Expected results:
Should infer the types automatically like it did before Flutter 2.0

Actual results:
The getter 'loadFromNetwork' isn't defined for the type 'Event & LoadEvent'. Try importing the library that defines 'loadFromNetwork', correcting the name to the name of an existing getter, or defining a getter or field named 'loadFromNetwork'.

Current Solution
Cast using as (event as LoadEvent).loadFromNetwork but this gives two lint errors of avoid_as and unnecessary_cast. It’s a round-around solution but any solution from flutter like it used to work before 2.0 would be better.

Flutter analyze

The getter 'loadFromNetwork' isn't defined for the type 'Event & LoadEvent'. Try importing the library that defines 'loadFromNetwork', correcting the name to the name of an existing getter, or defining a getter or field named 'loadFromNetwork'

Flutter doctor verbose

[√] Flutter (Channel stable, 2.0.1, on Microsoft Windows [Version 10.0.19042.685], locale en-US)
    • Flutter version 2.0.1 at N:\Wazo\Projects\flutter\flutter_windows_v0.5.1-beta\flutter
    • Framework revision c5a4b4029c (4 days ago), 2021-03-04 09:47:48 -0800
    • Engine revision 40441def69
    • Dart version 2.12.0

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at O:\Programs\Android
    • Platform android-30, build-tools 29.0.0
    • ANDROID_HOME = O:\Programs\Android
    • Java binary at: O:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at O:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code, 64-bit edition (version 1.54.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.20.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.190
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 88.0.705.81

! Doctor found issues in 1 category.

1 possible answer(s) on “Unable to infer base type using `is` on Flutter 2.0