小编Ani*_*udh的帖子

How can I give widgets thickness in the z direction?

I implemented an effect that I found on this medium article https://medium.com/flutter/perspective-on-flutter-6f832f4d912e that allows you rotate widgets in 3d space. My only problem with this is that all of my widgets seem to have no thickness in the z direction so unsightly things like this happen:

应用截图

My unrotated logo looks like this:

原创标志

And this is the code I used to create this rotation effect:

import 'package:flutter/material.dart';

class PerspectiveContainer extends StatefulWidget {
  final Widget child;
  PerspectiveContainer({Key key, @required this.child}) : super(key: …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-layout

7
推荐指数
1
解决办法
278
查看次数

标签 统计

flutter ×1

flutter-layout ×1