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:vmeeting/src/extension/context_extensions.dart';
import '../../service/routes/routes_name.dart';
import '../../src/constants/colors_const.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/image_avatar.dart';
import '../../src/widgets/small_text.dart';
......@@ -39,40 +44,52 @@ class _DrawerMenueState extends State<DrawerMenue> {
Widget buildImageAvatar(BuildContext context) {
return Container(
color: ColorConst.appBackgroundColor,
color: ColorConst.appGreenColor,
width: double.infinity,
child: Column(
children: [
SizedBox(height: context.h * 0.06),
SizedBox(
width: context.w * 0.25,
child: AvatarImage(imagePath: "assets/AloVoice.png",
radius: context.h * 0.055,
),
),
buildImage(context,AppUtils.userModel.avatar ?? ""),
SizedBox(height: context.h * 0.02),
SizedBox(height: context.h * 0.002),
BigText(text: "cld.alovoice.uz", color: ColorConst.appWhiteColor,),
BigText(text: AppUtils.userModel.fullName ?? "",),
SizedBox(height: context.h * 0.008),
BigText(text: AppUtils.userModel.email ?? "",size: context.h*0.017,),
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) {
return Flexible(
child: Column(
children: [
ListTile(
leading: Icon(Icons.settings, color: ColorConst.appBackgroundColor),
title: BigText(text: "",),
leading: Icon(Icons.settings, color: ColorConst.appBleckColor),
title: const BigText(text: "Settings",),
trailing: Icon(Icons.navigate_next,
color: ColorConst.appBackgroundColor,
color: ColorConst.appBleckColor,
size: 30,
),
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> {
child: Padding(
padding: const EdgeInsets.only(right: 8.0, top: 8),
child: Icon(Icons.cancel,
color: ColorConst.appBackgroundColor),
color: ColorConst.appGreenColor),
),
),
],
......@@ -113,10 +130,10 @@ class _DrawerMenueState extends State<DrawerMenue> {
const SizedBox(
height: 4,
),
Padding(
padding: const EdgeInsets.only(left: 20.0, right: 8),
const Padding(
padding: EdgeInsets.only(left: 20.0, right: 8),
child: SmallText(
text: " ",
text: "Are you sure you want logout current user",
size: 16,
fontWidget: FontWeight.w600,
textAlign: TextAlign.center),
......@@ -136,13 +153,13 @@ class _DrawerMenueState extends State<DrawerMenue> {
left: 14, right: 14, top: 8, bottom: 8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: ColorConst.appBackgroundColor),
color: ColorConst.appGreenColor),
child: SmallText(
text: "",
text: "Cancel",
size: 16,
fontWidget: FontWeight.w600,
textAlign: TextAlign.center,
color: ColorConst.appWhiteColor,
color: ColorConst.appBleckColor,
),
),
),
......@@ -156,9 +173,9 @@ class _DrawerMenueState extends State<DrawerMenue> {
left: 14, right: 14, top: 8, bottom: 8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: ColorConst.appWhiteColor),
color: ColorConst.appRedColor),
child: SmallText(
text: "",
text: "OK",
size: 16,
fontWidget: FontWeight.w600,
textAlign: TextAlign.center,
......@@ -179,7 +196,14 @@ class _DrawerMenueState extends State<DrawerMenue> {
);
});
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> {
children: [
SmallText(text: appUsersModel.user?.fullName ?? "",fontWidget: FontWeight.bold,),
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),
SmallText(text: appUsersModel.user?.phone ?? ""),
],
......
......@@ -75,14 +75,14 @@ class _UserSignInPageState extends State<UserSignInPage> {
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Switch.adaptive(
value: isDarkMode,
activeColor: ColorConst.appGreenColor,
onChanged: (value) {
isDarkMode = value;
widget.controller.inputTheme.add(value);
},
),
// Switch.adaptive(
// value: isDarkMode,
// activeColor: ColorConst.appGreenColor,
// onChanged: (value) {
// isDarkMode = value;
// widget.controller.inputTheme.add(value);
// },
// ),
],),
SizedBox(height: context.h * 0.12),
BigText(
......
......@@ -25,13 +25,13 @@ class _UserSignUpPageState extends State<UserSignUpPage> {
late UserSignUpBloc userSignUpBloc;
late bool isDarkMode = false;
final _loginControlle = TextEditingController(text: "Flutter2000");
final _loginControlle = TextEditingController(text: "");
final _loginFocusNode = FocusNode();
final _passwordControlle = TextEditingController(text: "Flutter2000");
final _passwordControlle = TextEditingController(text: "");
final _passwordFocusNode = FocusNode();
final _emailControlle = TextEditingController(text: "muxtorovinomjon0227@gmail.com");
final _emailControlle = TextEditingController(text: "");
final _emailFocusNode = FocusNode();
final _fullNameControlle = TextEditingController(text: "Muxtorov Inomjon");
final _fullNameControlle = TextEditingController(text: "");
final _fullNameFocusNode = FocusNode();
......@@ -79,18 +79,18 @@ class _UserSignUpPageState extends State<UserSignUpPage> {
child: Column(
children: [
SizedBox(height: context.h * 0.06),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Switch.adaptive(
value: isDarkMode,
activeColor: ColorConst.appGreenColor,
onChanged: (value) {
isDarkMode = value;
widget.controller.inputTheme.add(value);
},
),
],),
// Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// Switch.adaptive(
// value: isDarkMode,
// activeColor: ColorConst.appGreenColor,
// onChanged: (value) {
// isDarkMode = value;
// widget.controller.inputTheme.add(value);
// },
// ),
// ],),
SizedBox(height: context.h * 0.1),
BigText(
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