ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    Flutter Container宽度自适应

    Jun 27, 20222 min read

    Container是flutter开发中最常用的组件,它有以下特点:

    • 当Container没有child组件的时候,Container的宽高默认占满父控件,也就是全屏
    • 当Container有child组件的时候,宽高以child组件的宽高同等大小,也就是wrap_content
    • 当Container的child组件为Row或者Column的时候,要为主轴添加 MainAxisSize.min,否则Container在主轴上是铺满的。

    相关文章

    Echarts 设置柱状图固定背景

    Echarts设置柱状图固定背景,其中柱子有圆角边框,背景为红色。

    解决Error unable to verify the first certificate报错

    解决npm install时出现的“Error: unable to verify the first certificate”报错,可以通过取消SSL验证或更换为国内镜像源来解决。

    TypeError: Cannot destructure property 'auth' of 'urlObj' as it is undefined.

    To fix a prerender error in Next.js and trailing slash issues, set fallback to false in getStaticPaths, add trailingSlash: true in next.config.js, and ensure urlObj is defined before destructuring its properties.

    给 Vultr 西雅图服务器套了个 Cloudflare CDN

    结合Vultr服务器与Cloudflare CDN可以提升网站速度、降低服务器负载,并增强安全性,优化用户体验。

    JS 如何返回时间戳?

    JavaScript中,`getTime()`和`Date.now()`方法均可用于获取从1970年1月1日UTC开始的当前日期时间戳。