Skip to content

Error when writing tests for methods that contain EasyLoading. #172

Description

@yassinsameh

When writing a Unit Test for a method i have that has EasyLoading.showToast() being called in it.

I get the following error:
'package:flutter_easyloading/src/easy_loading.dart': Failed assertion: line 425 pos 7: 'overlayEntry != null': You should call EasyLoading.init() in your MaterialApp

I tried instantiating the MaterialApp in the test and calling EasyLoading.init() but that didn't work.

flutter_easyloading: ^3.0.5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions