mirror of
https://github.com/smmarty/friflex_flutter_starter.git
synced 2025-12-22 09:30:45 +00:00
refactor(linter): Перейти на friflex_linter, обновить правила
This commit is contained in:
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
@@ -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(),
|
||||
),
|
||||
],
|
||||
);
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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('Вложенный экран')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user