Giter VIP home page Giter VIP logo

Comments (13)

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024

以下是相关代码

abstract class LoginIMvpView extends IMvpView{
LoginProvider get provider;
}

class LoginPresenter extends BasePagePresenter{
////.....
}

from flutter_deer.

simplezhli avatar simplezhli commented on June 8, 2024

LoginIView 和 LoginIMvpView 是什么关系

from flutter_deer.

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024

LoginIView 和 LoginIMvpView 是什么关系

我现在把LoginIView名字改为LoginIMvpView了,上面贴的代码是在日志之后修改的,忽略LoginIView,现在只有LoginIMvpView类了,报错依然如下:

Another exception was thrown: type '_LoginState' is not a subtype of type 'LoginIMvpView' of 'value'

from flutter_deer.

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024

看下面这个:

image

class LoginPresenter extends BasePagePresenter{
////.....
}

image

from flutter_deer.

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024

@simplezhli 我已经发现是如下这个赋值的问题,但是不知道为啥两边类型不一致?

image

from flutter_deer.

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024
image

from flutter_deer.

simplezhli avatar simplezhli commented on June 8, 2024
class LoginPresenter extends BasePagePresenter<LoginIMvpView> {

}

from flutter_deer.

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024
class LoginPresenter extends BasePagePresenter<LoginIMvpView> {

}
image

加上了,还是报错:

image

from flutter_deer.

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024

而且这边看错误日志打印了两次,和这个有关系吗

from flutter_deer.

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024
image

我断点试了下,_state is LoginIMvpView返回的是true

image

from flutter_deer.

simplezhli avatar simplezhli commented on June 8, 2024

而且这边看错误日志打印了两次,和这个有关系吗

initState里面有什么操作吗

from flutter_deer.

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024

initState
这边代码没动

image

from flutter_deer.

hanxiaofeng avatar hanxiaofeng commented on June 8, 2024

重新按照你的demo写法,拷贝修改后运行正常了,怀疑是导包的问题,因为项目里有与之同名的一些dart类,感谢回复,我先把issues关了。

from flutter_deer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.