Skip to content

Commit b3e1bb6

Browse files
committed
refactor(app): move max app width constant to shared file
- Remove local kMaxAppWidth constant - Use AppConstants.kMaxAppWidth from shared file - Improve code maintainability and consistency
1 parent 89e049e commit b3e1bb6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/app/view/app.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import 'package:flutter_news_app_web_dashboard_full_source_code/dashboard/bloc/d
1717
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/app_localizations.dart';
1818
import 'package:flutter_news_app_web_dashboard_full_source_code/router/router.dart';
1919
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/services/throttled_fetching_service.dart';
20+
import 'package:flutter_news_app_web_dashboard_full_source_code/shared/shared.dart';
2021
import 'package:go_router/go_router.dart';
2122
import 'package:kv_storage_service/kv_storage_service.dart';
2223
import 'package:logging/logging.dart';
@@ -206,7 +207,6 @@ class _AppViewState extends State<_AppView> {
206207
fontFamily: fontFamily,
207208
);
208209

209-
const double kMaxAppWidth = 1000; // Local constant for max width
210210
return Center(
211211
child: Card(
212212
margin: EdgeInsets.zero, // Remove default card margin
@@ -217,7 +217,8 @@ class _AppViewState extends State<_AppView> {
217217
), // Match cardRadius from theme
218218
),
219219
child: ConstrainedBox(
220-
constraints: const BoxConstraints(maxWidth: kMaxAppWidth),
220+
constraints:
221+
const BoxConstraints(maxWidth: AppConstants.kMaxAppWidth),
221222
child: MaterialApp.router(
222223
debugShowCheckedModeBanner: false,
223224
routerConfig: _router,

0 commit comments

Comments
 (0)