mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
auth changes
This commit is contained in:
@ -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<void> 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(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -127,7 +127,7 @@ class LoginMobilePage extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
"Country/Region",
|
||||
style: smallTextStyle,
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
SizedBox(
|
||||
child: DropdownButtonFormField<String>(
|
||||
@ -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,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -26,7 +26,6 @@ class _LoginWebPageState extends State<LoginWebPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Scaffold(
|
||||
body: BlocProvider(
|
||||
create: (BuildContext context) => AuthBloc(),
|
||||
@ -119,13 +118,9 @@ class _LoginWebPageState extends State<LoginWebPage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
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<LoginWebPage> {
|
||||
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<LoginWebPage> {
|
||||
child: Text(region),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (String? value) {
|
||||
print(value);
|
||||
},
|
||||
onChanged: (String? value) {},
|
||||
),
|
||||
)
|
||||
],
|
||||
@ -177,7 +170,7 @@ class _LoginWebPageState extends State<LoginWebPage> {
|
||||
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<LoginWebPage> {
|
||||
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<LoginWebPage> {
|
||||
},
|
||||
child: Text(
|
||||
"Forgot Password?",
|
||||
style: smallTextStyle,
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -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
|
||||
|
@ -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)));
|
@ -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 ,),
|
||||
],
|
||||
)
|
||||
],
|
||||
|
Reference in New Issue
Block a user