Skip to content

Commit

Permalink
style: add relative imports style
Browse files Browse the repository at this point in the history
  • Loading branch information
brunogabriel committed Oct 31, 2024
1 parent 1c21432 commit b18bef7
Show file tree
Hide file tree
Showing 48 changed files with 210 additions and 191 deletions.
10 changes: 5 additions & 5 deletions pokedex/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
revision: "603104015dd692ea3403755b55d07813d5cf8965"
channel: "stable"

project_type: app
Expand All @@ -13,11 +13,11 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965
- platform: android
create_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
base_revision: 2663184aa79047d0a33a14a3b607954f8fdd8730
create_revision: 603104015dd692ea3403755b55d07813d5cf8965
base_revision: 603104015dd692ea3403755b55d07813d5cf8965

# User provided section

Expand Down
1 change: 1 addition & 0 deletions pokedex/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ linter:
- prefer_single_quotes
- curly_braces_in_flow_control_structures
- slash_for_doc_comments
- prefer_relative_imports

analyzer:
exclude:
Expand Down
7 changes: 4 additions & 3 deletions pokedex/lib/design/components/badge_type.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/design/extensions/design_string_extensions.dart';
import 'package:pokedex_flutter/shared/extensions/string_extensions.dart';

import '../../shared/extensions/string_extensions.dart';
import '../constants/pokedex_spacing.dart';
import '../extensions/design_string_extensions.dart';

