Skip to content

Commit ddfd609

Browse files
committed
refactor: wrap app in card for better layout
- Added max width constraint - Centered content on larger screens - Improved visual appearance
1 parent 9429bca commit ddfd609

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

lib/app/view/app.dart

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,27 @@ class _AppViewState extends State<_AppView> {
141141
},
142142
child: BlocBuilder<AppBloc, AppState>(
143143
builder: (context, state) {
144-
return MaterialApp.router(
145-
debugShowCheckedModeBanner: false,
146-
routerConfig: _router,
147-
localizationsDelegates: AppLocalizations.localizationsDelegates,
148-
supportedLocales: AppLocalizations.supportedLocales,
144+
const double kMaxAppWidth = 1000; // Local constant for max width
145+
return Center(
146+
child: Card(
147+
margin: EdgeInsets.zero, // Remove default card margin
148+
elevation: 4, // Add some elevation to make it "pop"
149+
shape: RoundedRectangleBorder(
150+
borderRadius: BorderRadius.circular(
151+
8,
152+
), // Match cardRadius from theme
153+
),
154+
child: ConstrainedBox(
155+
constraints: const BoxConstraints(maxWidth: kMaxAppWidth),
156+
child: MaterialApp.router(
157+
debugShowCheckedModeBanner: false,
158+
routerConfig: _router,
159+
localizationsDelegates:
160+
AppLocalizations.localizationsDelegates,
161+
supportedLocales: AppLocalizations.supportedLocales,
162+
),
163+
),
164+
),
149165
);
150166
},
151167
),

0 commit comments

Comments
 (0)