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

37 fix app colors on dark theme #62

Merged
merged 8 commits into from
Jun 10, 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
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/splash.json

Large diffs are not rendered by default.

71 changes: 56 additions & 15 deletions lib/core/shared/presentation/pages/homepage_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

import 'package:u_do_note/core/shared/theme/colors.dart';
import 'package:u_do_note/features/review_page/presentation/providers/pomodoro_technique_provider.dart';
import 'package:u_do_note/features/review_page/presentation/providers/review_screen_provider.dart';
import 'package:u_do_note/routes/app_route.dart';
Expand Down Expand Up @@ -32,22 +33,62 @@ class HomepageScreen extends ConsumerWidget {
}
}
});
// TODO: make this sht look like the bottom nav bar in the figma
return BottomNavigationBar(
currentIndex: tabsRouter.activeIndex,
onTap: tabsRouter.setActiveIndex,
fixedColor: Colors.grey,
unselectedItemColor: Colors.black,
items: const [
BottomNavigationBarItem(label: 'Notes', icon: Icon(Icons.home)),
BottomNavigationBarItem(
label: 'Review Methods', icon: Icon(Icons.folder)),
BottomNavigationBarItem(
label: 'Analytics', icon: Icon(Icons.bar_chart)),
BottomNavigationBarItem(
label: 'Settings', icon: Icon(Icons.settings)),
],
return BottomAppBar(
shape: const CircularNotchedRectangle(),
color: Theme.of(context).bottomNavigationBarTheme.backgroundColor,
child: IconTheme(
data: const IconThemeData(color: AppColors.shadow),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
IconButton(
icon: const Icon(Icons.home_outlined),
onPressed: () {
tabsRouter.setActiveIndex(1);
},
color: tabsRouter.activeIndex == 1 ? AppColors.white : null,
),
IconButton(
icon: const Icon(Icons.folder_outlined),
onPressed: () {
tabsRouter.setActiveIndex(0);
},
color: tabsRouter.activeIndex == 0 ? AppColors.white : null,
),
IconButton(
icon: const Icon(Icons.bar_chart_rounded),
onPressed: () {
tabsRouter.setActiveIndex(2);
},
color: tabsRouter.activeIndex == 2 ? AppColors.white : null,
),
IconButton(
icon: const Icon(Icons.settings_outlined),
onPressed: () {
tabsRouter.setActiveIndex(3);
},
color: tabsRouter.activeIndex == 3 ? AppColors.white : null,
),
],
),
),
);
// return BottomNavigationBar(
// currentIndex: tabsRouter.activeIndex,
// onTap: tabsRouter.setActiveIndex,
// fixedColor: Colors.grey,
// unselectedItemColor: Colors.black,
// items: const [
// BottomNavigationBarItem(label: 'Notes', icon: Icon(Icons.home)),
// BottomNavigationBarItem(
// label: 'Review Methods', icon: Icon(Icons.folder)),
// BottomNavigationBarItem(
// label: 'Analytics', icon: Icon(Icons.bar_chart)),
// BottomNavigationBarItem(
// label: 'Settings', icon: Icon(Icons.settings)),
// ],
// );
},
);
}
Expand Down
14 changes: 14 additions & 0 deletions lib/core/shared/provider/inherited_data_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'package:flutter/material.dart';

class InheritedDataProvider extends InheritedWidget {
final ScrollController scrollController;
const InheritedDataProvider({
required Widget child,
required this.scrollController,
}) : super(child: child);
@override
bool updateShouldNotify(InheritedDataProvider oldWidget) =>
scrollController != oldWidget.scrollController;
static InheritedDataProvider of(BuildContext context) =>
context.dependOnInheritedWidgetOfExactType<InheritedDataProvider>()!;
}
28 changes: 24 additions & 4 deletions lib/core/shared/theme/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,28 @@ class AppTheme {
fontFamily: AppTextStyles.fontFamily,
primaryColor: AppColors.primary,
colorScheme: const ColorScheme.dark(
primary: AppColors.primary,
primary: AppColors.white,
secondary: AppColors.lightGrey,
error: AppColors.error,
background: AppColors.black,
background: AppColors.primary,
tertiary: Color.fromARGB(255, 194, 182, 72),
),
scaffoldBackgroundColor: AppColors.primary,
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
backgroundColor: AppColors.darkBottomNavBar),
searchBarTheme: SearchBarThemeData(
backgroundColor: MaterialStateColor.resolveWith((_) {
return AppColors.darkSearchBar;
}),
),
scaffoldBackgroundColor: AppColors.black,
textTheme: TextThemes.darkTextTheme,
primaryTextTheme: TextThemes.primaryTextTheme,
appBarTheme: const AppBarTheme(
elevation: 0,
backgroundColor: AppColors.black,
backgroundColor: AppColors.primary,
titleTextStyle: AppTextStyles.h2,
),
cardColor: const Color(0xff11365D),
);
}

Expand All @@ -35,15 +44,26 @@ class AppTheme {
primaryColor: AppColors.primary,
textTheme: TextThemes.textTheme,
primaryTextTheme: TextThemes.primaryTextTheme,
scaffoldBackgroundColor: AppColors.white,
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
backgroundColor: AppColors.primary),
searchBarTheme: SearchBarThemeData(
backgroundColor: MaterialStateColor.resolveWith((_) {
return const Color.fromARGB(255, 255, 255, 255);
}),
),
colorScheme: const ColorScheme.light(
primary: AppColors.primary,
secondary: AppColors.secondary,
error: AppColors.error,
onSecondary: Color(0xffABACAF),
tertiary: Color.fromARGB(255, 255, 245, 157),
),
appBarTheme: const AppBarTheme(
scrolledUnderElevation: 0,
elevation: 0,
),
cardColor: const Color(0xffD2E3FF)
);
}
}
11 changes: 11 additions & 0 deletions lib/core/shared/theme/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,15 @@ class AppColors {
static const jetBlack = Color(0xff343434);

static const btnOnBoard = Color(0xFF053149);

/// For Dark Mode Theme

/// Lighter primary color
static const darkBottomNavBar = Color(0xff082543);

/// Lighter++ primary color
static const darkSearchBar = Color(0xff162d45);



}
13 changes: 10 additions & 3 deletions lib/core/shared/theme/text_styles.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:u_do_note/core/shared/theme/colors.dart';

class AppTextStyles {
static const String fontFamily = 'Inter';
Expand Down Expand Up @@ -47,7 +48,13 @@ class AppTextStyles {
);

static const TextStyle h5 = TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
);
fontSize: 16, fontWeight: FontWeight.w600, color: AppColors.primary);

/// Text style for others

static const TextStyle authFieldHintStyle = TextStyle(
fontSize: 14, fontWeight: FontWeight.w400, color: AppColors.grey);

static const TextStyle authFieldTextStyle = TextStyle(
fontSize: 14, fontWeight: FontWeight.w400, color: AppColors.black);
}
1 change: 1 addition & 0 deletions lib/core/shared/theme/text_theme.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';

import 'package:u_do_note/core/shared/theme/colors.dart';
import 'package:u_do_note/core/shared/theme/text_styles.dart';

Expand Down
Loading