refactor(linter): Перейти на friflex_linter, обновить правила

This commit is contained in:
PetrovY
2025-05-28 16:38:56 +03:00
parent 31507ae230
commit c6d4700892
61 changed files with 691 additions and 366 deletions

View File

@@ -1,4 +1,4 @@
import '../../domain/repository/i_main_repository.dart';
import 'package:friflex_starter/features/main/domain/repository/i_main_repository.dart';
/// {@template MainMockRepository}
///
@@ -6,4 +6,4 @@ import '../../domain/repository/i_main_repository.dart';
final class MainMockRepository implements IMainRepository {
@override
String get name => 'MainMockRepository';
}
}

View File

@@ -1,14 +1,14 @@
import 'package:friflex_starter/app/http/i_http_client.dart';
import '../../domain/repository/i_main_repository.dart';
import 'package:friflex_starter/features/main/domain/repository/i_main_repository.dart';
/// {@template MainRepository}
///
/// {@endtemplate}
final class MainRepository implements IMainRepository {
final IHttpClient httpClient;
MainRepository({required this.httpClient});
final IHttpClient httpClient;
@override
String get name => 'MainRepository';

View File

@@ -1,6 +1,6 @@
import 'package:friflex_starter/di/di_base_repo.dart';
/// {@template IMainRepository}
///
///
/// {@endtemplate}
abstract interface class IMainRepository with DiBaseRepo{}
abstract interface class IMainRepository with DiBaseRepo {}

View File

@@ -23,25 +23,24 @@ abstract final class MainRoutes {
static StatefulShellBranch buildShellBranch({
List<RouteBase> routes = const [],
List<NavigatorObserver>? observers,
}) =>
StatefulShellBranch(
initialLocation: _mainScreenPath,
observers: observers,
}) => StatefulShellBranch(
initialLocation: _mainScreenPath,
observers: observers,
routes: [
...routes,
GoRoute(
path: _mainScreenPath,
name: mainScreenName,
builder: (context, state) => const MainScreen(),
routes: [
...routes,
// Пример вложенного роута для главного экрана
GoRoute(
path: _mainScreenPath,
name: mainScreenName,
builder: (context, state) => const MainScreen(),
routes: [
// Пример вложенного роута для главного экрана
GoRoute(
path: _mainDetailScreenPath,
name: mainDetailScreenName,
builder: (context, state) => const MainDetailScreen(),
),
],
path: _mainDetailScreenPath,
name: mainDetailScreenName,
builder: (context, state) => const MainDetailScreen(),
),
],
);
),
],
);
}

View File

@@ -10,12 +10,8 @@ class MainDetailScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Main Detail Screen'),
),
body: const Center(
child: Text('Вложенный экран'),
),
appBar: AppBar(title: const Text('Main Detail Screen')),
body: const Center(child: Text('Вложенный экран')),
);
}
}

View File

@@ -13,9 +13,7 @@ class MainScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Main Screen'),
),
appBar: AppBar(title: const Text('Main Screen')),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,