theme static method

ThemeData theme()

Implementation

static ThemeData theme() {
  return ThemeData(
    useMaterial3: true,

    // ------------------- APP BAR -------------------
    appBarTheme: AppBarTheme(
      color: kglobal.shared.themeclr.value,
      foregroundColor: Colors.white,
      centerTitle: true,
    ),

    // ------------------- TEXT FIELD -------------------
    inputDecorationTheme: InputDecorationTheme(
      labelStyle: TextStyle(color: kglobal.shared.themeclr.value),
      fillColor: const Color(0xFFF5F5F5), // replace with your ColorTheme.textfieldBackground
      floatingLabelStyle: TextStyle(color: kglobal.shared.themeclr.value),

      enabledBorder: OutlineInputBorder(
        borderSide: const BorderSide(color: Color(0xFFCCCCCC), width: 1), // replace border color
        borderRadius: BorderRadius.circular(10.0),
      ),

      focusedBorder: OutlineInputBorder(
        borderRadius: BorderRadius.circular(10.0),
        borderSide: BorderSide(color: kglobal.shared.themeclr.value),
      ),

      errorBorder: OutlineInputBorder(
        borderRadius: BorderRadius.circular(10.0),
        borderSide: BorderSide(color: Colors.red),
      ),

      focusedErrorBorder: OutlineInputBorder(
        borderSide: const BorderSide(color: Colors.red, width: 1),
        borderRadius: BorderRadius.circular(10.0),
      ),

      errorStyle: const TextStyle(color: Colors.red),
      contentPadding: const EdgeInsets.fromLTRB(20, 10, 10, 10),
    ),

    // ------------------- FAB -------------------
    floatingActionButtonTheme: FloatingActionButtonThemeData(
      backgroundColor: kglobal.shared.themeclr.value,
      foregroundColor: Colors.white,
    ),

    // ------------------- BUTTONS -------------------
    elevatedButtonTheme: ElevatedButtonThemeData(
      style: ButtonStyle(
        backgroundColor: MaterialStateProperty.all(kglobal.shared.themeclr.value),
        foregroundColor: MaterialStateProperty.all(Colors.white),
      ),
    ),

    // ------------------- ICONS -------------------
    iconTheme: IconThemeData(color: kglobal.shared.themeclr.value),

    // ------------------- BOTTOM NAV BAR -------------------
    bottomNavigationBarTheme: BottomNavigationBarThemeData(
      backgroundColor: kglobal.shared.themeclr.value,
      selectedItemColor: kglobal.shared.themeclr.value,
      unselectedItemColor: Colors.grey,
    ),
  );
}