ThemeData class
theme: ThemeData(
primaryColor: Colors.blue,
accentColor: Colors.green,
textTheme: TextTheme(bodyText2: TextStyle(color: Colors.purple)),
),
and many other properties in this.
for whole app
theme: ThemeData.dark().copyWith( // copywith for showing body text we
primaryColor: Color(0xFF0a0d22), can also take only themedata
scaffoldBackgroundColor: Color(0xFF090c21),
),
For particular icon
floatingActionButton: Theme(
data: ThemeData(
accentColor: Colors.purple,
),
child: FloatingActionButton(
child: Icon(Icons.add),
),
),
Comments
Post a Comment