I am trying to change the background color of AppBar but it is not working.
When choosing the color 0x673AB7
according to the image below, AppBar turns gray instead of purple.
import "package:flutter/material.dart";
void main() {
runApp(new ControlleApp());
}
class ControlleApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "Controlle Financeiro",
home: new HomePage(),
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
backgroundColor: new Color(0x673AB7),
),
);
}
}
It looks like your color is completely transparent. Try changing the color to 0xFF673AB7
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With