1

I am trying to make a flutter application and it seemed nice that if only I can make the status bar have the same background color as the body of the application:

from this Before

to some thing like this After

this is my main.dart code:


// ignore_for_file: prefer_const_constructors

import 'package:flutter/material.dart';
import 'package:qr_king/src/screens/welcome.dart';
import 'package:qr_king/src/utils/theme/theme.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: AppTheme.lightTheme,
      themeMode: ThemeMode.light,
      home: HomeApp(),
    );
  }
}

class HomeApp extends StatelessWidget {
  const HomeApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Welcome();
  }
}

I also did not implement the AppBar, should I?

0 Answers0