refactoring and ui colorization
This commit is contained in:
parent
29d7378e93
commit
2059193ce7
|
|
@ -19,7 +19,7 @@ extension Code on Languages {
|
|||
}
|
||||
|
||||
class AppColors {
|
||||
static Color sentMessageColor = const Color(0xffDAC439);
|
||||
static Color sentMessageColor = const Color(0xff7986ca);
|
||||
static Color primeColor = const Color(0xff7986ca);
|
||||
static Color tailAuthColor = const Color(0xffFEE64B);
|
||||
static Color textButtonColor = const Color(0xff484848);
|
||||
|
|
@ -56,10 +56,6 @@ class AppColors {
|
|||
// static Color redColor = const Color(0xffFF8078);
|
||||
}
|
||||
|
||||
class AppAssets {
|
||||
static String logo = "assets/images/logo.png";
|
||||
}
|
||||
|
||||
class AppFont {
|
||||
static String bold = 'bold';
|
||||
static String regular = 'regular';
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class RxViewer extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/animations/Wifi Lottie.json',
|
||||
'assets/animations/Wifi.json',
|
||||
repeat: false,
|
||||
width: 120,
|
||||
).paddingAll(5),
|
||||
|
|
|
|||
|
|
@ -45,8 +45,7 @@ class Request {
|
|||
this.method, {
|
||||
this.authorized = false,
|
||||
this.removeMockMatch = false,
|
||||
this.isFormData =
|
||||
false, // TODO: formData should be handled in different way.
|
||||
this.isFormData = false,
|
||||
this.headers,
|
||||
this.cacheable = false,
|
||||
this.body,
|
||||
|
|
@ -91,7 +90,6 @@ class Request {
|
|||
);
|
||||
|
||||
if (response.statusCode! >= 200 && response.statusCode! < 300) {
|
||||
//TODO: this should be handled in different way.
|
||||
if (response.data is String) return json.decode(response.data);
|
||||
if (method == RequestMethod.get && cacheable) {
|
||||
await CacheService.cacheRequest(
|
||||
|
|
@ -100,30 +98,31 @@ class Request {
|
|||
|
||||
return response.data;
|
||||
}
|
||||
} on DioError catch (error) {
|
||||
} on DioException catch (error) {
|
||||
// handling http status code exceptions
|
||||
if (error.type == DioErrorType.badResponse) {
|
||||
if (error.type == DioExceptionType.badResponse) {
|
||||
// handling bad requests.
|
||||
if (error.response!.statusCode == 400) {
|
||||
// this line is really depends on what server responds, and how it reply with errors.
|
||||
throw badRequestException[error.response!.data["error"]] ??
|
||||
GenericException(
|
||||
type: ExceptionType.Other,
|
||||
type: ExceptionType.other,
|
||||
);
|
||||
}
|
||||
|
||||
// handling other status codes.
|
||||
throw statusCodesException[error.response!.statusCode] ??
|
||||
GenericException(
|
||||
type: ExceptionType.Other,
|
||||
type: ExceptionType.other,
|
||||
);
|
||||
}
|
||||
|
||||
// handling connection problems.
|
||||
if (error.type == DioErrorType.connectionTimeout ||
|
||||
error.type == DioErrorType.sendTimeout ||
|
||||
error.type == DioErrorType.receiveTimeout ||
|
||||
error.type == DioErrorType.unknown) {
|
||||
if (error.type == DioExceptionType.connectionError ||
|
||||
error.type == DioExceptionType.connectionTimeout ||
|
||||
error.type == DioExceptionType.sendTimeout ||
|
||||
error.type == DioExceptionType.receiveTimeout ||
|
||||
error.type == DioExceptionType.unknown) {
|
||||
if (method == RequestMethod.get && cacheable) {
|
||||
onConnectionError?.call(error);
|
||||
Map<String, dynamic>? lastResponse =
|
||||
|
|
@ -133,7 +132,7 @@ class Request {
|
|||
}
|
||||
}
|
||||
throw GenericException(
|
||||
type: ExceptionType.ConnectionError,
|
||||
type: ExceptionType.connectionError,
|
||||
errorMessage: "You Have no Internet Connection",
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ extension Converter on Socket {
|
|||
String eventName,
|
||||
dynamic body, {
|
||||
void Function(dynamic)? ack,
|
||||
})
|
||||
func,
|
||||
}) func,
|
||||
) {
|
||||
Completer completer = Completer();
|
||||
|
||||
|
|
@ -26,7 +25,7 @@ extension Converter on Socket {
|
|||
Future.delayed(const Duration(seconds: 2)).then((value) {
|
||||
if (completer.isCompleted) return;
|
||||
completer.completeError(
|
||||
GenericException(type: ExceptionType.ConnectionError));
|
||||
GenericException(type: ExceptionType.connectionError));
|
||||
});
|
||||
|
||||
return completer.future;
|
||||
|
|
@ -48,13 +47,13 @@ extension Converter on Socket {
|
|||
onConnectError((data) {
|
||||
if (completer.isCompleted) return;
|
||||
completer
|
||||
.completeError(GenericException(type: ExceptionType.ConnectionError));
|
||||
.completeError(GenericException(type: ExceptionType.connectionError));
|
||||
});
|
||||
|
||||
onConnectTimeout((data) {
|
||||
if (completer.isCompleted) return;
|
||||
completer
|
||||
.completeError(GenericException(type: ExceptionType.ConnectionError));
|
||||
.completeError(GenericException(type: ExceptionType.connectionError));
|
||||
});
|
||||
|
||||
return completer.future;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class SocketIO {
|
|||
onTimeout: () {
|
||||
onError?.call();
|
||||
throw GenericException(
|
||||
type: ExceptionType.ConnectionError,
|
||||
type: ExceptionType.connectionError,
|
||||
errorMessage: "You Have no Internet Connection",
|
||||
);
|
||||
});
|
||||
|
|
@ -121,7 +121,7 @@ class SocketIO {
|
|||
throw badRequestException[
|
||||
ack["error"]["name"] ?? "INTERNAL_SERVER_ERROR"] ??
|
||||
GenericException(
|
||||
type: ExceptionType.InternalServerException,
|
||||
type: ExceptionType.internalServerException,
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
@ -129,7 +129,7 @@ class SocketIO {
|
|||
rethrow;
|
||||
}
|
||||
throw GenericException(
|
||||
type: ExceptionType.InternalServerException,
|
||||
type: ExceptionType.internalServerException,
|
||||
);
|
||||
}
|
||||
return ack["data"];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:taafee_mobile/common/const/const.dart';
|
||||
|
|
@ -20,7 +21,10 @@ class AboutUsScreen extends StatelessWidget {
|
|||
HeaderScreen("about_us".tr)
|
||||
.paddingOnly(top: 20, bottom: 80)
|
||||
.paddingSymmetric(horizontal: 30),
|
||||
Image.asset("assets/images/logo.png"),
|
||||
SizedBox(
|
||||
width: 168,
|
||||
height: 168,
|
||||
child: SvgPicture.asset("assets/icons/tafee icon.svg")),
|
||||
MediumTextWidget(
|
||||
Params.aboutUs,
|
||||
fontSize: Responsive.isTablet() ? 24 : null,
|
||||
|
|
|
|||
|
|
@ -579,7 +579,7 @@ showMessageDialog(String message) {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/animations/Add Successfuly.json',
|
||||
'assets/animations/Add Success.json',
|
||||
repeat: false,
|
||||
),
|
||||
MediumTextWidget(
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ class CardController extends GetxController {
|
|||
List<String> cardNetworkImagesUrls = <String>[].obs;
|
||||
void updateCardNetworkImageUrls(List<CardImages> cardImages) {
|
||||
cardNetworkImagesUrls.clear();
|
||||
// ignore: avoid_function_literals_in_foreach_calls
|
||||
cardImages.forEach((element) {
|
||||
cardNetworkImagesUrls.add(Domain.domain + element.url.substring(6));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import 'package:smooth_page_indicator/smooth_page_indicator.dart';
|
|||
|
||||
import '../../../../core/local_storage/local_storage.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class ImagesGalleryView extends StatelessWidget {
|
||||
ImagesGalleryView({super.key});
|
||||
final Key galleryViewKey = const Key('gallery');
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import '../../../../common/widgets/button.dart';
|
|||
import '../../../../common/widgets/text.dart';
|
||||
import '../../../../core/routing/routing_manager.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class FavoriteWidget extends StatelessWidget {
|
||||
final CardController cardController = Get.find<CardController>();
|
||||
final FavoriteController favoriteController = Get.find<FavoriteController>();
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class CategoryDetailsScreen extends StatelessWidget {
|
|||
: Column(
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/animations/Folder Lottie.json',
|
||||
'assets/animations/folder.json',
|
||||
repeat: false,
|
||||
).paddingAll(40),
|
||||
RegularTextWidget(
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import 'package:taafee_mobile/features/chat/data_layer/model/chat_user.dart';
|
|||
import 'package:taafee_mobile/features/chat/data_layer/model/room.dart';
|
||||
import 'package:taafee_mobile/features/chat/data_layer/service/chat_resource.dart'
|
||||
as resource;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
// import 'package:path_provider/path_provider.dart';
|
||||
import 'package:rx_future/rx_future.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import '../../../core/errors/custom_exception.dart';
|
||||
|
|
@ -88,7 +88,7 @@ class ChatController extends GetxController {
|
|||
});
|
||||
connectionState.refresh();
|
||||
throw GenericException(
|
||||
type: ExceptionType.ConnectionError,
|
||||
type: ExceptionType.connectionError,
|
||||
errorMessage: "You Have no Internet Connection",
|
||||
);
|
||||
});
|
||||
|
|
@ -685,8 +685,7 @@ class ChatController extends GetxController {
|
|||
|
||||
Future record() async {
|
||||
if (!isRecordReady) return;
|
||||
Directory tempDir = await getTemporaryDirectory();
|
||||
DateTime date = DateTime.now();
|
||||
|
||||
await voiceRecorder.startRecorder(
|
||||
toFile: '${Utils.randomString(5)}${Random().nextInt(100000)}');
|
||||
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ class ChatUser {
|
|||
avatar: jsonMap['avatar'],
|
||||
);
|
||||
//this didn't work because default parameter value must be cosnt and factory cannot be const
|
||||
factory ChatUser.zero() => ChatUser(id: 0, name: '');
|
||||
factory ChatUser.zero() => const ChatUser(id: 0, name: '');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class MessageModel {
|
|||
factory MessageModel.zero() => MessageModel(
|
||||
content: "",
|
||||
createdAt: DateTime.now(),
|
||||
user: ChatUser(id: 0, name: 'name'),
|
||||
user: const ChatUser(id: 0, name: 'name'),
|
||||
userId: 0,
|
||||
roomId: 0,
|
||||
//sender: const ChatUser(id: '0', name: '')
|
||||
|
|
@ -77,7 +77,7 @@ class MessageModel {
|
|||
? ChatUser.fromJson(jsonMap['User'])
|
||||
: ((jsonMap['user'] != null)
|
||||
? ChatUser.fromJson(jsonMap['user'])
|
||||
: ChatUser(id: 0, name: 'name')),
|
||||
: const ChatUser(id: 0, name: 'name')),
|
||||
createdAt: DateTime.parse(jsonMap['createdAt']).toLocal(),
|
||||
updatedAt: (jsonMap['updatedAt'] != null)
|
||||
? DateTime.parse(jsonMap['updatedAt']).toLocal()
|
||||
|
|
@ -93,6 +93,7 @@ class MessageModel {
|
|||
static List<Map<String, dynamic>> toJsonList(
|
||||
List<MessageModel> messagesList) {
|
||||
List<Map<String, dynamic>> jsonList = [];
|
||||
// ignore: avoid_function_literals_in_foreach_calls
|
||||
messagesList.forEach((element) {
|
||||
jsonList.add(element.toJson());
|
||||
});
|
||||
|
|
@ -101,6 +102,7 @@ class MessageModel {
|
|||
|
||||
static List<MessageModel> fromJsonList(List jsonList) {
|
||||
List<MessageModel> messages = [];
|
||||
// ignore: avoid_function_literals_in_foreach_calls
|
||||
jsonList.forEach((element) {
|
||||
messages.add(MessageModel.fromJson(element));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ class Room {
|
|||
);
|
||||
static List<Room> fromJsonList(List jsonList) {
|
||||
List<Room> rooms = [];
|
||||
// ignore: avoid_function_literals_in_foreach_calls
|
||||
jsonList.forEach((element) {
|
||||
if (element["type"] == "private") {
|
||||
rooms.add(Room.fromJson(element));
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import 'package:taafee_mobile/core/local_storage/local_storage.dart';
|
|||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
class ChatFilesSource {
|
||||
Dio _dio = Dio(BaseOptions(
|
||||
final Dio _dio = Dio(BaseOptions(
|
||||
baseUrl: 'https://pages-chat-dev.octa-apps.com/',
|
||||
headers: {
|
||||
"Authorization": LocalStorage().getChatToken(),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:taafee_mobile/core/network/socket/event.dart';
|
||||
import 'package:taafee_mobile/core/network/socket/events.dart';
|
||||
|
|
@ -27,10 +29,10 @@ class ChatResource {
|
|||
"peer": {"id": id}
|
||||
}),
|
||||
reciveDataOnError: true);
|
||||
print('my ack is $ack');
|
||||
log('my ack is $ack');
|
||||
if (ack['error'] != null &&
|
||||
ack['error']['msg'] == 'The resource already exists') {
|
||||
print(ack['error']['justification'].toString().substring(51, 53));
|
||||
log(ack['error']['justification'].toString().substring(51, 53));
|
||||
int roomId = ack['error']['meta']['roomId'];
|
||||
return Room(
|
||||
id: roomId,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import 'package:taafee_mobile/features/home/presentation_layer/widgets/search_ba
|
|||
import '../../../../common/widgets/loader.dart';
|
||||
import '../../../../core/utils/utils.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class ChatScreen extends StatelessWidget {
|
||||
ChatScreen({super.key});
|
||||
final ChatController chatController = Get.find<ChatController>();
|
||||
|
|
@ -32,7 +33,6 @@ class ChatScreen extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
});
|
||||
int today = DateTime.now().day;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.backGroundColor,
|
||||
|
|
@ -44,7 +44,7 @@ class ChatScreen extends StatelessWidget {
|
|||
},
|
||||
child: SingleChildScrollView(
|
||||
controller: scrollController,
|
||||
physics: BouncingScrollPhysics(),
|
||||
physics: const BouncingScrollPhysics(),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
|
@ -86,7 +86,7 @@ class ChatScreen extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/animations/Wifi Lottie.json',
|
||||
'assets/animations/Wifi.json',
|
||||
repeat: false,
|
||||
width: 120,
|
||||
).paddingAll(5).paddingOnly(top: 80),
|
||||
|
|
@ -113,7 +113,7 @@ class ChatScreen extends StatelessWidget {
|
|||
return Column(
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/animations/Folder Lottie.json',
|
||||
'assets/animations/folder.json',
|
||||
repeat: false,
|
||||
),
|
||||
if (searchFieldController.text == '')
|
||||
|
|
@ -184,7 +184,7 @@ class ChatScreen extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/animations/Wifi Lottie.json',
|
||||
'assets/animations/Wifi.json',
|
||||
repeat: false,
|
||||
width: 120,
|
||||
).paddingAll(5).paddingOnly(top: 80),
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import '../../../../common/widgets/toast.dart';
|
|||
import '../../data_layer/model/room.dart';
|
||||
import '../widgets/message_widget.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class ChatDetails extends StatelessWidget {
|
||||
ChatDetails({super.key});
|
||||
|
||||
|
|
@ -58,7 +59,7 @@ class ChatDetails extends StatelessWidget {
|
|||
|
||||
void checkTablet() {
|
||||
if (Responsive.isTablet()) {
|
||||
Future.delayed(Duration(seconds: 2), () {
|
||||
Future.delayed(const Duration(seconds: 2), () {
|
||||
chatController.getCurrentRoomMessages();
|
||||
});
|
||||
}
|
||||
|
|
@ -90,7 +91,7 @@ class ChatDetails extends StatelessWidget {
|
|||
),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
|
@ -357,14 +358,14 @@ class ChatDetails extends StatelessWidget {
|
|||
visible: (chatController.currentRoom.value!.state !=
|
||||
RoomState.active),
|
||||
child: Material(
|
||||
borderRadius: BorderRadius.only(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
elevation: 15,
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
|
|
@ -409,8 +410,7 @@ class ChatDetails extends StatelessWidget {
|
|||
child: SizedBox(
|
||||
width: 160,
|
||||
height: 160,
|
||||
child: Lottie.asset(
|
||||
'assets/animations/Wifi Lottie.json')))
|
||||
child: Lottie.asset('assets/animations/Wifi.json')))
|
||||
.align(alignment: Alignment.center);
|
||||
}),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import 'package:taafee_mobile/features/home/business_logic_layer/home_controller
|
|||
import '../../business logic layer/chat_controller.dart';
|
||||
import '../../data_layer/model/room.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class AppBarChatWidget extends StatelessWidget implements PreferredSizeWidget {
|
||||
@override
|
||||
Size get preferredSize => const Size.fromHeight(100);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import '../../../../common/const/const.dart';
|
|||
import '../../../../core/utils/utils.dart';
|
||||
import '../../data_layer/model/message.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class ChatFooterWidget extends StatelessWidget {
|
||||
final TextEditingController textController = TextEditingController();
|
||||
final ChatController chatController = Get.find<ChatController>();
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class MessageWidget extends StatelessWidget {
|
|||
chatController.uploadFileState.loading))
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: SizedBox(
|
||||
child: const SizedBox(
|
||||
width: 12,
|
||||
height: 12,
|
||||
child: CircularProgressIndicator(
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import 'package:taafee_mobile/features/home/business_logic_layer/home_controller
|
|||
import '../../../../common/const/const.dart';
|
||||
import '../../../../common/widgets/text.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class RepliedMessage extends StatelessWidget {
|
||||
RepliedMessage({
|
||||
super.key,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class FavoriteScreen extends StatelessWidget {
|
|||
width: 128,
|
||||
height: 128,
|
||||
child: Lottie.asset(
|
||||
'assets/animations/No Favorites.json',
|
||||
'assets/animations/NO Favorite.json',
|
||||
repeat: false,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class FavoriteCardWidget extends StatelessWidget {
|
|||
children: [
|
||||
SvgPicture.asset("assets/icons/love-svgrepo-com 2.svg"),
|
||||
MediumTextWidget(
|
||||
" ${favoriteModel.cardModel.user.firstName + ' ' + favoriteModel.cardModel.user.lastName}"),
|
||||
" ${'${favoriteModel.cardModel.user.firstName} ${favoriteModel.cardModel.user.lastName}'}"),
|
||||
],
|
||||
).paddingSymmetric(horizontal: 10),
|
||||
const SizedBox(
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import 'package:taafee_mobile/common/widgets/toast.dart';
|
|||
import 'package:taafee_mobile/core/routing/routing_manager.dart';
|
||||
import 'package:taafee_mobile/features/auth/business_logic_layer/auth_controller.dart';
|
||||
import 'package:taafee_mobile/features/card/business_logic_layer/card_controller.dart';
|
||||
import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart';
|
||||
import 'package:taafee_mobile/features/card/data_layer/source/card_service.dart';
|
||||
// import 'package:taafee_mobile/features/card/data_layer/model/card_model.dart';
|
||||
// import 'package:taafee_mobile/features/card/data_layer/source/card_service.dart';
|
||||
import 'package:taafee_mobile/features/card/presentation_layer/widgets/card.dart';
|
||||
import 'package:taafee_mobile/features/card/presentation_layer/widgets/random_card_widget.dart';
|
||||
import 'package:taafee_mobile/features/category/business_logic_layer/category_controller.dart';
|
||||
|
|
@ -23,6 +23,7 @@ import 'package:taafee_mobile/features/chat/business%20logic%20layer/chat_contro
|
|||
import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart';
|
||||
import 'package:taafee_mobile/features/home/presentation_layer/widgets/appbar.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class HomeScreen extends StatelessWidget {
|
||||
final HomeController homeController = Get.find<HomeController>();
|
||||
final CategoryController categoryController = Get.find<CategoryController>();
|
||||
|
|
@ -159,7 +160,7 @@ class HomeScreen extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Lottie.asset(
|
||||
'assets/animations/Wifi Lottie.json',
|
||||
'assets/animations/Wifi.json',
|
||||
repeat: false,
|
||||
width: 120,
|
||||
).paddingAll(5),
|
||||
|
|
@ -241,7 +242,7 @@ class HomeScreen extends StatelessWidget {
|
|||
height: Get.height * 0.08,
|
||||
),
|
||||
Lottie.asset(
|
||||
'assets/animations/Wifi Lottie.json',
|
||||
'assets/animations/Wifi.json',
|
||||
repeat: false,
|
||||
width: 120,
|
||||
).paddingAll(5),
|
||||
|
|
@ -318,7 +319,7 @@ class HomeScreen extends StatelessWidget {
|
|||
width: 120,
|
||||
height: 120,
|
||||
child: Lottie.asset(
|
||||
'assets/animations/Folder Lottie.json',
|
||||
'assets/animations/folder.json',
|
||||
repeat: false,
|
||||
)),
|
||||
RegularTextWidget(
|
||||
|
|
|
|||
|
|
@ -13,11 +13,10 @@ import 'package:taafee_mobile/features/chat/presentation_layer/screens/chat.dart
|
|||
import 'package:taafee_mobile/features/favorite/business_logic_layer/favorite_controller.dart';
|
||||
import 'package:taafee_mobile/features/favorite/presentation_layer/screens/favorite.dart';
|
||||
import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart';
|
||||
|
||||
import '../../../../common/const/const.dart';
|
||||
import '../../../auth/data_layer/model/user.dart';
|
||||
import '../../../card/data_layer/model/card_model.dart';
|
||||
import '../../../card/data_layer/source/card_service.dart';
|
||||
// import '../../../card/data_layer/model/card_model.dart';
|
||||
// import '../../../card/data_layer/source/card_service.dart';
|
||||
import '../../../chat/business logic layer/chat_controller.dart';
|
||||
import '../../../chat/data_layer/model/room.dart';
|
||||
import 'home.dart';
|
||||
|
|
@ -65,7 +64,7 @@ class SuperHome extends StatelessWidget {
|
|||
}, onSessionTerminated: (value) {
|
||||
Toast.showToast('this_session_is_terminated'.tr);
|
||||
RoutingManager.offAll(RouteName.login);
|
||||
print('session terminated');
|
||||
// print('session terminated');
|
||||
authController.isGuest.update((val) {
|
||||
val = false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,12 +9,11 @@ import 'package:taafee_mobile/core/routing/routing_manager.dart';
|
|||
import 'package:taafee_mobile/features/chat/presentation_layer/widgets/circle_avatar.dart';
|
||||
import 'package:taafee_mobile/features/home/business_logic_layer/home_controller.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class AppBarWidget extends StatelessWidget {
|
||||
final HomeController homeController = Get.find<HomeController>();
|
||||
TextEditingController? textEditingController;
|
||||
@override
|
||||
// TODO: implement preferredSize
|
||||
// Size get preferredSize => const Size.fromHeight(250);
|
||||
AppBarWidget({super.key, this.textEditingController});
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ import 'package:taafee_mobile/core/init/dependency_injection.dart';
|
|||
import 'package:taafee_mobile/core/init/language_init.dart';
|
||||
import 'package:taafee_mobile/core/localization/localization.dart';
|
||||
import 'package:taafee_mobile/core/routing/routing_manager.dart';
|
||||
import 'package:taafee_mobile/features/card/data_layer/source/card_service.dart';
|
||||
import 'common/widgets/notification_message.dart';
|
||||
// import 'package:taafee_mobile/features/card/data_layer/source/card_service.dart';
|
||||
// import 'common/widgets/notification_message.dart';
|
||||
import 'core/local_storage/cache_service.dart';
|
||||
import 'core/local_storage/local_storage.dart';
|
||||
// import 'core/local_storage/local_storage.dart';
|
||||
import 'core/utils/utils.dart';
|
||||
import 'features/card/data_layer/model/card_model.dart';
|
||||
// import 'features/card/data_layer/model/card_model.dart';
|
||||
|
||||
String? fcmToken;
|
||||
void main() async {
|
||||
|
|
@ -24,7 +24,7 @@ void main() async {
|
|||
await GetStorage.init();
|
||||
// await Firebase.initializeApp();
|
||||
// if (LocalStorage().getFCMToken() == null) {
|
||||
// fcmToken = await FirebaseMessaging.instance.getToken();
|
||||
// fcmToken = await FirebaseMessaging.instance.getToken();
|
||||
// if (fcmToken != null) {
|
||||
// LocalStorage().saveFCMToken(fcmToken!);
|
||||
// }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user