Skip to content

Commit

Permalink
Relative imports
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed May 7, 2021
1 parent 0eb301e commit d7e0509
Show file tree
Hide file tree
Showing 75 changed files with 345 additions and 296 deletions.
8 changes: 0 additions & 8 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,3 @@ analyzer:
# Ignore generated files
- "**/*.g.dart"
- "lib/src/generated/*.dart"
linter:
rules:
prefer_const_constructors: true
prefer_const_constructors_in_immutables: true
prefer_const_declarations: true
prefer_const_literals_to_create_immutables: true
public_member_api_docs: false
prefer_relative_imports: false
31 changes: 16 additions & 15 deletions lib/app_shell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ import 'package:flutter/scheduler.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/atoms/nav_button.dart';
import 'package:sidekick/components/atoms/shortcuts.dart';
import 'package:sidekick/components/atoms/top_app_bar.dart';
import 'package:sidekick/components/organisms/app_bottom_bar.dart';
import 'package:sidekick/components/organisms/info_drawer.dart';
import 'package:sidekick/components/organisms/search_bar.dart';
import 'package:sidekick/constants.dart';
import 'package:sidekick/modules/flutter_releases/fluttter_releases.screen.dart';
import 'package:sidekick/modules/projects/projects.screen.dart';
import 'package:sidekick/providers/navigation_provider.dart';
import 'package:sidekick/providers/selected_info_provider.dart';
import 'package:sidekick/screens/home_screen.dart';
import 'package:sidekick/screens/packages_screen.dart';
import 'package:sidekick/theme.dart';
import 'package:sidekick/utils/layout_size.dart';

import 'components/atoms/nav_button.dart';
import 'components/atoms/shortcuts.dart';
import 'components/atoms/top_app_bar.dart';
import 'components/organisms/app_bottom_bar.dart';
import 'components/organisms/info_drawer.dart';
import 'components/organisms/search_bar.dart';
import 'constants.dart';
import 'modules/flutter_releases/fluttter_releases.screen.dart';
import 'modules/projects/projects.screen.dart';
import 'providers/navigation_provider.dart';
import 'providers/selected_info_provider.dart';
import 'screens/home_screen.dart';
import 'screens/packages_screen.dart';
import 'theme.dart';
import 'utils/layout_size.dart';

final _scaffoldKey = GlobalKey<ScaffoldState>();

Expand Down
3 changes: 2 additions & 1 deletion lib/components/atoms/cache_date_display.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import 'dart:io';
import 'package:date_time_format/date_time_format.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:sidekick/dto/release.dto.dart';

import '../../dto/release.dto.dart';

