我正在与Flutter合作,并看到了以下内容:
屏幕上出现一条灰线。
也许是因为应用栏向下移动了5px,背景颜色设置为灰色?
Container(
if I delete width but uncomment height it works but it sets a width of background around 200px I need double.infiniti
If I run the code it sets width to device.width but make the grey line visible
// height: device.height * 390 / 812,
width: double.infinity,
child: BuildSvg('assets/svg/backgroundGradient.svg'),
),
buildsvg
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class BuildSvg extends StatelessWidget {
final url;
BuildSvg(this.url);
@override
Widget build(BuildContext context) {
final String assetName = url;
final Widget svg = new SvgPicture.asset(assetName, semanticsLabel: '');
return svg
}
}