getApplicationTheme static method
ThemeData
getApplicationTheme()
Implementation
static ThemeData getApplicationTheme() {
return ThemeData(
progressIndicatorTheme: const ProgressIndicatorThemeData(
color: Colors.white,
),
tabBarTheme: TabBarTheme(
indicator: UnderlineTabIndicator(
borderSide: BorderSide(
color: purple,
width: 2.0,
),
),
),
checkboxTheme: CheckboxThemeData(
checkColor: MaterialStateProperty.all(
Colors.white,
),
fillColor: MaterialStateProperty.all(
purple,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4.0),
),
),
switchTheme: SwitchThemeData(
overlayColor: MaterialStateProperty.all(
Colors.transparent,
),
splashRadius: 0.0,
),
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: Colors.white,
enableFeedback: true,
selectedItemColor: purple,
unselectedItemColor: black.withOpacity(0.2),
showSelectedLabels: false,
showUnselectedLabels: false,
type: BottomNavigationBarType.fixed,
elevation: 0.0,
),
dividerTheme: DividerThemeData(
thickness: 1.0,
color: black.withOpacity(0.15),
space: 30.0,
),
primaryColor: purple,
scaffoldBackgroundColor: Colors.white,
fontFamily: 'Avenir',
appBarTheme: AppBarTheme(
backgroundColor: Colors.white,
elevation: 0.0,
iconTheme: IconThemeData(
color: black,
),
),
radioTheme: RadioThemeData(
fillColor: MaterialStateProperty.resolveWith<Color?>(
(states) {
if (states.contains(MaterialState.disabled)) {
return const Color(0xffA9B1B7);
} else {
return purple;
}
},
),
),
sliderTheme: SliderThemeData(
activeTrackColor: orange,
inactiveTrackColor: Colors.white.withOpacity(0.6),
showValueIndicator: ShowValueIndicator.always,
thumbColor: orange,
overlayColor: Colors.transparent,
overlayShape: const RoundSliderOverlayShape(
overlayRadius: 0.0,
),
valueIndicatorShape: const PaddleSliderValueIndicatorShape(),
valueIndicatorColor: Colors.white,
valueIndicatorTextStyle: TextStyle(
fontFamily: 'Gilroy',
color: black,
fontWeight: FontWeight.bold,
),
),
iconTheme: IconThemeData(
color: black,
),
inputDecorationTheme: InputDecorationTheme(
floatingLabelBehavior: FloatingLabelBehavior.always,
border: UnderlineInputBorder(
borderSide: BorderSide(
color: black.withOpacity(0.1),
width: 1.0,
),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: black.withOpacity(0.1),
width: 1.0,
),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: purple,
width: 1.0,
),
),
errorBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: orange,
width: 1.0,
),
),
focusedErrorBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: orange,
width: 1.0,
),
),
disabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: black.withOpacity(0.1),
width: 1.0,
),
),
),
);
}