• flutter实现底部弹出框


     

    1. _blockUser(BuildContext context){
    2. showModalBottomSheet(
    3. context: context,
    4. isDismissible: true,
    5. isScrollControlled: false,
    6. shape: const RoundedRectangleBorder(borderRadius: BorderRadius.only(topLeft: Radius.circular(15), topRight: Radius.circular(15))),
    7. builder: (BuildContext context) {
    8. return Container(
    9. decoration: const BoxDecoration(
    10. color: Colors.white,
    11. borderRadius: BorderRadius.only(topLeft: Radius.circular(15),topRight: Radius.circular(15))
    12. ),
    13. height: ScreenAdapter.height(370),
    14. child: Column(
    15. children: [
    16. Container(padding: const EdgeInsets.fromLTRB(15, 20, 15, 5),child: Text("将联系人'测试屏蔽人名称名称名称'屏蔽,同事删除该联系人的聊天记录",maxLines:2,style: TextStyle(color: const Color.fromRGBO(236, 94, 104, 1),fontSize: ScreenAdapter.size(25)),),),
    17. const Divider(),
    18. Padding(padding: EdgeInsets.only(bottom: ScreenAdapter.height(10)),child: Center(child: Text("删除联系人",style: TextStyle(color: Colors.red,fontSize: ScreenAdapter.size(30)),),),),
    19. Container(color: const Color.fromRGBO(250, 250, 252,0.5),height: ScreenAdapter.height(15)),
    20. InkWell(
    21. onTap: (){
    22. Navigator.pop(context);
    23. },
    24. child:Container(padding: const EdgeInsets.fromLTRB(0,10,0,15),child: Text("取消",style: TextStyle(color: const Color.fromRGBO(236, 94, 104, 1),fontSize: ScreenAdapter.size(30)),)),),
    25. ],
    26. ),
    27. );
    28. });
    29. }

  • 相关阅读:
    实验三 进程管理
    机械转码日记【24】继承
    IIS系统结构
    树莓派系统文件解析
    UE5.4新功能 - MotionDesign上手简介
    SSM 注解配置方式整合
    C语言指针面试题——第二弹
    vue 基于element-plus el-button封装按钮组件
    golang中的错误处理
    查看和修改自己的git提交时的作者信息
  • 原文地址:https://blog.csdn.net/u013600907/article/details/126363363