main.dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main(){
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - Change Status Bar Color"),
backgroundColor: Colors.green,
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarColor: Colors.pink
),
),
),
)
);
}
More flutter tutorials
- flutter – PageView builder
- flutter – AlertDialog example
- flutter – AlertDialog scrollable
- flutter – AlertDialog shape
- flutter – Animated align
- flutter – Align example
- flutter – ActionChip example
- flutter – ActionChip size
- flutter – How to hide status bar
- flutter – Transparent status bar
- flutter – How to show hide status bar
- flutter – AppBar center title
- flutter – How to remove AppBar drop shadow
- flutter – How to change AppBar color
- flutter – MaterialApp theme