Skip to content

Commit

Permalink
Move Dimensions to sharezone_widgets (#1193)
Browse files Browse the repository at this point in the history
I moved the `dimensions.dart` class to the `sharezone_widgets` package.
Technically, it's not a widget but it's something that is only used in
our UI so I think it's okay to have in ``sharezone_widgets` (better
ideas are welcome). This removes the direct dependency of
`sharezone_utils` in `sharezone_widgets`.
  • Loading branch information
nilsreichardt authored Dec 13, 2023
1 parent ac6bc65 commit a6d47a0
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 22 deletions.
1 change: 0 additions & 1 deletion app/lib/auth/sign_in_with_qr_code_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import 'package:crash_analytics/crash_analytics.dart';
import 'package:flutter/material.dart' hide VerticalDivider;
import 'package:qr_flutter/qr_flutter.dart';
import 'package:sharezone/groups/src/widgets/contact_support.dart';
import 'package:sharezone_utils/dimensions.dart';
import 'package:sharezone_widgets/sharezone_widgets.dart';

import 'email_and_password_link_page.dart';
Expand Down
4 changes: 1 addition & 3 deletions app/lib/blackboard/details/blackboard_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,20 @@

import 'package:bloc_provider/bloc_provider.dart';
import 'package:common_domain_models/common_domain_models.dart';

import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:sharezone/blackboard/blackboard_dialog.dart';
import 'package:sharezone/blackboard/blackboard_item.dart';
import 'package:sharezone/blackboard/blackboard_view.dart';
import 'package:sharezone/blackboard/details/blackboard_item_read_by_users_list/blackboard_item_read_by_users_list_page.dart';
import 'package:sharezone/main/application_bloc.dart';
import 'package:sharezone/comments/comments_gateway.dart';
import 'package:sharezone/comments/widgets/comment_section_builder.dart';
import 'package:sharezone/filesharing/dialog/attachment_list.dart';
import 'package:sharezone/main/application_bloc.dart';
import 'package:sharezone/report/report_icon.dart';
import 'package:sharezone/report/report_item.dart';
import 'package:sharezone/util/launch_link.dart';
import 'package:sharezone/widgets/material/bottom_action_bar.dart';
import 'package:sharezone_utils/dimensions.dart';
import 'package:sharezone_widgets/sharezone_widgets.dart';

import '../show_delete_blackboard_item_dialog.dart';
Expand Down
1 change: 0 additions & 1 deletion app/lib/filesharing/file_sharing_view_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import 'package:sharezone/filesharing/logic/file_sharing_page_state_bloc.dart';
import 'package:sharezone/filesharing/models/file_sharing_page_state.dart';
import 'package:sharezone/filesharing/rules/filesharing_permissions.dart';
import 'package:sharezone/widgets/animation/color_fade_in.dart';
import 'package:sharezone_utils/dimensions.dart';
import 'package:sharezone_widgets/sharezone_widgets.dart';

import 'logic/open_cloud_file.dart';
Expand Down
2 changes: 1 addition & 1 deletion app/lib/navigation/scaffold/sharezone_custom_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import 'package:flutter/material.dart';
import 'package:sharezone/navigation/models/navigation_item.dart';
import 'package:sharezone/navigation/scaffold/app_bar_configuration.dart';
import 'package:sharezone_utils/dimensions.dart';
import 'package:sharezone_widgets/sharezone_widgets.dart';

import 'desktop/desktop_custom_scaffold.dart';
import 'portable/portable_custom_scaffold.dart';
Expand Down
2 changes: 1 addition & 1 deletion app/lib/navigation/scaffold/sharezone_main_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import 'package:flutter/material.dart';
import 'package:sharezone/navigation/models/navigation_item.dart';
import 'package:sharezone/navigation/scaffold/app_bar_configuration.dart';
import 'package:sharezone_utils/dimensions.dart';
import 'package:sharezone_widgets/sharezone_widgets.dart';

import 'bottom_bar_configuration.dart';
import 'desktop/desktop_main_scaffold.dart';
Expand Down
11 changes: 0 additions & 11 deletions lib/sharezone_utils/lib/dimensions.dart

This file was deleted.

3 changes: 3 additions & 0 deletions lib/sharezone_widgets/lib/sharezone_widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export 'src/common/widgets/action_item_button.dart';
// dialog_wrapper
export 'src/dialog_wrapper.dart';

// dimensions
export 'src/dimensions.dart';

// form
export 'src/form.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// SPDX-License-Identifier: EUPL-1.2

import 'package:flutter/material.dart';
import 'package:sharezone_utils/dimensions.dart';
import 'package:sharezone_widgets/sharezone_widgets.dart';

class ModalFloatingActionButton extends StatelessWidget {
final VoidCallback onPressed;
Expand Down
2 changes: 1 addition & 1 deletion lib/sharezone_widgets/pubspec.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions lib/sharezone_widgets/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ environment:
dependencies:
sharezone_common:
path: ../sharezone_common
sharezone_utils:
path: ../sharezone_utils
build_context:
path: ../build_context
flutter_svg: ^2.0.2
Expand Down

0 comments on commit a6d47a0

Please sign in to comment.