如何用颤动创建复杂的飞溅屏幕?

发布于 2025-01-25 07:37:26 字数 324 浏览 4 评论 0原文

我正在寻找一种创建更复杂的飞溅屏幕的方法,而不是图标和背景色(对于Android)。我如何通过编辑启动屏幕板文件来为iOS实现这一目标,但是如何为Android做到这一点?

我正在寻找类似的东西:

”“在此处输入图像描述”

如您所见,不仅背景和一个图像,底部也有文本。 提前致谢。

I'm searching for a way to create a more complex splashscreen than just a icon and a backgroundcolor (for android). I how you can achieve that for iOS by editing the LaunchScreen.storyboard file, but how would you do that for android?

I'm looking for something like that:

enter image description here

As you see there isn't only a background and one image, there is also text at the bottom.
Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回梦 2025-02-01 07:37:26

UI设计用于飞溅屏幕。 如果您需要在应用程序上实现splash屏幕,请在main.dart文件中添加此代码。

class StackOverFlow extends StatefulWidget {
  const StackOverFlow({Key? key}) : super(key: key);

  @override
  State<StackOverFlow> createState() => StackOverFlowState();
}

class StackOverFlowState extends State<StackOverFlow> {


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color.fromRGBO(206,37,37,1),
      body: bodyWidget(),
      bottomSheet: bottomSheetWidget(),
    );
  }

 Widget bodyWidget() {
    return Column(
      children: [
        SizedBox(height: MediaQuery.of(context).size.height/5),
        Center(
          child: Container(
            constraints: const BoxConstraints(
              minHeight: 200.0,
              maxHeight: 200.0,
              minWidth: 200.0,
              maxWidth: 300.0,
            ),
            decoration: const BoxDecoration(
              color: Colors.transparent,
              image: DecorationImage(
                image: AssetImage('assets/eagle.png'),
                fit: BoxFit.fill,
              ),
            ),
          ),
        ),
      ],
    );
 }

  Widget bottomSheetWidget() {
    return Row(
      mainAxisAlignment: MainAxisAlignment.center,
      children: const [
        Padding(
          padding: EdgeInsets.only(bottom: 30.0),
          child: Text.rich(
            TextSpan(
              children: [
                TextSpan(
                  text: 'powered by  ',
                  style: TextStyle(
                    color: Color.fromRGBO(215, 215, 215, 1.0),
                    fontStyle: FontStyle.normal,
                    fontWeight: FontWeight.w100,
                    fontSize: 9.0,
                  ),
                ),
                TextSpan(
                  text: '❤ ',
                  style: TextStyle(
                    color: Color.fromRGBO(255, 255, 255, 1.0),
                    fontStyle: FontStyle.normal,
                    fontWeight: FontWeight.w500,
                    fontSize: 20.0,
                  ),
                ),
                TextSpan(
                  text: 'MEO ',
                  style: TextStyle(
                    color: Color.fromRGBO(255, 255, 255, 1.0),
                    fontStyle: FontStyle.normal,
                    fontWeight: FontWeight.w500,
                    fontSize: 17.0,
                  ),
                ),
                TextSpan(
                  text: 'Wallet',
                  style: TextStyle(
                    color: Color.fromRGBO(215, 215, 215, 1.0),
                    fontStyle: FontStyle.normal,
                    fontWeight: FontWeight.w500,
                    fontSize: 13.0,
                  ),
                ),
              ],
            ),
          ),
        ),
      ],
    );
  }
}

您可以根据需要更改图像和图标... i.sstatic.net/27nmr.png“ rel =“ nofollow noreferrer”>

UI Design for your splash screen. you can change image and icon as your need... if you need to implement splash screen on your app add this code in your main.dart file with future.delayed and mention time period to display

class StackOverFlow extends StatefulWidget {
  const StackOverFlow({Key? key}) : super(key: key);

  @override
  State<StackOverFlow> createState() => StackOverFlowState();
}

class StackOverFlowState extends State<StackOverFlow> {


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color.fromRGBO(206,37,37,1),
      body: bodyWidget(),
      bottomSheet: bottomSheetWidget(),
    );
  }

 Widget bodyWidget() {
    return Column(
      children: [
        SizedBox(height: MediaQuery.of(context).size.height/5),
        Center(
          child: Container(
            constraints: const BoxConstraints(
              minHeight: 200.0,
              maxHeight: 200.0,
              minWidth: 200.0,
              maxWidth: 300.0,
            ),
            decoration: const BoxDecoration(
              color: Colors.transparent,
              image: DecorationImage(
                image: AssetImage('assets/eagle.png'),
                fit: BoxFit.fill,
              ),
            ),
          ),
        ),
      ],
    );
 }

  Widget bottomSheetWidget() {
    return Row(
      mainAxisAlignment: MainAxisAlignment.center,
      children: const [
        Padding(
          padding: EdgeInsets.only(bottom: 30.0),
          child: Text.rich(
            TextSpan(
              children: [
                TextSpan(
                  text: 'powered by  ',
                  style: TextStyle(
                    color: Color.fromRGBO(215, 215, 215, 1.0),
                    fontStyle: FontStyle.normal,
                    fontWeight: FontWeight.w100,
                    fontSize: 9.0,
                  ),
                ),
                TextSpan(
                  text: '❤ ',
                  style: TextStyle(
                    color: Color.fromRGBO(255, 255, 255, 1.0),
                    fontStyle: FontStyle.normal,
                    fontWeight: FontWeight.w500,
                    fontSize: 20.0,
                  ),
                ),
                TextSpan(
                  text: 'MEO ',
                  style: TextStyle(
                    color: Color.fromRGBO(255, 255, 255, 1.0),
                    fontStyle: FontStyle.normal,
                    fontWeight: FontWeight.w500,
                    fontSize: 17.0,
                  ),
                ),
                TextSpan(
                  text: 'Wallet',
                  style: TextStyle(
                    color: Color.fromRGBO(215, 215, 215, 1.0),
                    fontStyle: FontStyle.normal,
                    fontWeight: FontWeight.w500,
                    fontSize: 13.0,
                  ),
                ),
              ],
            ),
          ),
        ),
      ],
    );
  }
}

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文