Flutter-未为类'MyApp'定义字幕”>

问题描述 投票:1回答:1

我想在主体内部使用Marquee,但是它显示的错误是类MyApp中未定义的错误>

  body: Center(
          child: Row (
            mainAxisAlignment: MainAxisAlignment.start,
            children: <Widget> [
              Marquee (
                child: Text('hello world!',           
          style: TextStyle (
            color: Colors.blueAccent, 
                   fontWeight: FontWeight.w500,
                   fontSize: 40)
                  )
              ),
            ],
        ),
        ),

如何在体内使用Marquee

我想在主体内部使用选取框,但它显示的错误是在类MyApp主体中未定义的:Center(child:Row(mainAxisAlignment:MainAxisAlignment.start,...

android ios flutter dart marquee
1个回答
0
投票

在依赖中将marque lib添加到pubspec.yaml文件并保存。

dependencies:
  flutter:
    sdk: flutter
  marquee: ^1.3.1
© www.soinside.com 2019 - 2024. All rights reserved.