Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to AppColors #1288

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ class App extends StatelessWidget {
appBarTheme: const AppBarTheme(
systemOverlayStyle: SystemUiOverlayStyle.dark,
centerTitle: true,
color: PilllColors.white,
color: AppColors.white,
elevation: 3,
),
textSelectionTheme: const TextSelectionThemeData(
cursorColor: PilllColors.secondary,
cursorColor: AppColors.secondary,
),
primaryColor: PilllColors.secondary,
primaryColor: AppColors.secondary,
visualDensity: VisualDensity.adaptivePlatformDensity,
cupertinoOverrideTheme: const NoDefaultCupertinoThemeData(
textTheme: CupertinoTextThemeData(
Expand All @@ -40,25 +40,25 @@ class App extends StatelessWidget {
fontSize: 24,
))),
buttonTheme: const ButtonThemeData(
buttonColor: PilllColors.primary,
disabledColor: PilllColors.disable,
buttonColor: AppColors.primary,
disabledColor: AppColors.disable,
textTheme: ButtonTextTheme.primary,
colorScheme: ColorScheme.light(
primary: PilllColors.secondary,
secondary: PilllColors.accent,
primary: AppColors.secondary,
secondary: AppColors.accent,
),
),
datePickerTheme: const DatePickerThemeData(
backgroundColor: Colors.white,
headerBackgroundColor: PilllColors.primary,
headerBackgroundColor: AppColors.primary,
),
switchTheme: SwitchThemeData(
thumbColor: WidgetStateProperty.resolveWith<Color?>((Set<WidgetState> states) {
if (states.contains(WidgetState.disabled)) {
return null;
}
if (states.contains(WidgetState.selected)) {
return PilllColors.secondary;
return AppColors.secondary;
}
return null;
}),
Expand All @@ -67,7 +67,7 @@ class App extends StatelessWidget {
return null;
}
if (states.contains(WidgetState.selected)) {
return PilllColors.secondary;
return AppColors.secondary;
}
return null;
}),
Expand All @@ -78,7 +78,7 @@ class App extends StatelessWidget {
return null;
}
if (states.contains(WidgetState.selected)) {
return PilllColors.secondary;
return AppColors.secondary;
}

