0

我正在使用glassmorphism,我想为glassmorphism. 以下是我希望它看起来如何的示例:

在此处输入图像描述

请注意边缘有白光。

我想在这里添加这种风格:

在此处输入图像描述

以下是玻璃态的代码:

GlassmorphicContainer getGlassmorphicContainer(
          double screenHeight, double screenWidth, BuildContext context) =>
      GlassmorphicContainer(
        height: screenHeight * 0.56,
        width: screenWidth * 0.9,
        padding: EdgeInsets.all(20),
        borderRadius: 20,
        blur: 20,
        alignment: Alignment.bottomCenter,
        // border: 2,
        linearGradient: LinearGradient(
            begin: Alignment.topLeft,
            end: Alignment.bottomRight,
            colors: [
              Color(0xFFffffff).withOpacity(0.1),
              Color(0xFFFFFFFF).withOpacity(0.05),
            ],
            stops: [
              0.1,
              1,
            ]),
        borderGradient: LinearGradient(
          begin: Alignment.topLeft,
          end: Alignment.bottomRight,
          colors: [
            Theme.of(context).primaryColorDark.withOpacity(0.5),
            Theme.of(context).primaryColorDark.withOpacity(0.5),
          ],
        ),

        child: Padding(
          padding: const EdgeInsets.all(12.0),
          child: balanceGraphContent(screenHeight, screenWidth, context),
        ),
      );

我怎样才能获得白光?

4

0 回答 0