File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
lib/authentication/widgets Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ import 'package:flutter/material.dart' ;
2+ import 'package:flutter_news_app_web_dashboard_full_source_code/shared/constants/app_constants.dart' ;
3+ import 'package:ui_kit/ui_kit.dart' ;
4+
5+ /// {@template auth_layout}
6+ /// A responsive layout for authentication pages.
7+ ///
8+ /// It centers the content and constrains its width for a better
9+ /// visual experience on larger screens, while allowing it to be
10+ /// scrollable on smaller screens.
11+ /// {@endtemplate}
12+ class AuthLayout extends StatelessWidget {
13+ /// {@macro auth_layout}
14+ const AuthLayout ({required this .child, super .key});
15+
16+ /// The child widget to display within the layout.
17+ final Widget child;
18+
19+ @override
20+ Widget build (BuildContext context) {
21+ return Padding (
22+ padding: const EdgeInsets .all (AppSpacing .lg),
23+ child: Center (
24+ child: ConstrainedBox (
25+ constraints: const BoxConstraints (
26+ maxWidth: AppConstants .kMaxAuthWidth,
27+ ),
28+ child: SingleChildScrollView (child: child),
29+ ),
30+ ),
31+ );
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments