Commit 3b411550 authored by Inomjon's avatar Inomjon

Merge remote-tracking branch 'origin/main'

parents 2a0380f8 48e2f3c4
import 'package:connectycube_sdk/connectycube_chat.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:vmeeting/src/extension/context_extensions.dart'; import 'package:vmeeting/src/extension/context_extensions.dart';
import '../../service/routes/routes_name.dart'; import '../../service/routes/routes_name.dart';
import '../../src/constants/colors_const.dart'; import '../../src/constants/colors_const.dart';
import '../../src/controllers/enter_number_cont.dart'; import '../../src/controllers/enter_number_cont.dart';
import '../../src/managers/call_manager.dart';
import '../../src/managers/push_notifications_manager.dart';
import '../../src/utils/app_utils.dart';
import '../../src/utils/pref_util.dart';
import '../../src/widgets/big_text_widget.dart'; import '../../src/widgets/big_text_widget.dart';
import '../../src/widgets/image_avatar.dart'; import '../../src/widgets/image_avatar.dart';
import '../../src/widgets/small_text.dart'; import '../../src/widgets/small_text.dart';
...@@ -39,40 +44,52 @@ class _DrawerMenueState extends State<DrawerMenue> { ...@@ -39,40 +44,52 @@ class _DrawerMenueState extends State<DrawerMenue> {
Widget buildImageAvatar(BuildContext context) { Widget buildImageAvatar(BuildContext context) {
return Container( return Container(
color: ColorConst.appBackgroundColor, color: ColorConst.appGreenColor,
width: double.infinity, width: double.infinity,
child: Column( child: Column(
children: [ children: [
SizedBox(height: context.h * 0.06), SizedBox(height: context.h * 0.06),
SizedBox( buildImage(context,AppUtils.userModel.avatar ?? ""),
width: context.w * 0.25,
child: AvatarImage(imagePath: "assets/AloVoice.png",
radius: context.h * 0.055,
),
),
SizedBox(height: context.h * 0.02), SizedBox(height: context.h * 0.02),
SizedBox(height: context.h * 0.002), BigText(text: AppUtils.userModel.fullName ?? "",),
BigText(text: "cld.alovoice.uz", color: ColorConst.appWhiteColor,), SizedBox(height: context.h * 0.008),
BigText(text: AppUtils.userModel.email ?? "",size: context.h*0.017,),
SizedBox(height: context.h * 0.02), SizedBox(height: context.h * 0.02),
], ],
), ),
); );
} }
Widget buildImage(BuildContext context, String? imagaAvatar) {
return Center(
child: AvatarImage(
radius: context.h * 0.08,
imagePath: imagaAvatar,
));
}
Widget buildMenueList(BuildContext context) { Widget buildMenueList(BuildContext context) {
return Flexible( return Flexible(
child: Column( child: Column(
children: [ children: [
ListTile( ListTile(
leading: Icon(Icons.settings, color: ColorConst.appBackgroundColor), leading: Icon(Icons.settings, color: ColorConst.appBleckColor),
title: BigText(text: "",), title: const BigText(text: "Settings",),
trailing: Icon(Icons.navigate_next, trailing: Icon(Icons.navigate_next,
color: ColorConst.appBackgroundColor, color: ColorConst.appBleckColor,
size: 30, size: 30,
), ),
onTap: () async { onTap: () async {
}, },
), ),
const Spacer(),
ListTile(
leading: Icon(Icons.login, color: ColorConst.appRedColor),
title: SmallText(text: "Logout",color: ColorConst.appRedColor,),
onTap: () {
logoutApp(context);
},
),
], ],
), ),
); );
...@@ -105,7 +122,7 @@ class _DrawerMenueState extends State<DrawerMenue> { ...@@ -105,7 +122,7 @@ class _DrawerMenueState extends State<DrawerMenue> {
child: Padding( child: Padding(
padding: const EdgeInsets.only(right: 8.0, top: 8), padding: const EdgeInsets.only(right: 8.0, top: 8),
child: Icon(Icons.cancel, child: Icon(Icons.cancel,
color: ColorConst.appBackgroundColor), color: ColorConst.appGreenColor),
), ),
), ),
], ],
...@@ -113,10 +130,10 @@ class _DrawerMenueState extends State<DrawerMenue> { ...@@ -113,10 +130,10 @@ class _DrawerMenueState extends State<DrawerMenue> {
const SizedBox( const SizedBox(
height: 4, height: 4,
), ),
Padding( const Padding(
padding: const EdgeInsets.only(left: 20.0, right: 8), padding: EdgeInsets.only(left: 20.0, right: 8),
child: SmallText( child: SmallText(
text: " ", text: "Are you sure you want logout current user",
size: 16, size: 16,
fontWidget: FontWeight.w600, fontWidget: FontWeight.w600,
textAlign: TextAlign.center), textAlign: TextAlign.center),
...@@ -136,13 +153,13 @@ class _DrawerMenueState extends State<DrawerMenue> { ...@@ -136,13 +153,13 @@ class _DrawerMenueState extends State<DrawerMenue> {
left: 14, right: 14, top: 8, bottom: 8), left: 14, right: 14, top: 8, bottom: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
color: ColorConst.appBackgroundColor), color: ColorConst.appGreenColor),
child: SmallText( child: SmallText(
text: "", text: "Cancel",
size: 16, size: 16,
fontWidget: FontWeight.w600, fontWidget: FontWeight.w600,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: ColorConst.appWhiteColor, color: ColorConst.appBleckColor,
), ),
), ),
), ),
...@@ -156,9 +173,9 @@ class _DrawerMenueState extends State<DrawerMenue> { ...@@ -156,9 +173,9 @@ class _DrawerMenueState extends State<DrawerMenue> {
left: 14, right: 14, top: 8, bottom: 8), left: 14, right: 14, top: 8, bottom: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
color: ColorConst.appWhiteColor), color: ColorConst.appRedColor),
child: SmallText( child: SmallText(
text: "", text: "OK",
size: 16, size: 16,
fontWidget: FontWeight.w600, fontWidget: FontWeight.w600,
textAlign: TextAlign.center, textAlign: TextAlign.center,
...@@ -179,7 +196,14 @@ class _DrawerMenueState extends State<DrawerMenue> { ...@@ -179,7 +196,14 @@ class _DrawerMenueState extends State<DrawerMenue> {
); );
}); });
if (result ?? false) { if (result ?? false) {
Navigator.of(context).pushNamedAndRemoveUntil(MainRoutes.sign_in_page,(Route<dynamic> route) => false); CallManager.instance.destroy();
CubeChatConnection.instance.destroy();
await PushNotificationsManager.instance.unsubscribe();
await SharedPrefs.deleteUserData();
await signOut();
// ignore: use_build_context_synchronously
Navigator.pushReplacementNamed(context, MainRoutes.sign_in_page);
} }
} }
......
...@@ -155,7 +155,7 @@ class _HomePageState extends State<HomePage> { ...@@ -155,7 +155,7 @@ class _HomePageState extends State<HomePage> {
children: [ children: [
SmallText(text: appUsersModel.user?.fullName ?? "",fontWidget: FontWeight.bold,), SmallText(text: appUsersModel.user?.fullName ?? "",fontWidget: FontWeight.bold,),
SizedBox(height: context.h*0.005), SizedBox(height: context.h*0.005),
SmallText(text: appUsersModel.user?.email ?? "", size: context.h*0.02), SmallText(text: appUsersModel.user?.email ?? "", size: context.h*0.015),
SizedBox(height: context.h*0.005), SizedBox(height: context.h*0.005),
SmallText(text: appUsersModel.user?.phone ?? ""), SmallText(text: appUsersModel.user?.phone ?? ""),
], ],
......
...@@ -75,14 +75,14 @@ class _UserSignInPageState extends State<UserSignInPage> { ...@@ -75,14 +75,14 @@ class _UserSignInPageState extends State<UserSignInPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
Switch.adaptive( // Switch.adaptive(
value: isDarkMode, // value: isDarkMode,
activeColor: ColorConst.appGreenColor, // activeColor: ColorConst.appGreenColor,
onChanged: (value) { // onChanged: (value) {
isDarkMode = value; // isDarkMode = value;
widget.controller.inputTheme.add(value); // widget.controller.inputTheme.add(value);
}, // },
), // ),
],), ],),
SizedBox(height: context.h * 0.12), SizedBox(height: context.h * 0.12),
BigText( BigText(
......
...@@ -25,13 +25,13 @@ class _UserSignUpPageState extends State<UserSignUpPage> { ...@@ -25,13 +25,13 @@ class _UserSignUpPageState extends State<UserSignUpPage> {
late UserSignUpBloc userSignUpBloc; late UserSignUpBloc userSignUpBloc;
late bool isDarkMode = false; late bool isDarkMode = false;
final _loginControlle = TextEditingController(text: "Flutter2000"); final _loginControlle = TextEditingController(text: "");
final _loginFocusNode = FocusNode(); final _loginFocusNode = FocusNode();
final _passwordControlle = TextEditingController(text: "Flutter2000"); final _passwordControlle = TextEditingController(text: "");
final _passwordFocusNode = FocusNode(); final _passwordFocusNode = FocusNode();
final _emailControlle = TextEditingController(text: "muxtorovinomjon0227@gmail.com"); final _emailControlle = TextEditingController(text: "");
final _emailFocusNode = FocusNode(); final _emailFocusNode = FocusNode();
final _fullNameControlle = TextEditingController(text: "Muxtorov Inomjon"); final _fullNameControlle = TextEditingController(text: "");
final _fullNameFocusNode = FocusNode(); final _fullNameFocusNode = FocusNode();
...@@ -79,18 +79,18 @@ class _UserSignUpPageState extends State<UserSignUpPage> { ...@@ -79,18 +79,18 @@ class _UserSignUpPageState extends State<UserSignUpPage> {
child: Column( child: Column(
children: [ children: [
SizedBox(height: context.h * 0.06), SizedBox(height: context.h * 0.06),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.end, // mainAxisAlignment: MainAxisAlignment.end,
children: [ // children: [
Switch.adaptive( // Switch.adaptive(
value: isDarkMode, // value: isDarkMode,
activeColor: ColorConst.appGreenColor, // activeColor: ColorConst.appGreenColor,
onChanged: (value) { // onChanged: (value) {
isDarkMode = value; // isDarkMode = value;
widget.controller.inputTheme.add(value); // widget.controller.inputTheme.add(value);
}, // },
), // ),
],), // ],),
SizedBox(height: context.h * 0.1), SizedBox(height: context.h * 0.1),
BigText( BigText(
text: "Sign Up", text: "Sign Up",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment