iT邦幫忙

0

Flutter Widget - BoxDecoration

new BoxDecoration(
backgroundBlendMode:
BlendMode.color,BlendMode.colorBurn ,BlendMode.colorDodge ,BlendMode.darken ,BlendMode.difference,BlendMode.dst ,BlendMode.dstATop,BlendMode.dstIn ,BlendMode.dstOut ,BlendMode.dstOver ,BlendMode.exclusion ,BlendMode.hardLight ,BlendMode.hue ,BlendMode.lighten ,
BlendMode.luminosity ,BlendMode.modulate ,BlendMode.multiply ,BlendMode.overlay ,BlendMode.plus ,BlendMode.saturation,BlendMode.screen ,BlendMode.softLight ,BlendMode.src ,BlendMode.srcATop ,BlendMode.srcIn ,BlendMode.srcOut ,BlendMode.srcOver ,BlendMode.values ,BlendMode.xor 


border :
Border.all(
  color: Colors.black,
  width: 8,
  style: BorderStyle.solid
),
border: Border(
  top: BorderSide(width: 1.0, color: Color(0xFFFFFFFFFF),style: BorderStyle.solid),
  left: BorderSide(width: 1.0, color: Color(0xFFFFFFFFFF),style: BorderStyle.solid),
  right: BorderSide(width: 1.0, color: Color(0xFFFF000000),style: BorderStyle.solid),
  bottom: BorderSide(width: 1.0, color: Color(0xFFFF000000),style: BorderStyle.solid),
)

borderRadius:
BorderRadius.circular(12),
BorderRadius.only(
    topLeft: Radius.circular(75),
    bottomRight: Radius.circular(75),
)

boxShadow: List<BoxShadow>
BoxShadow(
    color: Colors.grey.withOpacity(.5),
    blurRadius: 20.0, // soften the shadow
    spreadRadius: 0.0, //extend the shadow
    offset: Offset(
      5.0, // Move to right 10  horizontally
      5.0, // Move to bottom 10 Vertically
    )
}

color:
Color(0xFF42A5F5)
Color.fromARGB(255, 66, 165, 245)
Color.fromRGBO(66, 165, 245, 1.0)

gradient 
LinearGradient(
  begin: Alignment.topRight,
  end: Alignment.bottomLeft,
  colors: [Colors.blue, Colors.red])
),
Gradient.radial(
    Offset center,
    double radius,
    List<Color> colors,
    [List<double> colorStops,
    TileMode tileMode = TileMode.clamp,
    Float64List matrix4,
    Offset focal,
    double focalRadius = 0.0]
),
    Gradient.sweep(
    Offset center,
    List<Color> colors,
    [List<double> colorStops,
    TileMode tileMode = TileMode.clamp,
    double startAngle = 0.0,
    double endAngle = math.pi * 2,
    Float64List matrix4]
)

image:
DecorationImage(fit: BoxFit.fitWidth,image: AssetImage('assets/img/pic.jpg'))

padding :
EdgeInsets.only(top: 20.0,left: 20.0,right: 20.0,bottom: 0.0)
EdgeInsets.all(8.0)

shape:
BoxShape.circle,
rectangle.circle
)


尚未有邦友留言

立即登入留言