popeyelau / wiki

📒Wiki for many useful notes, source, commands and snippets.
2 stars 0 forks source link

Flutter 一些坑 #34

Open popeyelau opened 3 years ago

popeyelau commented 3 years ago

WebView 相关

popeyelau commented 3 years ago
Stack(
      overflow: Overflow.visible, //超出边界显示
      children: [
        //...
        Positioned(
            right: -20,
            bottom: -20,
            child: GestureDetector(
              onTap: () {
                //如果点击区域在超出边界范围内,是不会响应事件的
              },
            )),
      ],
    );

https://github.com/flutter/flutter/issues/19445 https://stackoverflow.com/questions/62258640/flutter-overflowed-positioned-button-is-not-clickable

popeyelau commented 3 years ago

临时解决方案 向上偏移 1px Transform.translate(offset: Offset(0, -1), child: <some widget>);

https://github.com/flutter/flutter/issues/14288 https://github.com/flutter/flutter/issues/37578

popeyelau commented 3 years ago
 Container(
  padding: EdgeInsets.all(16.0),
  child: Column(
    children: [
      Container(color: randomColor, height: rowHeight),
      Container(color: randomColor, height: rowHeight),
      Container(
        height: rowHeight,
        child: OverflowBox(  //OverflowBox
          minWidth: screenWidth,
          minHeight: rowHeight,
          maxHeight: rowHeight,
          maxWidth: screenWidth,
          child: Container(
            color: Colors.indigo,
            child: Center(child: Text("Hello World")),
          ),
        ),
      ),
      Container(color: randomColor, height: rowHeight),
    ],
  ))
popeyelau commented 3 years ago

webview_flutter iOS 视频默认全屏 https://github.com/flutter/flutter/issues/25630

popeyelau commented 2 years ago

虚线边框 https://github.com/flutter/flutter/issues/4858#issuecomment-472716207