I have a container and add linear gradient colour. I want to make same colour with status bar. Now colour is a bit different. Please see in attached image. Status bar colour is dark blue. If I make same status bar colour and container colour as same colour code but I need a gradient colour like in image.
Is it because of the gradient colour?
May I know how to make it same.
Regards, Alex
// ignore_for_file: prefer_const_constructors_in_immutables
import 'package:flutter/material.dart';
import 'package:thitsarparami/screens/colors.dart';
import 'colors.dart' as color;
class Home extends StatefulWidget {
Home({Key? key}) : super(key: key);
@override
_HomeState createState() => _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
// SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
// statusBarColor: AppColor.homePageBackground,
// ));
return Scaffold(
// backgroundColor: AppColor.homePageBackground,
body: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
AppColor.gradientFirst.withOpacity(0.9),
AppColor.gradientSecond,
],
begin: const FractionalOffset(0.0, 0.4),
end: Alignment.topRight,
),
),
child: Column(
children: [
Container(
padding: const EdgeInsets.only(top: 30 , left: 30, right: 30),
width: MediaQuery.of(context).size.width,
height: 250,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Text(
'ဘုရားရှိခိုးအမျိူးမျိူးနှင့်',
style: TextStyle(
fontSize: 18,
color: color.AppColor.homePageTitleColor,
),
),
],
),
const SizedBox(
height: 10,
),
Row(
children: [
Text(
'ဝတ်ရွတ်စဥ်',
style: TextStyle(
fontSize: 25,
color: color.AppColor.homePageTitleColor,
),
),
],
)
],
),
const SizedBox(
width: 10,
),
Container(
width: 150,
//height: 150,
decoration: const BoxDecoration(
//color: Colors.amber,
image: DecorationImage(
image: AssetImage("assets/images/buddha.png"),
fit: BoxFit.cover),
),
)
],
),
),
Expanded(
child: Container(
decoration: BoxDecoration(
color: AppColor.homePageMenuBackground,
borderRadius: const BorderRadius.only(
topRight: Radius.circular(70),
),
),
),
),
],
),
),
);
} }