简体   繁体   English

我怎样才能使屏幕具有多个屏幕,如 iOS 或 android 多任务操作 flutter 应用程序

[英]how can i make screen have multi screens like iOS or android multi tasking action flutter app

Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Scaffold( resizeToAvoidBottomInset: true, backgroundColor: Colors.white, drawer: SideBar(_changeIndexNumber), appBar: AppBar( backgroundColor: Colors.transparent, iconTheme: IconThemeData(color: Colors.black), elevation: 0, foregroundColor: Colors.white, title: TextField( style: TextStyle( fontFamily: 'Footlight', color: Colors.white, backgroundColor: Colors.white), decoration: InputDecoration( border: UnderlineInputBorder(), hintText: 'Search...'), ), actions: [ Container( padding: EdgeInsets.fromLTRB(5, 2, 5, 2), child: Icon(Icons.logout_outlined), ) ], ), body: Padding( padding: const EdgeInsets.fromLTRB(0, 0, 0, 0), child: Screens[screenIndex], ), ), );小部件构建(BuildContext 上下文){ 返回 MaterialApp(debugShowCheckedModeBanner:false,home:Scaffold(resizeToAvoidBottomInset:true,backgroundColor:Colors.white,抽屉:SideBar(_changeIndexNumber),appBar:AppBar(backgroundColor:Colors.transparent,iconTheme:IconThemeData(颜色:Colors.black),海拔:0,foregroundColor:Colors.white,标题:TextField(样式:TextStyle(fontFamily:'Footlight',颜色:Colors.white,backgroundColor:Colors.white),装饰:InputDecorationBorder(边框: (), hintText: 'Search...'), ), actions: [ Container( padding: EdgeInsets.fromLTRB(5, 2, 5, 2), child: Icon(Icons.logout_outlined), ) ], ), 正文: 填充 (填充: const EdgeInsets.fromLTRB(0, 0, 0, 0), child: Screens[screenIndex], ), ), ); } } } }

Check out this dart code written by someone in the community.查看社区中某人编写的 dart 代码。

https://dartpad.dev/?id=33611484d7b78eb1b2b93d9fabc7d439 https://dartpad.dev/?id=33611484d7b78eb1b2b93d9fabc7d439

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM