Skip to content
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand Down
3 changes: 2 additions & 1 deletion lib/src/calendar/presentation/screens/plan_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ class _PlanScreenState extends State<PlanScreen> with WindowListener, AdaptiveSt

// fill in the days of the current month
for (var i = 0; i < lastDay.day; i++) {
days.add(currentMonth.add(Duration(days: i)));
// we have to copy with instead of just adding days because of daylight saving time
days.add(currentMonth.copyWith(day: i + 1));
}

// get the weekday of the last day of the month and fill in the days of the next month
Expand Down
62 changes: 48 additions & 14 deletions lib/src/kanban/presentation/screens/kanban_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:awesome_extensions/awesome_extensions_flutter.dart';
import 'package:data_widget/data_widget.dart';
import 'package:eduplanner/eduplanner.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
Expand All @@ -24,6 +25,22 @@
});
}

@override
void didChangeDependencies() {
super.didChangeDependencies();

Data.of<TitleBarState>(context).setTrailingWidget(
_BacklogToggle(
initialValue: showBacklog,
onChanged: (value) {
setState(() {
showBacklog = value;
});
},
),
);
}

@override
Widget buildDesktop(BuildContext context) {
final repo = context.watch<KanbanRepository>();
Expand All @@ -43,20 +60,6 @@
spacing: Spacing.smallSpacing,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Tooltip(
message: showBacklog ? context.t.kanban_screen_hideBacklog : context.t.kanban_screen_showBacklog,
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: toggleBacklog,
child: showBacklog
? const Icon(Icons.folder)
: const Icon(
Icons.folder_open,
),
),
),
),
if (showBacklog)
KanbanColumnWidget(
name: context.t.kanban_screen_backlog,
Expand Down Expand Up @@ -87,3 +90,34 @@
);
}
}

class _BacklogToggle extends StatefulWidget {
const _BacklogToggle({super.key, this.onChanged, required this.initialValue});

Check warning on line 95 in lib/src/kanban/presentation/screens/kanban_screen.dart

View workflow job for this annotation

GitHub Actions / Analysis 🔍

A value for optional parameter 'key' isn't ever given.

Try removing the unused parameter. See https://dart.dev/diagnostics/unused_element_parameter to learn more about this problem.

// ignore: avoid_positional_boolean_parameters
final Function(bool value)? onChanged;

final bool initialValue;

@override
State<_BacklogToggle> createState() => __BacklogToggleState();
}

class __BacklogToggleState extends State<_BacklogToggle> {
late bool showBacklog = widget.initialValue;

void toggleBacklog() {
setState(() {
showBacklog = !showBacklog;
widget.onChanged?.call(showBacklog);
});
}

@override
Widget build(BuildContext context) {
return TextButton(
onPressed: toggleBacklog,
child: Text(showBacklog ? context.t.kanban_screen_hideBacklog : context.t.kanban_screen_showBacklog),
);
}
}
14 changes: 10 additions & 4 deletions lib/src/kanban/presentation/widgets/kanban_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ class KanbanCard extends StatelessWidget {
),
Text(
task.name,
).bold(),
overflow: TextOverflow.ellipsis,
).bold().flexible(),
],
).stretch(),
Spacing.xsVertical(),
Expand All @@ -76,7 +77,10 @@ class KanbanCard extends StatelessWidget {
size: 12,
color: context.theme.taskStatusTheme.colorOf(task.status),
),
Text(task.status.translate(context)),
Text(
task.status.translate(context),
overflow: TextOverflow.ellipsis,
).flexible(),
],
).stretch(),
if (task.deadline != null)
Expand All @@ -85,6 +89,7 @@ class KanbanCard extends StatelessWidget {
children: [
const Icon(Icons.calendar_month, size: 16),
Text.rich(
overflow: TextOverflow.ellipsis,
TextSpan(
children: [
TextSpan(
Expand All @@ -98,7 +103,7 @@ class KanbanCard extends StatelessWidget {
const TextSpan(text: ')'),
],
),
),
).flexible(),
],
),
if (planned != null)
Expand All @@ -107,6 +112,7 @@ class KanbanCard extends StatelessWidget {
children: [
const Icon(Icons.timelapse_rounded, size: 16),
Text.rich(
overflow: TextOverflow.ellipsis,
TextSpan(
children: [
TextSpan(
Expand All @@ -120,7 +126,7 @@ class KanbanCard extends StatelessWidget {
const TextSpan(text: ')'),
],
),
),
).flexible(),
],
),
],
Expand Down
1 change: 1 addition & 0 deletions macos/Flutter/Flutter-Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
1 change: 1 addition & 0 deletions macos/Flutter/Flutter-Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
42 changes: 42 additions & 0 deletions macos/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
platform :osx, '10.15'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_macos_podfile_setup

target 'Runner' do
use_frameworks!

flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
end
end
74 changes: 74 additions & 0 deletions macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
PODS:
- FlutterMacOS (1.0.0)
- objective_c (0.0.1):
- FlutterMacOS
- package_info_plus (0.0.1):
- FlutterMacOS
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- screen_retriever_macos (0.0.1):
- FlutterMacOS
- Sentry/HybridSDK (8.56.2)
- sentry_flutter (9.7.0):
- Flutter
- FlutterMacOS
- Sentry/HybridSDK (= 8.56.2)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- url_launcher_macos (0.0.1):
- FlutterMacOS
- window_manager (0.2.0):
- FlutterMacOS

DEPENDENCIES:
- FlutterMacOS (from `Flutter/ephemeral`)
- objective_c (from `Flutter/ephemeral/.symlinks/plugins/objective_c/macos`)
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- screen_retriever_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos`)
- sentry_flutter (from `Flutter/ephemeral/.symlinks/plugins/sentry_flutter/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
- window_manager (from `Flutter/ephemeral/.symlinks/plugins/window_manager/macos`)

SPEC REPOS:
trunk:
- Sentry

EXTERNAL SOURCES:
FlutterMacOS:
:path: Flutter/ephemeral
objective_c:
:path: Flutter/ephemeral/.symlinks/plugins/objective_c/macos
package_info_plus:
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
screen_retriever_macos:
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos
sentry_flutter:
:path: Flutter/ephemeral/.symlinks/plugins/sentry_flutter/macos
shared_preferences_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
url_launcher_macos:
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
window_manager:
:path: Flutter/ephemeral/.symlinks/plugins/window_manager/macos

SPEC CHECKSUMS:
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
objective_c: ec13431e45ba099cb734eb2829a5c1cd37986cba
package_info_plus: f0052d280d17aa382b932f399edf32507174e870
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
screen_retriever_macos: 452e51764a9e1cdb74b3c541238795849f21557f
Sentry: b53951377b78e21a734f5dc8318e333dbfc682d7
sentry_flutter: 7f88e12d1882ec6e648644a7c0ff5b1466f07f99
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
url_launcher_macos: 0fba8ddabfc33ce0a9afe7c5fef5aab3d8d2d673
window_manager: 1d01fa7ac65a6e6f83b965471b1a7fdd3f06166c

PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009

COCOAPODS: 1.16.2
Loading
Loading