zoukankan      html  css  js  c++  java
  • flutter 初探1--本机图片展示

    1、加载本地图片:

    Transform.translate(
                offset: Offset(-11.0, -73.0),
                child:
                    // Adobe XD layer: '注册APP背景' (shape)
                    Container(
                   413.0,
                  height: 733.0,
                  decoration: BoxDecoration(
                    image: DecorationImage(
                      image: const AssetImage('assets/images/background.png'),
                      fit: BoxFit.fill,
                    ),
                  ),
                ),
              ),
    

      

    1. 将图片放到assets 文件夹,分三份放好;
      1.   
    2. 在pubspec.yaml中配置
      1. flutter:
        
          # The following line ensures that the Material Icons font is
          # included with your application, so that you can use the icons in
          # the material Icons class.
          uses-material-design: true
          assets:
            - assets/images/background.png
            - assets/images/2.0x/background.png
            - assets/images/3.0x/background.png
        
    www.beicaiduo.com
  • 相关阅读:
    C语言内存分析
    算法之快速排序
    单链表逆转
    C程序设计语言之一
    vim插件配置(一)
    makefile示例
    cocos2d基础入门
    Makefile
    Makefile
    GCC编译四阶段
  • 原文地址:https://www.cnblogs.com/hoge66/p/13111516.html
Copyright © 2011-2022 走看看