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

@@ -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,