light static method
Light theme and its settings.
Implementation
static ThemeData light() => ThemeData(
useMaterial3: true,
visualDensity: visualDensity,
textTheme: const TextTheme(
titleLarge: TextStyle(
color: MyColor.textColor,
fontFamily: MyConstant.poppinsMedium,
fontSize: 28,
),
titleMedium: TextStyle(
color: MyColor.textColor,
fontSize: 16,
fontFamily: MyConstant.poppinsMedium,
),
titleSmall: TextStyle(
fontSize: 12,
color: MyColor.textColor,
fontFamily: MyConstant.poppinsRegular,
),
bodyLarge: TextStyle(
fontSize: 14,
color: MyColor.textColor,
fontFamily: MyConstant.rubikRegular,
),
bodyMedium: TextStyle(
fontSize: 11,
color: MyColor.textColor,
fontFamily: MyConstant.rubikRegular,
),
bodySmall: TextStyle(
fontSize: 10,
color: MyColor.textColor,
fontFamily: MyConstant.rubikRegular,
),
),
scaffoldBackgroundColor: Colors.white,
cardColor: AppColors.cardLight,
iconTheme: const IconThemeData(color: AppColors.iconDark),
appBarTheme: const AppBarTheme(
iconTheme: IconThemeData(color: MyColor.textThird, size: 20),
backgroundColor: Colors.white,
titleTextStyle: TextStyle(
color: MyColor.textColor,
fontSize: 13.5,
fontFamily: MyConstant.poppinsMedium,
),
),
colorScheme: ColorScheme.fromSwatch(
primarySwatch: MyColor.primary,
accentColor: MyColor.primaryAccent,
),
inputDecorationTheme: const InputDecorationTheme(
labelStyle: TextStyle(fontSize: 12, color: MyColor.textThird),
hintStyle: TextStyle(
fontSize: 12, color: MyColor.textThird, letterSpacing: 1.2),
isDense: true,
filled: true,
prefixIconColor: MyColor.textThird,
fillColor: MyColor.cardBackgroundColor,
contentPadding: EdgeInsets.symmetric(vertical: 14, horizontal: 20),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(30)),
borderSide: BorderSide(color: MyColor.inActiveColor, width: 0.3),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(30)),
borderSide: BorderSide(color: MyColor.inActiveColor, width: 0.3),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(30)),
borderSide: BorderSide(color: Colors.red),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(30)),
borderSide: BorderSide(color: Colors.red),
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ButtonStyle(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50),
),
),
padding: WidgetStateProperty.all(
const EdgeInsets.symmetric(vertical: 10),
),
backgroundColor: WidgetStateProperty.all(MyColor.bluePrimary),
foregroundColor: WidgetStateProperty.all(Colors.white),
),
),
dialogTheme: const DialogTheme(
backgroundColor: Colors.white,
contentTextStyle: TextStyle(
fontFamily: "Poppins_Regular",
fontSize: 14,
color: MyColor.textColor,
fontWeight: FontWeight.w600,
),
),
tabBarTheme: const TabBarTheme(
labelColor: MyColor.textColor,
unselectedLabelColor: MyColor.textThird,
unselectedLabelStyle: TextStyle(
color: MyColor.bluePrimary,
fontSize: 12,
fontWeight: FontWeight.bold,
),
labelPadding: EdgeInsets.symmetric(horizontal: 15),
labelStyle: TextStyle(
fontWeight: FontWeight.bold,
color: MyColor.bluePrimary,
fontSize: 13.5,
),
indicatorColor: MyColor.bluePrimary,
indicatorSize: TabBarIndicatorSize.tab,
),
);