onufitness_mobile/lib/themes/app_theme.dart
2026-01-13 11:36:24 +05:30

88 lines
3.1 KiB
Dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:onufitness/constants/color_constant.dart';
import '/themes/app_text_theme.dart';
class AppTheme {
static ThemeData get currentTheme => ThemeData.light().copyWith(
textTheme: AppTextTheme.currentTextTheme,
appBarTheme: AppBarTheme(
systemOverlayStyle: SystemUiOverlayStyle(
systemNavigationBarColor: Colors.white,
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.dark,
systemNavigationBarIconBrightness: Brightness.dark,
),
backgroundColor: appBarBackgroundColor,
foregroundColor: appbarTextColor,
elevation: 0,
iconTheme: IconThemeData(color: appbarTextColor),
),
primaryColor: Color(primaryColor),
primaryColorDark: deeperShadeOfprimaryColor,
primaryColorLight: yellowColor,
secondaryHeaderColor: Color(outlineButtonBorderColorSky),
// ✅ Fix the deep purple issue - use light grey colors
colorScheme: ColorScheme.light(
primary: lightGreyColor, // primary select color
onPrimary: Colors.black, // Text color on primary color
secondary: lightGreyColor,
onSecondary: Color(primaryColor),
surface: pageBackGroundColor,
onSurface: appbarTextColor,
error: Color(deleteAccountTextColorRed),
onError: Colors.white,
brightness: Brightness.light,
),
scaffoldBackgroundColor: appBarBackgroundColor,
// ✅ Bottom sheet theme
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: Colors.white,
modalBackgroundColor: Colors.white,
// shadowColor: Colors.black,
// modalBarrierColor: Colors.transparent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
),
),
// ✅ Divider theme
dividerTheme: DividerThemeData(color: containerBorderColor, thickness: 1),
// ✅ Progress indicator theme
progressIndicatorTheme: ProgressIndicatorThemeData(
color: Color(primaryColor),
),
// ✅ Bottom navigation bar theme
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: Colors.white,
selectedItemColor: appbarTextColor,
unselectedItemColor: greyTextColor1,
elevation: 8,
type: BottomNavigationBarType.fixed,
),
// ✅ Text button theme (for calendar buttons)
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(foregroundColor: Color(primaryColor)),
),
// ✅ Floating action button theme
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: Color(primaryColor),
foregroundColor: appbarTextColor,
),
// ✅ For IOS theme (Relect in Video player playback speed bottomsheet)
cupertinoOverrideTheme: CupertinoThemeData(
brightness: Brightness.light,
primaryColor: Color(darkGreyColor),
primaryContrastingColor: Colors.white,
scaffoldBackgroundColor: appBarBackgroundColor,
barBackgroundColor: Colors.white,
),
);
}