return null;
Expand All @@ -90,7 +90,7 @@ class App extends StatelessWidget {
return null;
}
if (states.contains(WidgetState.selected)) {
return PilllColors.secondary;
return AppColors.secondary;
}
return null;
}),
Expand Down
20 changes: 10 additions & 10 deletions lib/components/atoms/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class PrimaryButton extends HookWidget {
ElevatedButton(
style: ButtonStyle(backgroundColor: WidgetStateProperty.resolveWith((statuses) {
if (statuses.contains(WidgetState.disabled)) {
return PilllColors.lightGray;
return AppColors.lightGray;
}
return PilllColors.primary;
return AppColors.primary;
})),
onPressed: isProcessing.value || onPressed == null
? null
Expand All @@ -52,7 +52,7 @@ class PrimaryButton extends HookWidget {
fontFamily: FontFamily.japanese,
fontWeight: FontWeight.w700,
fontSize: 16,
color: PilllColors.white,
color: AppColors.white,
))),
),
),
Expand Down Expand Up @@ -82,9 +82,9 @@ class UndoButton extends HookWidget {
ElevatedButton(
style: ButtonStyle(backgroundColor: WidgetStateProperty.resolveWith((statuses) {
if (statuses.contains(WidgetState.disabled)) {
return PilllColors.lightGray;
return AppColors.lightGray;
}
return PilllColors.gray;
return AppColors.gray;
})),
onPressed: isProcessing.value || onPressed == null
? null
Expand All @@ -110,7 +110,7 @@ class UndoButton extends HookWidget {
fontFamily: FontFamily.japanese,
fontWeight: FontWeight.w700,
fontSize: 16,
color: PilllColors.white,
color: AppColors.white,
))),
),
),
Expand Down Expand Up @@ -234,11 +234,11 @@ class SmallAppOutlinedButton extends HookWidget {

return OutlinedButton(
style: OutlinedButton.styleFrom(
foregroundColor: PilllColors.primary,
foregroundColor: AppColors.primary,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
side: const BorderSide(color: PilllColors.primary),
side: const BorderSide(color: AppColors.primary),
),
onPressed: onPressed == null
? null
Expand Down Expand Up @@ -296,11 +296,11 @@ class AppOutlinedButton extends HookWidget {
children: [
OutlinedButton(
style: OutlinedButton.styleFrom(
foregroundColor: PilllColors.primary,
foregroundColor: AppColors.primary,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6),
),
side: const BorderSide(color: PilllColors.primary),
side: const BorderSide(color: AppColors.primary),
),
onPressed: onPressed == null
? null
Expand Down
4 changes: 2 additions & 2 deletions lib/components/atoms/color.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';

abstract class PilllColors {
abstract class AppColors {
static const Color primary = Color(0xFF4E6287);
static const Color secondary = Color(0xFFE56A45);
static const Color calendarHeader = Color(0XFFB9D7F1);
Expand Down Expand Up @@ -38,7 +38,7 @@ abstract class PilllColors {
static final Color modalBackground = const Color(0xFF333333).withAlpha((255 * 0.7).round());
static const Color white = Colors.white;

static Color get disabledSheet => PilllColors.pillSheet;
static Color get disabledSheet => AppColors.pillSheet;
static final Color thinSecondary = const Color(0xFF4E6287).withAlpha(20);
static final Color shadow = const Color(0xFF212121).withOpacity(0.14);
static final Color tinBackground = const Color(0xFF212121).withOpacity(0.08);
Expand Down
4 changes: 2 additions & 2 deletions lib/components/atoms/text_color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ abstract class TextColor {
static const Color lightGray = Color(0xFFB1B1B1);
static const Color lightGray2 = Color(0xFF666666);
static const Color noshime = Color(0xFF3D4662);
static const Color primary = PilllColors.secondary;
static const Color primary = AppColors.secondary;
static const Color main = Color(0xD429304D);
static const Color primaryDarkBlue = Color(0xFF4E6287);
static const Color link = primary;
static const Color danger = PilllColors.red;
static const Color danger = AppColors.red;
static const Color discount = Color(0xFFB00020);

static Color highEmphasis(Color color) => color.withOpacity(0.87);
Expand Down
4 changes: 2 additions & 2 deletions lib/components/molecules/app_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ class AppCard extends StatelessWidget {
return Container(
margin: const EdgeInsets.only(bottom: 2),
decoration: BoxDecoration(
color: PilllColors.white,
color: AppColors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: PilllColors.shadow,
color: AppColors.shadow,
blurRadius: 6.0,
offset: const Offset(0, 2),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/components/molecules/dots_page_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DotsIndicator extends AnimatedWidget {
width: 25,
child: Center(
child: Material(
color: isSelected ? PilllColors.primary : PilllColors.unselect,
color: isSelected ? AppColors.primary : AppColors.unselect,
type: MaterialType.circle,
child: SizedBox(
width: 8,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/molecules/dotted_line.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DottedLine extends StatelessWidget {
Widget _buildDash() {
return Container(
decoration: const BoxDecoration(
color: PilllColors.primary,
color: AppColors.primary,
),
width: dashLength,
height: height,
Expand Down
8 changes: 4 additions & 4 deletions lib/components/molecules/indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class Indicator extends StatelessWidget {
if (Environment.disableWidgetAnimation) {
return Center(
child: Container(
color: PilllColors.secondary,
color: AppColors.secondary,
width: 40,
height: 40,
),
);
}
return const Center(
child: CircularProgressIndicator(valueColor: AlwaysStoppedAnimation(PilllColors.secondary)),
child: CircularProgressIndicator(valueColor: AlwaysStoppedAnimation(AppColors.secondary)),
);
}
}
Expand All @@ -30,7 +30,7 @@ class ScaffoldIndicator extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const Scaffold(
backgroundColor: PilllColors.background,
backgroundColor: AppColors.background,
body: Indicator(),
);
}
Expand All @@ -46,7 +46,7 @@ class DialogIndicator extends StatelessWidget {
child: Center(
child: Container(
decoration: BoxDecoration(
color: PilllColors.modalBackground,
color: AppColors.modalBackground,
borderRadius: BorderRadius.circular(10),
),
width: 200,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/molecules/premium_badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PremiumBadge extends StatelessWidget {
return Container(
padding: const EdgeInsets.fromLTRB(8, 1, 8, 1),
decoration: BoxDecoration(
color: PilllColors.gold,
color: AppColors.gold,
borderRadius: BorderRadius.circular(41),
),
child: const Text('Premium',
Expand Down
4 changes: 2 additions & 2 deletions lib/components/molecules/shadow_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class ShadowContainer extends StatelessWidget {
return Container(
margin: const EdgeInsets.only(bottom: 2),
decoration: BoxDecoration(
color: PilllColors.white,
color: AppColors.white,
boxShadow: [
BoxShadow(
color: PilllColors.shadow,
color: AppColors.shadow,
blurRadius: 6.0,
offset: const Offset(0, 2),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CalendarMenstruationBand extends StatelessWidget {
height: CalendarBandConst.height,
child: CustomPaint(
painter: DiagonalStripedLine(
color: PilllColors.menstruation.withOpacity(0.6),
color: AppColors.menstruation.withOpacity(0.6),
isNecessaryBorder: false,
),
size: Size(width, CalendarBandConst.height),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CalendarNextPillSheetBand extends StatelessWidget {
child: Stack(
children: [
CustomPaint(
painter: DiagonalStripedLine(color: PilllColors.duration, isNecessaryBorder: false),
painter: DiagonalStripedLine(color: AppColors.duration, isNecessaryBorder: false),
size: Size(width, CalendarBandConst.height),
),
Container(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CalendarScheduledMenstruationBand extends StatelessWidget {
height: CalendarBandConst.height,
child: CustomPaint(
painter: DiagonalStripedLine(
color: PilllColors.menstruation.withOpacity(0.6),
color: AppColors.menstruation.withOpacity(0.6),
isNecessaryBorder: true,
),
size: Size(width, CalendarBandConst.height),
Expand Down
12 changes: 6 additions & 6 deletions lib/components/organisms/calendar/day/calendar_day_record.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ class CalendarDayRecord extends StatelessWidget {
SvgPicture.asset(
'images/laugh.svg',
height: 10,
colorFilter: const ColorFilter.mode(PilllColors.green, BlendMode.srcIn),
colorFilter: const ColorFilter.mode(AppColors.green, BlendMode.srcIn),
),
);
case PhysicalConditionStatus.bad:
widgets.add(
SvgPicture.asset(
'images/angry.svg',
height: 10,
colorFilter: const ColorFilter.mode(PilllColors.danger, BlendMode.srcIn),
colorFilter: const ColorFilter.mode(AppColors.danger, BlendMode.srcIn),
),
);
}
Expand All @@ -49,7 +49,7 @@ class CalendarDayRecord extends StatelessWidget {
const Icon(
Icons.favorite,
size: 10,
color: PilllColors.pinkRed,
color: AppColors.pinkRed,
),
);
}
Expand All @@ -58,7 +58,7 @@ class CalendarDayRecord extends StatelessWidget {
const Icon(
Icons.accessibility_new,
size: 10,
color: PilllColors.gray,
color: AppColors.gray,
),
);
}
Expand All @@ -67,15 +67,15 @@ class CalendarDayRecord extends StatelessWidget {
const Icon(
Icons.description,
size: 10,
color: PilllColors.gray,
color: AppColors.gray,
),
);
}
}

if (schedule != null) {
widgets.add(
const Icon(Icons.schedule, color: PilllColors.primary, size: 10),
const Icon(Icons.schedule, color: AppColors.primary, size: 10),
);
}

Expand Down
8 changes: 4 additions & 4 deletions lib/components/organisms/calendar/day/calendar_day_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class CalendarDayTile extends StatelessWidget {
width: 32,
height: 32,
decoration: BoxDecoration(
color: PilllColors.primary,
color: AppColors.primary,
borderRadius: BorderRadius.circular(16),
),
),
Expand Down Expand Up @@ -102,7 +102,7 @@ class CalendarDayTile extends StatelessWidget {

Color _textColor() {
if (_isToday) {
return PilllColors.white;
return AppColors.white;
}
final weekdayColor = switch (weekday) {
Weekday.Sunday => weekday.weekdayColor(),
Expand All @@ -119,11 +119,11 @@ class CalendarDayTile extends StatelessWidget {
}

Widget _diaryMarkWidget() {
return const Icon(Icons.edit_calendar, color: PilllColors.gray, size: 12);
return const Icon(Icons.edit_calendar, color: AppColors.gray, size: 12);
}

Widget _scheduleMarkWidget() {
return const Icon(Icons.schedule, color: PilllColors.primary, size: 12);
return const Icon(Icons.schedule, color: AppColors.primary, size: 12);
}

bool get _isToday => isSameDay(date, today());
Expand Down
2 changes: 1 addition & 1 deletion lib/components/organisms/pill_mark/done_mark.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PillMarkDoneMark extends StatelessWidget {
return SvgPicture.asset(
'images/checkmark.svg',
colorFilter: const ColorFilter.mode(
PilllColors.potti,
AppColors.potti,
BlendMode.srcIn,
),
width: 11,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/organisms/pill_mark/pill_mark.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class PillMarkState extends State<PillMark> with TickerProviderStateMixin {
size: const Size(PillMarkConst.edgeOfRipple, PillMarkConst.edgeOfRipple),
painter: Ripple(
_controller,
color: PilllColors.secondary,
color: AppColors.secondary,
),
),
),
Expand Down
Loading
Loading