错误:flutter / lib / ui / ui_dart_state.cc(157)]未处理的异常:类型'String'不是'index'的'int'类型的子类型

时间:2020-06-25 16:32:58

标签: flutter flutter-layout

我在项目中偶然发现以下错误:

ERROR:flutter / lib / ui / ui_dart_state.cc(157)]未处理的异常:类型'String'不是'index'的'int'类型的子类型

这是我的代码:

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.js"></script>


<div id="myDiv">
  <a id="myButton" class="btn btn-primary" style="color:white;">This is a button</a>
  <a id="myOtherButton" class="btn btn-primary" style="color:white;">This is another button</a>
</div>

我做错了什么?

任何建议都会有所帮助。

0 个答案:

没有答案