class BadgeType extends StatelessWidget {
const BadgeType({
Expand Down
2 changes: 1 addition & 1 deletion pokedex/lib/design/components/circular_matrix.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import '../constants/pokedex_spacing.dart';

class CircularMatrix extends StatelessWidget {
const CircularMatrix({
Expand Down
5 changes: 3 additions & 2 deletions pokedex/lib/design/components/error_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:flutter_svg/svg.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/shared/extensions/string_extensions.dart';

import '../../shared/extensions/string_extensions.dart';
import '../constants/pokedex_spacing.dart';

class ErrorPage extends StatelessWidget {
const ErrorPage({
Expand Down
2 changes: 1 addition & 1 deletion pokedex/lib/design/components/loading_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:pokedex_flutter/shared/extensions/string_extensions.dart';
import '../../shared/extensions/string_extensions.dart';

class LoadingPage extends StatelessWidget {
const LoadingPage({
Expand Down
9 changes: 5 additions & 4 deletions pokedex/lib/design/components/pokemon_information.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import 'package:flutter/material.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/design/components/badge_type.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/shared/extensions/int_extensions.dart';
import 'package:pokedex_flutter/shared/extensions/string_extensions.dart';

import '../../shared/extensions/int_extensions.dart';
import '../../shared/extensions/string_extensions.dart';
import '../constants/pokedex_spacing.dart';
import 'badge_type.dart';

class PokemonInformation extends StatelessWidget {
const PokemonInformation({
Expand Down
5 changes: 3 additions & 2 deletions pokedex/lib/design/components/stat_line.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:pokedex_flutter/design/components/stat_chart.dart';
import 'package:pokedex_flutter/design/constants/pokedex_theme_data.dart';

import '../constants/pokedex_theme_data.dart';
import 'stat_chart.dart';

class StatLine extends StatelessWidget {
const StatLine({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:pokedex_flutter/design/constants/pokedex_type_color.dart';
import '../constants/pokedex_type_color.dart';

extension DesignStringExtensions on String {
PokedexTypeColor get pokemonColor => PokedexTypeColor.values.firstWhere(
Expand Down
5 changes: 3 additions & 2 deletions pokedex/lib/feature/about/domain/about_use_case.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import 'package:collection/collection.dart';
import 'package:injectable/injectable.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/feature/about/domain/entity/about_entity.dart';
import 'package:pokedex_flutter/shared/extensions/type_extensions.dart';

import '../../../shared/extensions/type_extensions.dart';
import 'entity/about_entity.dart';

abstract class AboutUseCase {
Future<AboutEntity> getAbout(Pokemon pokemon);
Expand Down
4 changes: 2 additions & 2 deletions pokedex/lib/feature/about/presentation/cubit/about_cubit.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:injectable/injectable.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/feature/about/domain/about_use_case.dart';
import 'package:pokedex_flutter/feature/about/domain/entity/about_entity.dart';
import '../../domain/about_use_case.dart';
import '../../domain/entity/about_entity.dart';

part 'about_state.dart';

Expand Down
11 changes: 6 additions & 5 deletions pokedex/lib/feature/about/presentation/page/about_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:get_it/get_it.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/design/components/error_page.dart';
import 'package:pokedex_flutter/design/components/loading_page.dart';
import 'package:pokedex_flutter/feature/about/presentation/cubit/about_cubit.dart';
import 'package:pokedex_flutter/feature/about/presentation/widgets/about_success.dart';
import 'package:pokedex_flutter/shared/extensions/pokemon_type_extensions.dart';

import '../../../../design/components/error_page.dart';
import '../../../../design/components/loading_page.dart';
import '../../../../shared/extensions/pokemon_type_extensions.dart';
import '../cubit/about_cubit.dart';
import '../widgets/about_success.dart';

class AboutPage extends StatefulWidget {
const AboutPage({
Expand Down
21 changes: 11 additions & 10 deletions pokedex/lib/feature/about/presentation/widgets/about_success.dart
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/design/constants/pokedex_theme_data.dart';
import 'package:pokedex_flutter/design/constants/pokedex_type_color.dart';
import 'package:pokedex_flutter/feature/about/presentation/constants/about_strings.dart';
import 'package:pokedex_flutter/feature/about/presentation/cubit/about_cubit.dart';
import 'package:pokedex_flutter/feature/about/presentation/widgets/about_tile.dart';
import 'package:pokedex_flutter/feature/about/presentation/widgets/about_weaknesses_list.dart';
import 'package:pokedex_flutter/shared/extensions/int_extensions.dart';
import 'package:pokedex_flutter/shared/extensions/pokemon_type_extensions.dart';
import 'package:pokedex_flutter/shared/extensions/string_extensions.dart';

import '../../../../design/constants/pokedex_spacing.dart';
import '../../../../design/constants/pokedex_theme_data.dart';
import '../../../../design/constants/pokedex_type_color.dart';
import '../../../../shared/extensions/int_extensions.dart';
import '../../../../shared/extensions/pokemon_type_extensions.dart';
import '../../../../shared/extensions/string_extensions.dart';
import '../constants/about_strings.dart';
import '../cubit/about_cubit.dart';
import 'about_tile.dart';
import 'about_weaknesses_list.dart';

class AboutSuccess extends StatelessWidget {
const AboutSuccess({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/design/constants/pokedex_theme_data.dart';
import '../../../../design/constants/pokedex_spacing.dart';
import '../../../../design/constants/pokedex_theme_data.dart';

class AboutTile extends StatelessWidget {
const AboutTile({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:pokedex_flutter/design/components/badge_type.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import '../../../../design/components/badge_type.dart';
import '../../../../design/constants/pokedex_spacing.dart';

class AboutWeaknessesList extends StatelessWidget {
const AboutWeaknessesList({super.key, required this.weaknesses});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:injectable/injectable.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/feature/details/domain/details_use_case.dart';
import '../../domain/details_use_case.dart';

part 'details_state.dart';

Expand Down
17 changes: 9 additions & 8 deletions pokedex/lib/feature/details/presentation/page/details_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:get_it/get_it.dart';
import 'package:go_router/go_router.dart';
import 'package:pokedex_flutter/design/components/error_page.dart';
import 'package:pokedex_flutter/design/components/loading_page.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/design/constants/pokedex_theme_data.dart';
import 'package:pokedex_flutter/feature/details/presentation/cubit/details_cubit.dart';
import 'package:pokedex_flutter/feature/details/presentation/widgets/details_success.dart';
import 'package:pokedex_flutter/shared/extensions/pokemon_type_extensions.dart';
import 'package:pokedex_flutter/shared/extensions/string_extensions.dart';

import '../../../../design/components/error_page.dart';
import '../../../../design/components/loading_page.dart';
import '../../../../design/constants/pokedex_spacing.dart';
import '../../../../design/constants/pokedex_theme_data.dart';
import '../../../../shared/extensions/pokemon_type_extensions.dart';
import '../../../../shared/extensions/string_extensions.dart';
import '../cubit/details_cubit.dart';
import '../widgets/details_success.dart';

class DetailsPage extends StatefulWidget {
const DetailsPage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/design/components/circular_matrix.dart';
import 'package:pokedex_flutter/design/components/pokemon_information.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/shared/extensions/int_extensions.dart';
import 'package:pokedex_flutter/shared/extensions/string_extensions.dart';
import '../../../../design/components/circular_matrix.dart';
import '../../../../design/components/pokemon_information.dart';
import '../../../../design/constants/pokedex_spacing.dart';
import '../../../../shared/extensions/int_extensions.dart';
import '../../../../shared/extensions/string_extensions.dart';

class DetailsHeader extends StatelessWidget {
const DetailsHeader({super.key, required this.pokemon});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/feature/about/presentation/page/about_page.dart';
import 'package:pokedex_flutter/feature/details/presentation/widgets/details_header.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/page/evolution_page.dart';
import 'package:pokedex_flutter/feature/stats/presentation/page/stats_page.dart';

import '../../../../design/constants/pokedex_spacing.dart';
import '../../../about/presentation/page/about_page.dart';
import '../../../evolution/presentation/page/evolution_page.dart';
import '../../../stats/presentation/page/stats_page.dart';
import 'details_header.dart';

class DetailsSuccess extends StatefulWidget {
const DetailsSuccess({super.key, required this.pokemon});
Expand Down
7 changes: 4 additions & 3 deletions pokedex/lib/feature/evolution/domain/evolution_use_case.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import 'dart:collection';

import 'package:injectable/injectable.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/feature/evolution/domain/entity/evolution_entity.dart';
import 'package:pokedex_flutter/feature/evolution/domain/mapper/evolution_mapper.dart';
import 'package:pokedex_flutter/shared/data/pair.dart';

import '../../../shared/data/pair.dart';
import 'entity/evolution_entity.dart';
import 'mapper/evolution_mapper.dart';

abstract class EvolutionUseCase {
Future<EvolutionEntity> getEvoluions(Pokemon pokemon);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import 'package:injectable/injectable.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/feature/evolution/domain/entity/evolution_entity.dart';
import 'package:pokedex_flutter/shared/data/pair.dart';
import 'package:pokedex_flutter/shared/extensions/string_extensions.dart';

import '../../../../shared/data/pair.dart';
import '../../../../shared/extensions/string_extensions.dart';
import '../entity/evolution_entity.dart';

abstract class EvolutionMapper {
EvolutionDescriptionEntity toEntity(Pair<ChainLink, ChainLink> pair);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:injectable/injectable.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/feature/evolution/domain/entity/evolution_entity.dart';
import 'package:pokedex_flutter/feature/evolution/domain/evolution_use_case.dart';
import '../../domain/entity/evolution_entity.dart';
import '../../domain/evolution_use_case.dart';

part 'evolution_state.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:get_it/get_it.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/design/components/error_page.dart';
import 'package:pokedex_flutter/design/components/loading_page.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/cubit/evolution_cubit.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/widgets/evolution_empty_state.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/widgets/evolution_success.dart';
import 'package:pokedex_flutter/shared/extensions/pokemon_type_extensions.dart';

import '../../../../design/components/error_page.dart';
import '../../../../design/components/loading_page.dart';
import '../../../../shared/extensions/pokemon_type_extensions.dart';
import '../cubit/evolution_cubit.dart';
import '../widgets/evolution_empty_state.dart';
import '../widgets/evolution_success.dart';

class EvolutionPage extends StatefulWidget {
const EvolutionPage({super.key, required this.pokemon});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/widgets/evolution_method_chart.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/widgets/pokemon_chart.dart';
import 'evolution_method_chart.dart';
import 'pokemon_chart.dart';

class EvolutionChainChart extends StatelessWidget {
const EvolutionChainChart({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/design/constants/pokedex_theme_data.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/constants/evolution_strings.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/cubit/evolution_cubit.dart';
import 'package:pokedex_flutter/shared/extensions/pokemon_type_extensions.dart';

import '../../../../design/constants/pokedex_spacing.dart';
import '../../../../design/constants/pokedex_theme_data.dart';
import '../../../../shared/extensions/pokemon_type_extensions.dart';
import '../constants/evolution_strings.dart';
import '../cubit/evolution_cubit.dart';

class EvolutionEmptyState extends StatelessWidget {
const EvolutionEmptyState({super.key});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:pokedex_flutter/design/constants/pokedex_theme_data.dart';
import '../../../../design/constants/pokedex_theme_data.dart';

class EvolutionMethodChart extends StatelessWidget {
const EvolutionMethodChart({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pokedex_flutter/design/constants/pokedex_spacing.dart';
import 'package:pokedex_flutter/feature/evolution/domain/entity/evolution_entity.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/constants/evolution_strings.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/cubit/evolution_cubit.dart';
import 'package:pokedex_flutter/feature/evolution/presentation/widgets/evolution_chain_chart.dart';
import 'package:pokedex_flutter/shared/extensions/pokemon_type_extensions.dart';

import '../../../../design/constants/pokedex_spacing.dart';
import '../../../../shared/extensions/pokemon_type_extensions.dart';
import '../../domain/entity/evolution_entity.dart';
import '../constants/evolution_strings.dart';
import '../cubit/evolution_cubit.dart';
import 'evolution_chain_chart.dart';

class EvolutionSuccess extends StatelessWidget {
const EvolutionSuccess({super.key});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:pokedex_flutter/design/constants/pokedex_theme_data.dart';
import 'package:pokedex_flutter/shared/extensions/int_extensions.dart';
import 'package:pokedex_flutter/shared/extensions/string_extensions.dart';
import '../../../../design/constants/pokedex_theme_data.dart';
import '../../../../shared/extensions/int_extensions.dart';
import '../../../../shared/extensions/string_extensions.dart';

class PokemonChart extends StatelessWidget {
const PokemonChart({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import 'package:equatable/equatable.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:injectable/injectable.dart';
import 'package:pokedex/pokedex.dart';
import 'package:pokedex_flutter/feature/pokemons/domain/pokemons_use_case.dart';
import 'package:pokedex_flutter/shared/events/event_transformations.dart';

import '../../../../shared/events/event_transformations.dart';
import '../../domain/pokemons_use_case.dart';

part 'pokemons_event.dart';
part 'pokemons_state.dart';
Expand Down
Loading

0 comments on commit b18bef7

Please sign in to comment.