diff --git a/lib/main.dart b/lib/main.dart index 6a3f450f..c7b31392 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,8 +2,8 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:syncrow_web/pages/auth/bloc/auth_bloc.dart'; import 'package:syncrow_web/pages/auth/view/login_page.dart'; -import 'package:syncrow_web/pages/home/view/home_page.dart'; import 'package:syncrow_web/services/locator.dart'; +import 'package:syncrow_web/utils/color_manager.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); @@ -34,18 +34,25 @@ class MyApp extends StatelessWidget { ), theme: ThemeData( textTheme: const TextTheme( - bodySmall:TextStyle(), - bodyLarge:TextStyle(), - bodyMedium:TextStyle(), + bodySmall: TextStyle( + fontSize: 13, + color: ColorsManager.whiteColors, + fontWeight: FontWeight.bold), + bodyMedium: TextStyle(color: Colors.black87, fontSize: 14), + bodyLarge: TextStyle(fontSize: 16,color: Colors.white), + headlineSmall: TextStyle(color: Colors.black87, fontSize: 18), + headlineMedium: TextStyle(color: Colors.black87, fontSize: 20), + headlineLarge: TextStyle( + color: Colors.white, + fontSize: 24, + fontWeight: FontWeight.bold, + ), ), colorScheme: ColorScheme.fromSeed( seedColor: Colors.deepPurple), // Set up color scheme useMaterial3: true, // Enable Material 3 ), - home: isLoggedIn == 'Success'? - const HomePage() - : - const LoginPage(), + home:LoginPage(), ); } } diff --git a/lib/pages/auth/view/forget_password_web_page.dart b/lib/pages/auth/view/forget_password_web_page.dart index 4f2a1110..d24691b6 100644 --- a/lib/pages/auth/view/forget_password_web_page.dart +++ b/lib/pages/auth/view/forget_password_web_page.dart @@ -11,7 +11,6 @@ import 'package:syncrow_web/utils/constants/assets.dart'; import 'package:syncrow_web/utils/style.dart'; class ForgetPasswordWebPage extends StatelessWidget { const ForgetPasswordWebPage({super.key}); - @override Widget build(BuildContext context) { return Scaffold( @@ -113,7 +112,7 @@ class ForgetPasswordWebPage extends StatelessWidget { const SizedBox(height: 10), Text( 'Please fill in your account information to\nretrieve your password', - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 10), Column( @@ -122,7 +121,7 @@ class ForgetPasswordWebPage extends StatelessWidget { children: [ Text( "Country/Region", - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 10), SizedBox( @@ -167,7 +166,7 @@ class ForgetPasswordWebPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, children: [ Text("Account", - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 10), SizedBox( @@ -186,7 +185,7 @@ class ForgetPasswordWebPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, children: [ Text("One Time Password", - style: smallTextStyle,), + style: Theme.of(context).textTheme.bodySmall,), const SizedBox(height: 10), SizedBox( child: TextFormField( @@ -225,7 +224,7 @@ class ForgetPasswordWebPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, children: [ Text("Password", - style: smallTextStyle,), + style: Theme.of(context).textTheme.bodySmall,), const SizedBox(height: 10), SizedBox( child: TextFormField( diff --git a/lib/pages/auth/view/login_mobile_page.dart b/lib/pages/auth/view/login_mobile_page.dart index 3e709735..4cb00cf5 100644 --- a/lib/pages/auth/view/login_mobile_page.dart +++ b/lib/pages/auth/view/login_mobile_page.dart @@ -127,7 +127,7 @@ class LoginMobilePage extends StatelessWidget { children: [ Text( "Country/Region", - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), SizedBox( child: DropdownButtonFormField( @@ -168,7 +168,7 @@ class LoginMobilePage extends StatelessWidget { children: [ Text( "Email", - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), SizedBox( child: TextFormField( @@ -188,7 +188,7 @@ class LoginMobilePage extends StatelessWidget { children: [ Text( "Password", - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), SizedBox( child: TextFormField( @@ -221,7 +221,7 @@ class LoginMobilePage extends StatelessWidget { }, child: Text( "Forgot Password?", - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), ), ], diff --git a/lib/pages/auth/view/login_web_page.dart b/lib/pages/auth/view/login_web_page.dart index 2e407e44..401b4b2d 100644 --- a/lib/pages/auth/view/login_web_page.dart +++ b/lib/pages/auth/view/login_web_page.dart @@ -26,7 +26,6 @@ class _LoginWebPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( body: BlocProvider( create: (BuildContext context) => AuthBloc(), @@ -119,13 +118,9 @@ class _LoginWebPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox(height: 40), - const Text( + Text( 'Login', - style: TextStyle( - color: Colors.white, - fontSize: 24, - fontWeight: FontWeight.bold), - ), + style:Theme.of(context).textTheme.headlineLarge), SizedBox(height: size.height*0.03), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -133,7 +128,7 @@ class _LoginWebPageState extends State { children: [ Text( "Country/Region", - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), const SizedBox(height: 10,), SizedBox( @@ -164,9 +159,7 @@ class _LoginWebPageState extends State { child: Text(region), ); }).toList(), - onChanged: (String? value) { - print(value); - }, + onChanged: (String? value) {}, ), ) ], @@ -177,7 +170,7 @@ class _LoginWebPageState extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ Text("Email", - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), const SizedBox( height: 10, @@ -197,7 +190,7 @@ class _LoginWebPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - Text("Password", style: smallTextStyle,), + Text("Password", style: Theme.of(context).textTheme.bodySmall,), const SizedBox( height: 10, ), @@ -241,7 +234,7 @@ class _LoginWebPageState extends State { }, child: Text( "Forgot Password?", - style: smallTextStyle, + style: Theme.of(context).textTheme.bodySmall, ), ), ], diff --git a/lib/pages/common/default_button.dart b/lib/pages/common/default_button.dart index 277d18f8..d588acb9 100644 --- a/lib/pages/common/default_button.dart +++ b/lib/pages/common/default_button.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:syncrow_web/utils/color_manager.dart'; -import 'package:syncrow_web/utils/style.dart'; class DefaultButton extends StatelessWidget { const DefaultButton({ @@ -48,7 +47,7 @@ class DefaultButton extends StatelessWidget { ButtonStyle( textStyle: MaterialStateProperty.all( customTextStyle - ?? smallTextStyle.copyWith( + ?? Theme.of(context).textTheme.bodySmall!.copyWith( fontSize: 13, color: foregroundColor, fontWeight: FontWeight.normal diff --git a/lib/utils/style.dart b/lib/utils/style.dart index 70f9d0bd..7260e78d 100644 --- a/lib/utils/style.dart +++ b/lib/utils/style.dart @@ -22,11 +22,5 @@ InputDecoration? textBoxDecoration({bool suffixIcon = false}) => InputDecoration ); -TextStyle appBarTextStyle = -const TextStyle(fontSize: 20, color: ColorsManager.whiteColors); - -TextStyle smallTextStyle = -const TextStyle(fontSize: 13, color: ColorsManager.whiteColors,fontWeight: FontWeight.bold); - Decoration containerDecoration = const BoxDecoration(color: Colors.white,borderRadius: BorderRadius.all(Radius.circular(20))); \ No newline at end of file diff --git a/lib/web_layout/web_app_bar.dart b/lib/web_layout/web_app_bar.dart index c7655eef..7d28032d 100644 --- a/lib/web_layout/web_app_bar.dart +++ b/lib/web_layout/web_app_bar.dart @@ -18,9 +18,8 @@ class WebAppBar extends StatelessWidget { children: [ Expanded( child: Text( - title!,style: const TextStyle( - fontSize: 30, - color: Colors.white),) + title!, + style: Theme.of(context).textTheme.headlineLarge,) ), if (body != null) Expanded( @@ -49,7 +48,7 @@ class WebAppBar extends StatelessWidget { ), ), const SizedBox(width: 10,), - const Text('mohamamd alnemer ',style: TextStyle(fontSize: 16,color: Colors.white),), + Text('mohamamd alnemer ',style:Theme.of(context).textTheme.bodyLarge ,), ], ) ],