Skip to content

Commit

Permalink
rfac: fix overflow on multiple screen
Browse files Browse the repository at this point in the history
Signed-off-by: Aman <aman2@me.iitr.ac.in>
  • Loading branch information
aman-singh7 committed Nov 7, 2022
1 parent 1c62b8a commit 2bad403
Show file tree
Hide file tree
Showing 13 changed files with 233 additions and 270 deletions.
3 changes: 3 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@ end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
202 changes: 97 additions & 105 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,80 @@ PODS:
- connectivity_plus (0.0.1):
- Flutter
- ReachabilitySwift
- Firebase/Analytics (9.6.0):
- Firebase/Analytics (10.0.0):
- Firebase/Core
- Firebase/Core (9.6.0):
- Firebase/Core (10.0.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 9.6.0)
- Firebase/CoreOnly (9.6.0):
- FirebaseCore (= 9.6.0)
- Firebase/Messaging (9.6.0):
- FirebaseAnalytics (~> 10.0.0)
- Firebase/CoreOnly (10.0.0):
- FirebaseCore (= 10.0.0)
- Firebase/Messaging (10.0.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 9.6.0)
- Firebase/RemoteConfig (9.6.0):
- FirebaseMessaging (~> 10.0.0)
- Firebase/RemoteConfig (10.0.0):
- Firebase/CoreOnly
- FirebaseRemoteConfig (~> 9.6.0)
- firebase_analytics (9.3.7):
- Firebase/Analytics (= 9.6.0)
- FirebaseRemoteConfig (~> 10.0.0)
- firebase_analytics (10.0.4):
- Firebase/Analytics (= 10.0.0)
- firebase_core
- Flutter
- firebase_core (1.24.0):
- Firebase/CoreOnly (= 9.6.0)
- firebase_core (2.1.1):
- Firebase/CoreOnly (= 10.0.0)
- Flutter
- firebase_messaging (11.4.4):
- Firebase/Messaging (= 9.6.0)
- firebase_messaging (14.0.4):
- Firebase/Messaging (= 10.0.0)
- firebase_core
- Flutter
- firebase_remote_config (2.0.19):
- Firebase/RemoteConfig (= 9.6.0)
- firebase_remote_config (3.0.4):
- Firebase/RemoteConfig (= 10.0.0)
- firebase_core
- Flutter
- FirebaseABTesting (9.6.0):
- FirebaseCore (~> 9.0)
- FirebaseAnalytics (9.6.0):
- FirebaseAnalytics/AdIdSupport (= 9.6.0)
- FirebaseCore (~> 9.0)
- FirebaseInstallations (~> 9.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.7)
- GoogleUtilities/MethodSwizzler (~> 7.7)
- GoogleUtilities/Network (~> 7.7)
- "GoogleUtilities/NSData+zlib (~> 7.7)"
- FirebaseABTesting (10.1.0):
- FirebaseCore (~> 10.0)
- FirebaseAnalytics (10.0.0):
- FirebaseAnalytics/AdIdSupport (= 10.0.0)
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseAnalytics/AdIdSupport (9.6.0):
- FirebaseCore (~> 9.0)
- FirebaseInstallations (~> 9.0)
- GoogleAppMeasurement (= 9.6.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.7)
- GoogleUtilities/MethodSwizzler (~> 7.7)
- GoogleUtilities/Network (~> 7.7)
- "GoogleUtilities/NSData+zlib (~> 7.7)"
- FirebaseAnalytics/AdIdSupport (10.0.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleAppMeasurement (= 10.0.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseCore (9.6.0):
- FirebaseCoreDiagnostics (~> 9.0)
- FirebaseCoreInternal (~> 9.0)
- GoogleUtilities/Environment (~> 7.7)
- GoogleUtilities/Logger (~> 7.7)
- FirebaseCoreDiagnostics (9.6.0):
- GoogleDataTransport (< 10.0.0, >= 9.1.4)
- GoogleUtilities/Environment (~> 7.7)
- GoogleUtilities/Logger (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseCoreInternal (9.6.0):
- "GoogleUtilities/NSData+zlib (~> 7.7)"
- FirebaseInstallations (9.6.0):
- FirebaseCore (~> 9.0)
- GoogleUtilities/Environment (~> 7.7)
- GoogleUtilities/UserDefaults (~> 7.7)
- FirebaseCore (10.0.0):
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Logger (~> 7.8)
- FirebaseCoreInternal (10.1.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseInstallations (10.1.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- FirebaseMessaging (9.6.0):
- FirebaseCore (~> 9.0)
- FirebaseInstallations (~> 9.0)
- GoogleDataTransport (< 10.0.0, >= 9.1.4)
- GoogleUtilities/AppDelegateSwizzler (~> 7.7)
- GoogleUtilities/Environment (~> 7.7)
- GoogleUtilities/Reachability (~> 7.7)
- GoogleUtilities/UserDefaults (~> 7.7)
- FirebaseMessaging (10.0.0):
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleDataTransport (~> 9.2)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Reachability (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseRemoteConfig (9.6.0):
- FirebaseABTesting (~> 9.0)
- FirebaseCore (~> 9.0)
- FirebaseInstallations (~> 9.0)
- GoogleUtilities/Environment (~> 7.7)
- "GoogleUtilities/NSData+zlib (~> 7.7)"
- FirebaseRemoteConfig (10.0.0):
- FirebaseABTesting (~> 10.0)
- FirebaseCore (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- Flutter (1.0.0)
- flutter_inappwebview (0.0.1):
- Flutter
Expand All @@ -95,25 +89,25 @@ PODS:
- fluttertoast (0.0.2):
- Flutter
- Toast
- GoogleAppMeasurement (9.6.0):
- GoogleAppMeasurement/AdIdSupport (= 9.6.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.7)
- GoogleUtilities/MethodSwizzler (~> 7.7)
- GoogleUtilities/Network (~> 7.7)
- "GoogleUtilities/NSData+zlib (~> 7.7)"
- GoogleAppMeasurement (10.0.0):
- GoogleAppMeasurement/AdIdSupport (= 10.0.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/AdIdSupport (9.6.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 9.6.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.7)
- GoogleUtilities/MethodSwizzler (~> 7.7)
- GoogleUtilities/Network (~> 7.7)
- "GoogleUtilities/NSData+zlib (~> 7.7)"
- GoogleAppMeasurement/AdIdSupport (10.0.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.0.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/WithoutAdIdSupport (9.6.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.7)
- GoogleUtilities/MethodSwizzler (~> 7.7)
- GoogleUtilities/Network (~> 7.7)
- "GoogleUtilities/NSData+zlib (~> 7.7)"
- GoogleAppMeasurement/WithoutAdIdSupport (10.0.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleDataTransport (9.2.0):
- GoogleUtilities/Environment (~> 7.7)
Expand Down Expand Up @@ -150,13 +144,13 @@ PODS:
- Flutter
- PromisesObjC (2.1.1)
- ReachabilitySwift (5.0.0)
- Sentry (7.26.0):
- Sentry/Core (= 7.26.0)
- Sentry/Core (7.26.0)
- Sentry (7.30.1):
- Sentry/Core (= 7.30.1)
- Sentry/Core (7.30.1)
- sentry_flutter (0.0.1):
- Flutter
- FlutterMacOS
- Sentry (~> 7.26.0)
- Sentry (~> 7.30.0)
- share_plus (0.0.1):
- Flutter
- shared_preferences_ios (0.0.1):
Expand Down Expand Up @@ -188,7 +182,6 @@ SPEC REPOS:
- FirebaseABTesting
- FirebaseAnalytics
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseCoreInternal
- FirebaseInstallations
- FirebaseMessaging
Expand Down Expand Up @@ -237,24 +230,23 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
Firebase: 5ae8b7cf8efce559a653aef0ad95bab3f427c351
firebase_analytics: 80b63bd6ff50095e908feba5070aa8dd75ccdfbc
firebase_core: 7c28ecc1e5dd74e03829ac3e9ff5ba3314e737a9
firebase_messaging: fc1151f90dd4534756fae713d651695acca6f122
firebase_remote_config: 8f69d4c2cdda7e5582f31ce0d8dd64a297871517
FirebaseABTesting: 61826730ce9eee8781ba99a2b3420e9bce148dc9
FirebaseAnalytics: 89ad762c6c3852a685794174757e2c60a36b6a82
FirebaseCore: 2082fffcd855f95f883c0a1641133eb9bbe76d40
FirebaseCoreDiagnostics: 99a495094b10a57eeb3ae8efa1665700ad0bdaa6
FirebaseCoreInternal: bca76517fe1ed381e989f5e7d8abb0da8d85bed3
FirebaseInstallations: 0a115432c4e223c5ab20b0dbbe4cbefa793a0e8e
FirebaseMessaging: a4d7910e4af663c9cbfc1071c5bef34651690949
FirebaseRemoteConfig: ee09d77a7d7c7e31da6a0d1cf956cd611c85609c
Firebase: 1b810f3d0c0532e27a48f1961f8c0400a668a2cf
firebase_analytics: 38790c3205b2ee56b82be7bf0f54c84fc866253f
firebase_core: 5c0bb0ca7d0e70480a68a6e9ad9bf55d1edd5305
firebase_messaging: bf848602391fa6ee68d86e337f81be14be120aaf
firebase_remote_config: 02b66b55a60acde247bbf92101ae5fecc113df80
FirebaseABTesting: 8404d743de561c73570c8dbb7810035ffec10053
FirebaseAnalytics: 9921a52739f4ab66099da31b6e0243db78a3ac0a
FirebaseCore: 97f48a3a567a72b8d4daa0f03c3aadb78df4e995
FirebaseCoreInternal: 96d75228e10fd369564da51bd898414eb0f54df5
FirebaseInstallations: 99d24bac0243cf8b0e96cf5426340d211f0bcc80
FirebaseMessaging: 8916bf5edb1dbfac74665a181e4d1ab3a78a08a2
FirebaseRemoteConfig: e4431ddba74ddf705e2aabd7d356a23d5b802853
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
fluttertoast: 16fbe6039d06a763f3533670197d01fc73459037
GoogleAppMeasurement: 6de2b1a69e4326eb82ee05d138f6a5cb7311bcb1
fluttertoast: 74526702fea2c060ea55dde75895b7e1bde1c86b
GoogleAppMeasurement: 7e48a3249792ac35d6f18f107f63f199a7e9d0ce
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
GoogleUtilities: 1d20a6ad97ef46f67bbdec158ce00563a671ebb7
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
Expand All @@ -263,13 +255,13 @@ SPEC CHECKSUMS:
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
Sentry: 6b8f4a4f93c2471b0d73819c52da0c0ce4f0323c
sentry_flutter: 6604b70e74bfb15522c23788295e1debdbc86676
Sentry: 76e08c89f10705f91e347ae91790ca310b256d04
sentry_flutter: d6f51618010b194d871b063903b1bb8170d396fb
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de

PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
PODFILE CHECKSUM: 0661a8b4d2adb53671731a5c90a8e5964fc4bf1f

COCOAPODS: 1.11.3
33 changes: 23 additions & 10 deletions lib/ui/components/appetizer_date_picker.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:math' as math;

import 'package:appetizer/app_theme.dart';
import 'package:appetizer/ui/base_view.dart';
import 'package:appetizer/utils/date_time_utils.dart';
Expand Down Expand Up @@ -36,17 +38,20 @@ class _AppetizerDatePickerState extends State<AppetizerDatePicker> {
return _dateList;
}

List<Widget> _currentRowWidgets(DateTime anchor) {
List<Widget> _currentRowWidgets(DateTime anchor, BoxConstraints constraints) {
final list = _currentRowDates(anchor).map((dateTime) {
return _buildDateCell(dateTime);
return _buildDateCell(dateTime, constraints);
}).toList(growable: false);
return list;
}

Widget _buildDateCell(DateTime cellDate) {
Widget _buildDateCell(DateTime cellDate, BoxConstraints constraints) {
final _scrW = MediaQuery.of(context).size.width;
final _padding = 10.r;
final _width = (_scrW - (14 * _padding)) / 7;
final _minWidth = (_scrW - (14 * _padding)) / 7;
final _minHeight = (constraints.maxHeight - _padding / 2) / 2;

final _width = math.min(_minWidth, _minHeight);

bool _isCellDateCurrentDate() {
return cellDate.day == DateTime.now().day &&
Expand All @@ -58,9 +63,12 @@ class _AppetizerDatePickerState extends State<AppetizerDatePicker> {
}

return Container(
padding: EdgeInsets.all(_padding),
padding: EdgeInsets.symmetric(
horizontal: _padding,
vertical: _padding / 4,
),
color: AppTheme.secondary,
height: 70.r,
height: 80.r,
child: GestureDetector(
onTap: () {
_model.setDateTime(cellDate);
Expand Down Expand Up @@ -125,7 +133,10 @@ class _AppetizerDatePickerState extends State<AppetizerDatePicker> {
return Container(
color: AppTheme.secondary,
width: MediaQuery.of(context).size.width,
child: Row(children: _dateWidgets),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: _dateWidgets,
),
);
}

Expand All @@ -143,9 +154,11 @@ class _AppetizerDatePickerState extends State<AppetizerDatePicker> {
pageSnapping: true,
controller: _pageController,
itemBuilder: (context, index) {
return _buildDateRow(
_currentRowWidgets(_model.dateTime),
);
return LayoutBuilder(builder: (context, constraints) {
return _buildDateRow(
_currentRowWidgets(_model.dateTime, constraints),
);
});
},
onPageChanged: (index) {
print('PAGE: $index');
Expand Down
Loading

0 comments on commit 2bad403

Please sign in to comment.