Reputation: 1159
I was working with Flutter and saw this:
a grey line appeared on my screen.
maybe it is because the appbar is moved down by, for example, 5px and the background color is set to grey?
BTW on iPhones, it works perfect, no lines
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
}
}
Upvotes: 0
Views: 1061
Reputation: 124
This might help you :
you can change the color of the status bar from scaffold so it can be transparent
import 'package:flutter/services.dart';
class WelcomeScreen extends StatefulWidget {
@override
_WelcomeScreenState createState() => _WelcomeScreenState();
}
class _WelcomeScreenState extends State<WelcomeScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
extendBodyBehindAppBar: true,
appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(statusBarColor: Colors.transparent),
elevation: 0,
backgroundColor: Colors.transparent,
),
)
}
Upvotes: 1