93 lines
3.1 KiB
Dart
Raw Normal View History

2025-08-27 12:43:25 +07:00
import 'package:flutter/material.dart';
2025-08-27 15:07:49 +07:00
import '../../presentation/components/assets/fonts.gen.dart';
2025-08-27 12:43:25 +07:00
part 'app_color.dart';
part 'app_style.dart';
part 'app_value.dart';
2025-08-27 16:19:54 +07:00
UnderlineInputBorder _inputBorder = UnderlineInputBorder(
borderSide: BorderSide(color: AppColor.borderDark, width: 1),
);
2025-08-27 12:43:25 +07:00
class ThemeApp {
static ThemeData get theme => ThemeData(
2025-08-27 15:07:49 +07:00
useMaterial3: true,
fontFamily: FontFamily.quicksand,
primaryColor: AppColor.primary,
scaffoldBackgroundColor: AppColor.white,
2025-09-18 08:48:36 +07:00
datePickerTheme: DatePickerThemeData(
backgroundColor: AppColor.white,
todayBackgroundColor: MaterialStateProperty.resolveWith<Color?>((states) {
if (states.contains(MaterialState.selected)) {
return AppColor.primary; // warna background tanggal terpilih
}
return null; // default
}),
todayBorder: BorderSide(color: AppColor.primary, width: 1),
dayBackgroundColor: MaterialStateProperty.resolveWith<Color?>((states) {
if (states.contains(MaterialState.selected)) {
return AppColor.primary; // warna background tanggal terpilih
}
return null; // default
}),
dayForegroundColor: MaterialStateProperty.resolveWith<Color?>((states) {
if (states.contains(MaterialState.selected)) {
return AppColor.white; // warna text tanggal terpilih
}
return null; // default
}),
),
2025-08-27 16:19:54 +07:00
appBarTheme: AppBarTheme(
backgroundColor: AppColor.white,
foregroundColor: AppColor.textPrimary,
elevation: 0,
titleTextStyle: AppStyle.xl.copyWith(
color: AppColor.primary,
fontWeight: FontWeight.w600,
),
centerTitle: true,
iconTheme: IconThemeData(color: AppColor.primary),
2025-08-27 19:37:22 +07:00
scrolledUnderElevation: 0.0,
2025-08-27 16:19:54 +07:00
),
2025-08-27 15:07:49 +07:00
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: AppColor.primary,
foregroundColor: Colors.white,
elevation: 0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(24)),
),
),
2025-08-27 16:19:54 +07:00
inputDecorationTheme: InputDecorationTheme(
border: _inputBorder,
focusedBorder: _inputBorder.copyWith(
borderSide: BorderSide(color: AppColor.primary, width: 2),
),
enabledBorder: _inputBorder,
disabledBorder: _inputBorder.copyWith(
borderSide: BorderSide(color: AppColor.border),
),
errorBorder: _inputBorder.copyWith(
borderSide: BorderSide(color: AppColor.error),
),
hintStyle: AppStyle.md.copyWith(
color: AppColor.textLight,
fontWeight: FontWeight.w500,
),
contentPadding: const EdgeInsets.symmetric(vertical: 12),
),
2025-08-27 18:51:14 +07:00
bottomNavigationBarTheme: BottomNavigationBarThemeData(
type: BottomNavigationBarType.fixed,
selectedItemColor: AppColor.primary,
unselectedItemColor: AppColor.textSecondary,
backgroundColor: AppColor.white,
elevation: 4,
),
2025-08-29 20:34:26 +07:00
tabBarTheme: TabBarThemeData(
indicatorColor: AppColor.primary,
labelColor: AppColor.primary,
unselectedLabelColor: AppColor.textSecondary,
),
2025-08-27 15:07:49 +07:00
);
2025-08-27 12:43:25 +07:00
}