XGradientText constructor

const XGradientText({
  1. Key? key,
  2. String text = "Camellia UI",
  3. TextStyle textStyle = const TextStyle(fontSize: 35, color: Colors.white, fontWeight: FontWeight.normal),
  4. List<Color> commonColors = const [Color.fromARGB(255, 0, 128, 255), Color.fromARGB(255, 0, 64, 148)],
  5. List<Color> hoverColors = const [Color.fromARGB(255, 43, 0, 171), Color.fromARGB(255, 103, 38, 255)],
})

Implementation

const XGradientText({
  super.key,
  // 文本
  this.text = "Camellia UI",
  // 文本样式
  this.textStyle = const TextStyle(
    // 字体大小默认35
    fontSize: 35,
    color: Colors.white,
    fontWeight: FontWeight.normal,
  ),
  this.commonColors = const [
    Color.fromARGB(255, 0, 128, 255),
    Color.fromARGB(255, 0, 64, 148),
  ],
  this.hoverColors = const [
    Color.fromARGB(255, 43, 0, 171),
    Color.fromARGB(255, 103, 38, 255),
  ],
});