diff --git a/lib/features/auth/screen/login_screen.dart b/lib/features/auth/screen/login_screen.dart index b9b6010..a07c273 100644 --- a/lib/features/auth/screen/login_screen.dart +++ b/lib/features/auth/screen/login_screen.dart @@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:lottie/lottie.dart'; import 'package:reddit/core/common/sign_in_button.dart'; import 'package:reddit/features/auth/controller/auth_controller.dart'; +import 'package:reddit/responsive/responsive.dart'; import '../../../core/common/loader.dart'; import '../../../core/constants/constants.dart'; @@ -59,7 +60,7 @@ class LoginScreen extends ConsumerWidget { ), ), const SizedBox(height: 20), - const SignInButton(), + const Responsive(child: SignInButton()), ], ), ); diff --git a/lib/responsive/responsive.dart b/lib/responsive/responsive.dart new file mode 100644 index 0000000..e49adc0 --- /dev/null +++ b/lib/responsive/responsive.dart @@ -0,0 +1,22 @@ +import 'package:flutter/material.dart'; + +class Responsive extends StatelessWidget { + final Widget child; + + const Responsive({ + super.key, + required this.child, + }); + + @override + Widget build(BuildContext context) { + return Center( + child: ConstrainedBox( + constraints: const BoxConstraints( + maxWidth: 600, + ), + child: child, + ), + ); + } +}