【发布时间】:2021-02-28 09:23:28
【问题描述】:
在我的应用启动后,它会立即显示一个按钮。 按下此按钮后,我想在同一按钮内构建一个滑块来控制此声音的音量。
我需要的只是让这个滑块出现,而不是控制音量的机制。
我想要实现的是here..
我的按钮代码
void main() => runApp(Home());
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "RelaX",
home: Container(
child: Scaffold(
appBar: AppBar(
elevation: 20.0,
backgroundColor: Color(0xFF001E3D),
title: Text(
'Relax',
style: GoogleFonts.raleway(
fontSize: 30.0,
color: Color(0xFF55b9f3),
),
),
centerTitle: true,
),
body: Column(
children: <Widget>[
RaisedButton(
child: Text("View Slider"),
onPressed: () => print("view slider")),
],
),
),
),
);
}
}
【问题讨论】:
标签: flutter build widget flutter-animation statefulwidget