Skip to content

Commit

Permalink
update dark theme primary color and containers color (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-ishita-g authored Dec 16, 2024
1 parent d5c1909 commit c7d173a
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion app/lib/ui/components/profile_picture.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class _ProfileImageState extends State<ProfileImage> {
child: Text(
widget.firstLetter,
style: widget.style ?? AppTextStyle.subtitle2
.copyWith(color: context.colorScheme.textPrimaryDark)),
.copyWith(color: context.colorScheme.textInversePrimary)),
),
),
),
Expand Down
1 change: 1 addition & 0 deletions app/lib/ui/flow/geofence/edit/edit_place_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ class _EditPlaceViewState extends ConsumerState<EditPlaceScreen> {
trackOutlineColor:
WidgetStatePropertyAll(context.colorScheme.outline),
trackOutlineWidth: const WidgetStatePropertyAll(0.5),
activeColor: context.colorScheme.containerLowOnSurface,
)
],
);
Expand Down
4 changes: 2 additions & 2 deletions app/lib/ui/flow/geofence/places/places_list_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ class _PlacesViewState extends ConsumerState<PlacesListScreen> {
SvgPicture.asset(
Assets.images.icPlusIcon,
colorFilter: ColorFilter.mode(
context.colorScheme.onPrimary,
context.colorScheme.textInversePrimary,
BlendMode.srcATop,
),
),
const SizedBox(width: 8),
Text(
context.l10n.places_list_add_place_btn_text,
style: AppTextStyle.button.copyWith(
color: context.colorScheme.onPrimary,
color: context.colorScheme.textInversePrimary,
),
)
],
Expand Down
2 changes: 1 addition & 1 deletion app/lib/ui/flow/home/map/components/space_user_footer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class _SpaceUserFooterState extends State<SpaceUserFooter> {
context: context,
icon: Assets.images.icGeofenceIcon,
iconSize: 24,
foreground: context.colorScheme.onPrimary,
foreground: context.colorScheme.textInversePrimary,
background: context.colorScheme.primary,
onTap: widget.onPlacesTap,
),
Expand Down
2 changes: 1 addition & 1 deletion app/lib/ui/flow/home/map/map_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ class _MapScreenState extends ConsumerState<MapScreen> {
textPainter.text = TextSpan(
text: userName.isNotEmpty ? userName[0] : '',
style: TextStyle(
fontSize: Platform.isAndroid ? 70 : 40, color: Colors.white),
fontSize: Platform.isAndroid ? 70 : 40, color: context.colorScheme.textInversePrimary),
);
textPainter.layout();
textPainter.paint(
Expand Down
8 changes: 4 additions & 4 deletions app/lib/ui/flow/message/chat/chat_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class _ChatScreenState extends ConsumerState<ChatScreen> {
firstLetter: sender!.firstChar,
size: 24,
style: AppTextStyle.caption.copyWith(
color: context.colorScheme.textPrimaryDark,
color: context.colorScheme.textInversePrimary,
),
backgroundColor: context.colorScheme.primary,
),
Expand Down Expand Up @@ -310,7 +310,7 @@ class _ChatScreenState extends ConsumerState<ChatScreen> {
style: AppTextStyle.subtitle3.copyWith(
color: isSender
? context.colorScheme.textPrimary
: context.colorScheme.textPrimaryDark,
: context.colorScheme.textInversePrimary,
),
maxLines: null,
textAlign: isSender ? TextAlign.start : TextAlign.end,
Expand Down Expand Up @@ -492,7 +492,7 @@ class _ChatScreenState extends ConsumerState<ChatScreen> {
child: Center(
child: Text(firstLetter,
style: AppTextStyle.header4.copyWith(
color: context.colorScheme.textPrimaryDark)),
color: context.colorScheme.textInversePrimary)),
),
),
),
Expand Down Expand Up @@ -545,7 +545,7 @@ class _ChatScreenState extends ConsumerState<ChatScreen> {
},
icon: Icon(Icons.arrow_forward_rounded,
color: state.allowSend && state.message.text.isNotEmpty
? context.colorScheme.textPrimaryDark
? context.colorScheme.textInversePrimary
: context.colorScheme.textDisabled),
enabled: state.allowSend,
radius: 23,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/ui/flow/message/thread_list_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class _ThreadListScreenState extends ConsumerState<ThreadListScreen> {
},
icon: Icon(
Icons.add_rounded,
color: context.colorScheme.onPrimary,
color: context.colorScheme.textInversePrimary,
),
)
: null);
Expand Down
1 change: 1 addition & 0 deletions app/lib/ui/flow/setting/space/edit_space_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ class _EditSpaceScreenState extends ConsumerState<EditSpaceScreen> {
activeTrackColor: context.colorScheme.primary,
inactiveTrackColor: context.colorScheme.outline,
inactiveThumbColor: context.colorScheme.textPrimaryDark,
activeColor: context.colorScheme.containerLowOnSurface,
trackOutlineColor:
WidgetStatePropertyAll(context.colorScheme.outline),
trackOutlineWidth: const WidgetStatePropertyAll(0.5),
Expand Down
2 changes: 1 addition & 1 deletion style/lib/button/primary_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PrimaryButton extends StatelessWidget {
? bg
: context.colorScheme.containerLowOnSurface;

final fg = foreground ?? colorScheme.onPrimary;
final fg = foreground ?? colorScheme.textInversePrimary;
final fgColor = tappable
? fg
: context.colorScheme.textDisabled;
Expand Down
17 changes: 9 additions & 8 deletions style/lib/theme/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
import 'package:style/text/app_text_dart.dart';


const primaryColor = Color(0xFF1679AB);
const primaryLightColor = Color(0xFF1679AB);
const primaryDarkColor = Color(0xFF74BFE4);

const secondaryLightColor = Color(0xFF34495E);
const secondaryVariantLightColor = Color(0x5234495E);
Expand All @@ -18,7 +19,7 @@ const containerLightColor = Color(0x0A61A4C6);
const containerHighDarkColor = Color(0x3DABCFE1);
const containerNormalDarkColor = Color(0x1EABCFE1);
const containerLowDarkColor = Color(0x14ABCFE1);
const containerDarkColor = Color(0x0AABCFE1);
const containerDarkColor = Color(0x06ABCFE1);

const textPrimaryLightColor = Color(0xDE000000);
const textSecondaryLightColor = Color(0x99000000);
Expand All @@ -42,10 +43,10 @@ final ThemeData _materialLightTheme = ThemeData.light(useMaterial3: true);
final ThemeData _materialDarkTheme = ThemeData.dark(useMaterial3: true);

final ThemeData materialThemeDataLight = _materialLightTheme.copyWith(
primaryColor: primaryColor,
primaryColor: primaryLightColor,
dividerColor: outlineLightColor,
colorScheme: _materialLightTheme.colorScheme.copyWith(
primary: primaryColor,
primary: primaryLightColor,
secondary: secondaryLightColor,
surface: surfaceLightColor,
onPrimary: textPrimaryDarkColor,
Expand All @@ -64,10 +65,10 @@ final ThemeData materialThemeDataLight = _materialLightTheme.copyWith(
);

final ThemeData materialThemeDataDark = _materialDarkTheme.copyWith(
primaryColor: primaryColor,
primaryColor: primaryDarkColor,
dividerColor: outlineDarkColor,
colorScheme: _materialDarkTheme.colorScheme.copyWith(
primary: primaryColor,
primary: primaryDarkColor,
secondary: secondaryDarkColor,
surface: surfaceDarkColor,
onPrimary: textPrimaryDarkColor,
Expand Down Expand Up @@ -159,7 +160,7 @@ class AppColorScheme {
}

final appColorSchemeLight = AppColorScheme(
primary: primaryColor,
primary: primaryLightColor,
secondary: secondaryLightColor,
secondaryVariant: secondaryVariantLightColor,
surface: surfaceLightColor,
Expand Down Expand Up @@ -192,7 +193,7 @@ final appColorSchemeLight = AppColorScheme(
);

final appColorSchemeDark = AppColorScheme(
primary: primaryColor,
primary: primaryDarkColor,
secondary: secondaryDarkColor,
secondaryVariant: secondaryVariantDarkColor,
surface: surfaceDarkColor,
Expand Down

0 comments on commit c7d173a

Please sign in to comment.