class CacheDateDisplay extends HookWidget {
final ReleaseDto version;
Expand Down
7 changes: 4 additions & 3 deletions lib/components/atoms/cache_size_display.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:sidekick/providers/fvm_cache.provider.dart';
import 'package:sidekick/utils/dir_stat.dart';

import '../../modules/fvm/fvm.provider.dart';
import '../../utils/dir_stat.dart';
import 'typography.dart';

class CacheSizeDisplay extends HookWidget {
const CacheSizeDisplay({Key key}) : super(key: key);
Expand Down
7 changes: 4 additions & 3 deletions lib/components/atoms/console.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:sidekick/providers/fvm_console_provider.dart';

import '../../modules/fvm/fvm.provider.dart';
import 'typography.dart';

class Console extends HookWidget {
final bool expand;
Expand All @@ -20,7 +21,7 @@ class Console extends HookWidget {

@override
Widget build(BuildContext context) {
final output = useProvider(combinedConsoleProvider);
final output = useProvider(fvmStdoutProvider);
final lines = useState<List<String>>(['']);

useValueChanged(output, (_, __) {
Expand Down
3 changes: 2 additions & 1 deletion lib/components/atoms/copy_button.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:sidekick/utils/notify.dart';

import '../../utils/notify.dart';

class CopyButton extends StatelessWidget {
final String content;
Expand Down
3 changes: 2 additions & 1 deletion lib/components/atoms/local_link_button.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import 'package:flutter/material.dart';
import 'package:open_file/open_file.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:truncate/truncate.dart';

import 'typography.dart';

class LocalLinkButton extends StatelessWidget {
final String localPath;
const LocalLinkButton(
Expand Down
5 changes: 3 additions & 2 deletions lib/components/atoms/screen.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:sidekick/components/atoms/blur_background.dart';
import 'package:sidekick/components/atoms/typography.dart';

import 'blur_background.dart';
import 'typography.dart';

class Screen extends StatelessWidget {
final String title;
Expand Down
3 changes: 2 additions & 1 deletion lib/components/atoms/shortcuts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:sidekick/providers/navigation_provider.dart';

import '../../providers/navigation_provider.dart';

class NavigationIntent extends Intent {
final NavigationRoutes route;
Expand Down
13 changes: 7 additions & 6 deletions lib/components/atoms/top_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import 'dart:io';

import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:sidekick/components/molecules/update_available_button.dart';
import 'package:sidekick/constants.dart';
import 'package:sidekick/modules/settings/settings.screen.dart';
import 'package:sidekick/providers/navigation_provider.dart';
import 'package:sidekick/theme.dart';

import '../../constants.dart';
import '../../modules/settings/settings.screen.dart';
import '../../providers/navigation_provider.dart';
import '../../theme.dart';
import '../molecules/update_available_button.dart';
import 'typography.dart';

class TopAppBar extends StatelessWidget implements PreferredSizeWidget {
const TopAppBar({key}) : super(key: key);
Expand Down
13 changes: 7 additions & 6 deletions lib/components/molecules/advanced_info_tile.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import 'package:flutter/material.dart';
import 'package:sidekick/components/atoms/copy_button.dart';
import 'package:sidekick/components/atoms/group_tile.dart';
import 'package:sidekick/components/atoms/list_tile.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:sidekick/dto/release.dto.dart';
import 'package:sidekick/utils/open_link.dart';

import '../../dto/release.dto.dart';
import '../../utils/open_link.dart';
import '../atoms/copy_button.dart';
import '../atoms/group_tile.dart';
import '../atoms/list_tile.dart';
import '../atoms/typography.dart';

class AdvancedInfoTile extends StatelessWidget {
final ReleaseDto version;
Expand Down
7 changes: 4 additions & 3 deletions lib/components/molecules/app_version_info.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:sidekick/utils/check_update.dart';
import 'package:sidekick/utils/manage_updates.dart';
import 'package:sidekick/version.dart';

import '../../utils/check_update.dart';
import '../../utils/manage_updates.dart';
import '../../version.dart';

class AppVersionInfo extends HookWidget {
const AppVersionInfo({Key key}) : super(key: key);
Expand Down
11 changes: 6 additions & 5 deletions lib/components/molecules/cache_info_tile.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import 'package:flutter/material.dart';
import 'package:open_file/open_file.dart';
import 'package:sidekick/components/atoms/cache_date_display.dart';
import 'package:sidekick/components/atoms/group_tile.dart';
import 'package:sidekick/components/atoms/list_tile.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:sidekick/dto/release.dto.dart';

import '../../dto/release.dto.dart';
import '../atoms/cache_date_display.dart';
import '../atoms/group_tile.dart';
import '../atoms/list_tile.dart';
import '../atoms/typography.dart';

class CacheInfoTile extends StatelessWidget {
final ReleaseDto version;
Expand Down
9 changes: 4 additions & 5 deletions lib/components/molecules/cache_version_actions.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/molecules/delete_dialog.dart';
import 'package:sidekick/dto/release.dto.dart';
import 'package:sidekick/providers/fvm_queue.provider.dart';
import 'package:sidekick/providers/selected_info_provider.dart';

import '../../providers/fvm_queue.provider.dart';
import '../../dto/release.dto.dart';
import '../../modules/fvm/fvm_queue.provider.dart';
import '../../providers/selected_info_provider.dart';
import '../atoms/typography.dart';
import 'delete_dialog.dart';

enum InstalledActions {
remove,
Expand Down
15 changes: 8 additions & 7 deletions lib/components/molecules/cache_version_item.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/atoms/list_tile.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:sidekick/components/molecules/cache_version_actions.dart';
import 'package:sidekick/components/molecules/cache_version_status.dart';
import 'package:sidekick/components/organisms/global_info_dialog.dart';
import 'package:sidekick/dto/release.dto.dart';
import 'package:sidekick/providers/selected_info_provider.dart';

import '../../dto/release.dto.dart';
import '../../providers/selected_info_provider.dart';
import '../atoms/list_tile.dart';
import '../atoms/typography.dart';
import '../organisms/global_info_dialog.dart';
import 'cache_version_actions.dart';
import 'cache_version_status.dart';

class CacheVersionItem extends StatelessWidget {
final ReleaseDto version;
Expand Down
5 changes: 3 additions & 2 deletions lib/components/molecules/cache_version_select.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:sidekick/dto/release.dto.dart';

import '../../dto/release.dto.dart';
import '../atoms/typography.dart';

class CacheVersionSelect extends StatelessWidget {
final List<ReleaseDto> versions;
Expand Down
13 changes: 7 additions & 6 deletions lib/components/molecules/cache_version_status.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/molecules/cache_version_status_master.dart';
import 'package:sidekick/components/molecules/setup_button.dart';
import 'package:sidekick/dto/channel.dto.dart';
import 'package:sidekick/dto/master.dto.dart';
import 'package:sidekick/dto/release.dto.dart';
import 'package:sidekick/providers/fvm_queue.provider.dart';

import '../../dto/channel.dto.dart';
import '../../dto/master.dto.dart';
import '../../dto/release.dto.dart';
import '../../modules/fvm/fvm_queue.provider.dart';
import 'cache_version_status_master.dart';
import 'setup_button.dart';

class CacheVersionStatus extends StatelessWidget {
final ReleaseDto version;
Expand Down
5 changes: 3 additions & 2 deletions lib/components/molecules/cache_version_status_master.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/molecules/setup_button.dart';
import 'package:sidekick/dto/channel.dto.dart';

import '../../dto/channel.dto.dart';
import 'setup_button.dart';

class CacheVersionStatusMaster extends StatelessWidget {
final ChannelDto masterChannel;
Expand Down
9 changes: 5 additions & 4 deletions lib/components/molecules/channel_showcase.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import 'package:date_time_format/date_time_format.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:sidekick/components/molecules/version_install_button.dart';
import 'package:sidekick/dto/channel.dto.dart';
import 'package:sidekick/providers/selected_info_provider.dart';

import '../../dto/channel.dto.dart';
import '../../providers/selected_info_provider.dart';
import '../atoms/typography.dart';
import 'version_install_button.dart';

class ChannelShowcase extends StatelessWidget {
final ChannelDto channel;
Expand Down
3 changes: 2 additions & 1 deletion lib/components/molecules/delete_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:sidekick/dto/release.dto.dart';

import '../../dto/release.dto.dart';

void showDeleteDialog(
BuildContext context, {
Expand Down
5 changes: 3 additions & 2 deletions lib/components/molecules/empty_data_set/empty_packages.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/atoms/empty_data_set.dart';
import 'package:sidekick/modules/settings/settings.screen.dart';

import '../../../modules/settings/settings.screen.dart';
import '../../atoms/empty_data_set.dart';

class EmptyPackages extends StatelessWidget {
const EmptyPackages({Key key}) : super(key: key);
Expand Down
5 changes: 3 additions & 2 deletions lib/components/molecules/empty_data_set/empty_projects.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/atoms/empty_data_set.dart';
import 'package:sidekick/modules/settings/settings.screen.dart';

import '../../../modules/settings/settings.screen.dart';
import '../../atoms/empty_data_set.dart';

class EmptyProjects extends StatelessWidget {
const EmptyProjects({key}) : super(key: key);
Expand Down
5 changes: 3 additions & 2 deletions lib/components/molecules/empty_data_set/empty_versions.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:sidekick/components/atoms/empty_data_set.dart';
import 'package:sidekick/providers/navigation_provider.dart';

import '../../../providers/navigation_provider.dart';
import '../../atoms/empty_data_set.dart';

class EmptyVersions extends StatelessWidget {
const EmptyVersions({Key key}) : super(key: key);
Expand Down
3 changes: 2 additions & 1 deletion lib/components/molecules/github_repo_info.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:flutter/material.dart';
import 'package:github/github.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/utils/open_link.dart';

import '../../utils/open_link.dart';

class GithubRepoInfo extends StatelessWidget {
final Repository repo;
Expand Down
13 changes: 7 additions & 6 deletions lib/components/molecules/package_item.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:sidekick/components/atoms/list_tile.dart';
import 'package:sidekick/components/atoms/typography.dart';
import 'package:sidekick/components/molecules/github_repo_info.dart';
import 'package:sidekick/components/molecules/package_score_display.dart';
import 'package:sidekick/dto/package_detail.dto.dart';
import 'package:sidekick/utils/open_link.dart';

import '../../dto/package_detail.dto.dart';
import '../../utils/open_link.dart';
import '../atoms/list_tile.dart';
import '../atoms/typography.dart';
import 'github_repo_info.dart';
import 'package_score_display.dart';

class PackageItem extends StatelessWidget {
final PackageDetail package;
Expand Down
3 changes: 2 additions & 1 deletion lib/components/molecules/package_score_display.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:pub_api_client/pub_api_client.dart';
import 'package:sidekick/components/atoms/typography.dart';

import '../atoms/typography.dart';

class PackageScoreDisplay extends StatelessWidget {
final PackageScore score;
Expand Down
Loading

0 comments on commit d7e0509

Please sign in to comment.