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

Fix Button Pressed Effect #118

Merged
merged 6 commits into from
Aug 1, 2023
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
1 change: 1 addition & 0 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"alert": "Alert",
"cancel": "Cancel",
"delete": "Delete",
"add": "Add",
"reset": "Reset",
"search": "Search",
"upload": "Upload",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"alert": "경고",
"cancel": "취소",
"delete": "삭제",
"add": "추가하기",
"reset": "초기화",
"search": "검색",
"upload": "업로드",
Expand Down
156 changes: 78 additions & 78 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
PODS:
- Firebase/Analytics (10.6.0):
- Firebase/Analytics (10.12.0):
- Firebase/Core
- Firebase/Core (10.6.0):
- Firebase/Core (10.12.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 10.6.0)
- Firebase/CoreOnly (10.6.0):
- FirebaseCore (= 10.6.0)
- Firebase/Crashlytics (10.6.0):
- FirebaseAnalytics (~> 10.12.0)
- Firebase/CoreOnly (10.12.0):
- FirebaseCore (= 10.12.0)
- Firebase/Crashlytics (10.12.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 10.6.0)
- firebase_analytics (10.1.6):
- Firebase/Analytics (= 10.6.0)
- FirebaseCrashlytics (~> 10.12.0)
- firebase_analytics (10.4.4):
- Firebase/Analytics (= 10.12.0)
- firebase_core
- Flutter
- firebase_core (2.8.0):
- Firebase/CoreOnly (= 10.6.0)
- firebase_core (2.15.0):
- Firebase/CoreOnly (= 10.12.0)
- Flutter
- firebase_crashlytics (3.0.17):
- Firebase/Crashlytics (= 10.6.0)
- firebase_crashlytics (3.3.4):
- Firebase/Crashlytics (= 10.12.0)
- firebase_core
- Flutter
- FirebaseAnalytics (10.6.0):
- FirebaseAnalytics/AdIdSupport (= 10.6.0)
- FirebaseAnalytics (10.12.0):
- FirebaseAnalytics/AdIdSupport (= 10.12.0)
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseAnalytics/AdIdSupport (10.6.0):
- FirebaseAnalytics/AdIdSupport (10.12.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleAppMeasurement (= 10.6.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- GoogleAppMeasurement (= 10.12.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseCore (10.6.0):
- FirebaseCore (10.12.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Logger (~> 7.8)
- FirebaseCoreExtension (10.10.0):
- FirebaseCoreExtension (10.13.0):
- FirebaseCore (~> 10.0)
- FirebaseCoreInternal (10.10.0):
- FirebaseCoreInternal (10.13.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseCrashlytics (10.6.0):
- FirebaseCrashlytics (10.12.0):
- FirebaseCore (~> 10.5)
- FirebaseInstallations (~> 10.0)
- FirebaseSessions (~> 10.5)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/Environment (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (~> 2.1)
- FirebaseInstallations (10.10.0):
- FirebaseInstallations (10.13.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- FirebaseSessions (10.10.0):
- FirebaseSessions (10.13.0):
- FirebaseCore (~> 10.5)
- FirebaseCoreExtension (~> 10.0)
- FirebaseInstallations (~> 10.0)
Expand All @@ -72,48 +72,48 @@ PODS:
- Flutter
- flutter_widgetkit (0.0.1):
- Flutter
- GoogleAppMeasurement (10.6.0):
- GoogleAppMeasurement/AdIdSupport (= 10.6.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- GoogleAppMeasurement (10.12.0):
- GoogleAppMeasurement/AdIdSupport (= 10.12.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/AdIdSupport (10.6.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.6.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- GoogleAppMeasurement/AdIdSupport (10.12.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.12.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/WithoutAdIdSupport (10.6.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- GoogleAppMeasurement/WithoutAdIdSupport (10.12.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.11)
- GoogleUtilities/MethodSwizzler (~> 7.11)
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleDataTransport (9.2.3):
- GoogleDataTransport (9.2.5):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/AppDelegateSwizzler (7.11.1):
- GoogleUtilities/AppDelegateSwizzler (7.11.5):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.11.1):
- GoogleUtilities/Environment (7.11.5):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.11.1):
- GoogleUtilities/Logger (7.11.5):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (7.11.1):
- GoogleUtilities/MethodSwizzler (7.11.5):
- GoogleUtilities/Logger
- GoogleUtilities/Network (7.11.1):
- GoogleUtilities/Network (7.11.5):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.11.1)"
- GoogleUtilities/Reachability (7.11.1):
- "GoogleUtilities/NSData+zlib (7.11.5)"
- GoogleUtilities/Reachability (7.11.5):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.11.1):
- GoogleUtilities/UserDefaults (7.11.5):
- GoogleUtilities/Logger
- nanopb (2.30909.0):
- nanopb/decode (= 2.30909.0)
Expand All @@ -127,9 +127,9 @@ PODS:
- FlutterMacOS
- "permission_handler (5.1.0+2)":
- Flutter
- PromisesObjC (2.2.0)
- PromisesSwift (2.2.0):
- PromisesObjC (= 2.2.0)
- PromisesObjC (2.3.1)
- PromisesSwift (2.3.1):
- PromisesObjC (= 2.3.1)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
Expand Down Expand Up @@ -201,30 +201,30 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"

SPEC CHECKSUMS:
Firebase: f13680471b021937f2230ea8503c7809d8c29806
firebase_analytics: 97d12c9683531ba3f923a798a95362e7590f0757
firebase_core: 58542d7399889ebdbb034baa72d081e54c5c814d
firebase_crashlytics: 5f6296621a0e8ed7d15a7499c8131fbdcf176e3b
FirebaseAnalytics: 9f382605c5ee412b039212f054bf7a403d9850c1
FirebaseCore: fa80ad16a62d52f67274b5b88304c3a318bbf9a4
FirebaseCoreExtension: 8d93ebbf6838a874b4ed82a564c9d6705f8365dd
FirebaseCoreInternal: 971029061d326000d65bfdc21f5502c75c8b0893
FirebaseCrashlytics: ede07e7f433a0a2270112baf2d156b111cfb422d
FirebaseInstallations: 52153982b057d3afcb4e1fbb3eb0b6d00611e681
FirebaseSessions: 5f9e62cd4096e24d2011cbd845b0efceffaee1ec
Firebase: 07150e75d142fb9399f6777fa56a187b17f833a0
firebase_analytics: 3ff822ee2e90f95b61f0da300df20b378d380fbb
firebase_core: e477125798fc37cd4ab43ca6a8536bf7e0929c00
firebase_crashlytics: 6043ce85800f96e53f15ee5051f9cfad10cce73d
FirebaseAnalytics: 0270389efbe3022b54ec4588862dabec3477ee98
FirebaseCore: f86a1394906b97ac445ae49c92552a9425831bed
FirebaseCoreExtension: ce60f9db46d83944cf444664d6d587474128eeca
FirebaseCoreInternal: b342e37cd4f5b4454ec34308f073420e7920858e
FirebaseCrashlytics: c4d111b7430c49744c74bcc6346ea00868661ac8
FirebaseInstallations: b28af1b9f997f1a799efe818c94695a3728c352f
FirebaseSessions: 991fb4c20b3505eef125f7cbfa20a5b5b189c2a4
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_web_browser: 7bccaafbb0c5b8862afe7bcd158f15557109f61f
flutter_widgetkit: a0e9b0d50ee9bec366dad36c639509daaafc397a
GoogleAppMeasurement: 686b48c3c895f3c55c70719041913d5d150b74f6
GoogleDataTransport: f0308f5905a745f94fb91fea9c6cbaf3831cb1bd
GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749
GoogleAppMeasurement: 2d800fab85e7848b1e66a6f8ce5bca06c5aad892
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
open_app_file: 205f73051668bfbd68356005fef8a62e620f0a77
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
PromisesSwift: cf9eb58666a43bbe007302226e510b16c1e10959
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
webview_cookie_manager: eaf920722b493bd0f7611b5484771ca53fed03f7
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f
Expand Down
21 changes: 12 additions & 9 deletions lib/home.dart
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selectedFontSize = 14.0?

Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:otlplus/providers/hall_of_fame_model.dart';
import 'package:otlplus/providers/course_search_model.dart';
import 'package:otlplus/providers/lecture_search_model.dart';
import 'package:otlplus/providers/timetable_model.dart';
import 'package:otlplus/utils/build_app_bar.dart';
import 'package:otlplus/utils/build_page_route.dart';
import 'package:otlplus/providers/course_search_model.dart';
import 'package:otlplus/widgets/hall_of_fame_control.dart';
import 'package:otlplus/widgets/review_mode_control.dart';
import 'package:otlplus/widgets/timetable_mode_control.dart';
import 'package:otlplus/utils/responsive_button.dart';
import 'package:otlplus/widgets/pop_up.dart';
import 'package:otlplus/widgets/semester_picker.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -131,14 +132,12 @@ class _OTLHomeState extends State<OTLHome> with SingleTickerProviderStateMixin {

PreferredSizeWidget _buildDictionaryAppBar() {
return AppBar(
title: appBarPadding(
GestureDetector(
title: appBarPadding(ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: BackgroundButton(
tapEffectColorRatio: 0.04,
onTap: () => Navigator.push(context, buildCourseSearchPageRoute()),
child: Container(
decoration: BoxDecoration(
color: OTLColor.grayF,
borderRadius: BorderRadius.circular(8.0),
),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
child: Row(
children: [
Expand All @@ -154,8 +153,9 @@ class _OTLHomeState extends State<OTLHome> with SingleTickerProviderStateMixin {
],
),
),
color: OTLColor.grayF,
),
),
)),
flexibleSpace:
SafeArea(child: Container(color: OTLColor.pinksMain, height: 5.0)),
toolbarHeight: kToolbarHeight + 5.0,
Expand Down Expand Up @@ -259,6 +259,9 @@ class _OTLHomeState extends State<OTLHome> with SingleTickerProviderStateMixin {

BottomNavigationBar _buildBottomNavigationBar() {
return BottomNavigationBar(
selectedFontSize: 12.0,
unselectedFontSize: 12.0,
enableFeedback: false,
currentIndex: _currentIndex,
type: BottomNavigationBarType.fixed,
showSelectedLabels: true,
Expand Down
50 changes: 24 additions & 26 deletions lib/pages/course_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:otlplus/constants/text_styles.dart';
import 'package:otlplus/models/review.dart';
import 'package:otlplus/utils/build_app_bar.dart';
import 'package:otlplus/utils/responsive_button.dart';
import 'package:provider/provider.dart';
import 'package:otlplus/constants/color.dart';
import 'package:otlplus/extensions/course.dart';
Expand Down Expand Up @@ -95,32 +96,29 @@ class CourseDetailPage extends StatelessWidget {
return SliverPersistentHeader(
pinned: true,
delegate: CustomHeaderDelegate(
height: 24.0,
padding: const EdgeInsets.only(bottom: 4.0),
onTap: (shrinkOffset) async {
if (shrinkOffset > 0) {
_scrollController.animateTo(0,
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut);
} else {
await Scrollable.ensureVisible(headerKey.currentContext!,
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut);
_scrollController.jumpTo(_scrollController.offset + 2);
}
},
builder: (shrinkOffset) => Row(
key: headerKey,
children: <Widget>[
Text("dictionary.reviews".tr(), style: bodyBold),
FittedBox(
child: (shrinkOffset > 0)
? const Icon(Icons.keyboard_arrow_up)
: const Icon(Icons.keyboard_arrow_down),
),
],
),
),
height: 24.0,
padding: const EdgeInsets.only(bottom: 4.0),
builder: (shrinkOffset) => IconTextButton(
direction: 'row-reversed',
padding: EdgeInsets.zero,
onTap: () async {
if (shrinkOffset > 0) {
_scrollController.animateTo(0,
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut);
} else {
await Scrollable.ensureVisible(headerKey.currentContext!,
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut);
_scrollController.jumpTo(_scrollController.offset + 2);
}
},
key: headerKey,
text: "dictionary.reviews".tr(),
textStyle: bodyBold,
icon: (shrinkOffset > 0)
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down)),
);
}

Expand Down
8 changes: 5 additions & 3 deletions lib/pages/course_search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:otlplus/constants/color.dart';
import 'package:otlplus/constants/text_styles.dart';
import 'package:otlplus/providers/course_search_model.dart';
import 'package:otlplus/utils/build_app_bar.dart';
import 'package:otlplus/utils/responsive_button.dart';
import 'package:otlplus/widgets/search_filter_panel.dart';
import 'package:otlplus/widgets/search_textfield.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -46,9 +47,10 @@ class _CourseSearchPageState extends State<CourseSearchPage> {
title: appBarPadding(
Row(
children: [
IconButton(
onPressed: () => Navigator.pop(context),
icon: const Icon(Icons.navigate_before),
IconTextButton(
onTap: () => Navigator.pop(context),
icon: Icons.navigate_before,
padding: EdgeInsets.fromLTRB(0, 16, 16, 16),
),
Expanded(
child: SearchTextfield(
Expand Down
Loading