DEV Community

Cover image for A month of Flutter: initial theme

A month of Flutter: initial theme

abraham profile image Abraham Williams Originally published at ・2 min read

Originally published on

I don't have a full theme designed yet but I am planning on going in a clean and minimalist direction. So let's take the current default design and clean it up a little.

Screenshot of default Material Design

There are a couple of changes to the code for this theme cleanup. The first we'll cover is changing the status bar and navigation bar colors. The SystemChrome change will go in the main function. We'll also have to import services to get access to SystemChrome.

import 'package:flutter/services.dart';

void main() {

    const SystemUiOverlayStyle(
      statusBarColor: Colors.white,
      systemNavigationBarColor: Colors.white,
      systemNavigationBarIconBrightness: Brightness.dark,
Enter fullscreen mode Exit fullscreen mode

Note that a full restart of the app is needed for the system UI color changes.

The next change is customizing the theme on MaterialApp. These changes disable the debug banner, tell MaterialApp to be in light brightness mode, and set a few colors to white. The title is also changed to just Birb.

  debugShowCheckedModeBanner: false,
  title: 'Birb',
  theme: ThemeData(
    brightness: Brightness.light,
    primaryColor: Colors.white,
    scaffoldBackgroundColor: Colors.white,
  home: const MyHomePage(title: 'Birb'),
Enter fullscreen mode Exit fullscreen mode

The next change is to center the title of the AppBar and remove it's elevation (shadow).

  title: Center(
    child: Text(widget.title),
  elevation: 0.0,
Enter fullscreen mode Exit fullscreen mode

And the final change is to update and center the placeholder text. This will eventually turn into a widget to display when there are no images to show.

const Center(
  child: Text('No Birbs a birbing'),
Enter fullscreen mode Exit fullscreen mode

Now we have this nice clean base theme to continue building on.

Screenshot of new clean design

If you want to learn more about theming Flutter apps, check out the Building Beautiful UIs with Flutter codelab.

Code changes

Discussion (2)

Editor guide
tabuz profile image
Hubert Zelek

Thanks for this tiny insight of themeing, I believe many people will find it useful as I expect Flutter to gain a lot of momentum once they announced 1.0.
Will this month-of-flutter finish with some sort of standalone app like to-do? I'm just curious where are you going with it?

abraham profile image
Abraham Williams Author

I talked a little bit about what I'm building in the original post. It's basically an Instagram clone.