From f9b64cdb99db0b3b908c2794e8968860b87a8b32 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Thu, 7 Oct 2021 17:57:48 +0100 Subject: [PATCH 01/20] Conflicts resolved --- lib/app/app.router.dart | 14 +- lib/models/user_model.dart | 4 +- lib/services/user_service.dart | 17 + lib/ui/nav_pages/home_page/home_page.dart | 1 + .../home_page/home_page_viewmodel.dart | 13 + .../you_page/you_page_viewmodel.dart | 8 +- .../custom_user_bottom_sheet_view.dart | 22 +- .../custom_user_bottom_sheet_viewmodel.dart | 40 +- .../widgets/profile_head.dart | 9 +- .../view/edit_profile/edit_profile_view.dart | 15 +- .../edit_profile/edit_profile_viewmodel.dart | 49 ++ .../widget/edit_profile_body.dart | 37 +- test/helpers/test_helpers.mocks.dart | 692 ++++++++---------- 13 files changed, 502 insertions(+), 419 deletions(-) diff --git a/lib/app/app.router.dart b/lib/app/app.router.dart index 1fab3953d..8c0947701 100644 --- a/lib/app/app.router.dart +++ b/lib/app/app.router.dart @@ -11,6 +11,7 @@ import 'package:stacked/stacked.dart'; import '../models/channel_members.dart'; import '../models/channel_model.dart'; +import '../models/user_model.dart'; import '../models/user_post.dart'; import '../ui/nav_pages/home_page/home_page.dart'; import '../ui/view/add_people/add_people_view.dart'; @@ -466,8 +467,12 @@ class StackedRouter extends RouterBase { ); }, EditProfileView: (data) { + var args = data.getArgs(nullOk: false); return MaterialPageRoute( - builder: (context) => const EditProfileView(), + builder: (context) => EditProfileView( + key: args.key, + user: args.user, + ), settings: data, ); }, @@ -703,6 +708,13 @@ class AddPluginViewArguments { AddPluginViewArguments({this.key}); } +/// EditProfileView arguments holder class +class EditProfileViewArguments { + final Key? key; + final UserModel user; + EditProfileViewArguments({this.key, required this.user}); +} + /// SelectEmail arguments holder class class SelectEmailArguments { final Key? key; diff --git a/lib/models/user_model.dart b/lib/models/user_model.dart index 905cf3115..dfbf3fd0b 100644 --- a/lib/models/user_model.dart +++ b/lib/models/user_model.dart @@ -5,7 +5,7 @@ class UserModel { String? displayName; String? email; String? phoneNumber; - int? status; + String? status; String? timezone; String? createdAt; String? updatedAt; @@ -23,6 +23,8 @@ class UserModel { this.updatedAt, }); + String? get fullName => '$firstName $lastName'; + Map toMap() { return { 'id': userId, diff --git a/lib/services/user_service.dart b/lib/services/user_service.dart index ba13623ef..0a6e73397 100644 --- a/lib/services/user_service.dart +++ b/lib/services/user_service.dart @@ -1,4 +1,8 @@ //On login or signup the user service is used to save all the user details +import 'dart:convert'; + +import 'package:hng/models/user_model.dart'; + import '../app/app.locator.dart'; import '../models/organization_model.dart'; import 'local_storage_services.dart'; @@ -42,6 +46,11 @@ class UserService { return _currentOrgUrl; } + void setUserDetails(UserModel user) { + final val = jsonEncode(user.toMap()); + _sharedPrefs.setString(StorageKeys.currentUserModel, val); + } + void setOrganization() { // TODO implement Organization setter } @@ -72,6 +81,14 @@ class UserService { return _userEmail; } + UserModel? get userDetails { + final res = _sharedPrefs.getString(StorageKeys.currentUserModel); + if (res == null) { + return null; + } + return UserModel.fromMap(jsonDecode(res)); + } + void setUserAndToken({ required String? authToken, required String? userId, diff --git a/lib/ui/nav_pages/home_page/home_page.dart b/lib/ui/nav_pages/home_page/home_page.dart index 08617a5dd..6debfba36 100644 --- a/lib/ui/nav_pages/home_page/home_page.dart +++ b/lib/ui/nav_pages/home_page/home_page.dart @@ -20,6 +20,7 @@ class HomePage extends StatelessWidget { model.getDmAndChannelsList(); model.getNewChannelStream(); model.listenToNotificationTap(); + model.fetchUserDetails(); }, viewModelBuilder: () => HomePageViewModel(), builder: (context, vmodel, child) => Scaffold( diff --git a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart index ff2b6f795..21438fd34 100644 --- a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart +++ b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart @@ -5,6 +5,7 @@ import 'package:hng/app/app.router.dart'; import 'package:hng/constants/app_strings.dart'; import 'package:hng/models/channel_members.dart'; import 'package:hng/models/channel_model.dart'; +import 'package:hng/models/user_model.dart'; import 'package:hng/package/base/server-request/api/zuri_api.dart'; import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; @@ -58,6 +59,7 @@ class HomePageViewModel extends StreamViewModel { String get orgName => userService.currentOrgName; String get orgId => userService.currentOrgId; + String get email => userService.userEmail; StreamSubscription? notificationSub; @@ -184,6 +186,17 @@ class HomePageViewModel extends StreamViewModel { _centrifugeService.subscribe(channelSockId); } + void fetchUserDetails() async { + try { + final response = await zuriApi.get('organizations/$orgId/members', + queryParameters: {'query': email}, token: token); + final _userModel = + UserModel.fromJson((response!.data['data'] as List).first); + userService.setUserDetails(_userModel); + } catch (e) { + log.e(e.toString()); + } + } // listenToChannelsChange() { // _channelsApiService.onChange.stream.listen((event) { // getDmAndChannelsList(); diff --git a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart index f414ec1b2..991eb4a50 100644 --- a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart +++ b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart @@ -1,4 +1,5 @@ import 'package:hng/constants/app_strings.dart'; +import 'package:hng/services/user_service.dart'; import 'package:hng/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -11,8 +12,9 @@ class YouPageViewModel extends BaseViewModel { final log = getLogger('YouPageViewModel'); final _navigationService = locator(); final _bottomSheetService = locator(); + final _userService = locator(); - String username = PaulEke; + String get username => _userService.userDetails?.displayName ?? PaulEke; String profileImage = ZuriAppbarLogo; String currentStatus = Active; String otherStatus = Away; @@ -42,14 +44,14 @@ class YouPageViewModel extends BaseViewModel { await _navigationService.navigateTo(Routes.savedItemsView); } - Future viewProfile() async { + Future viewProfile() async { var sheetResponse = await _bottomSheetService.showCustomSheet( variant: BottomSheetType.user, isScrollControlled: true, - ); log.i('confirmationResponse confirmed: ${sheetResponse?.confirmed}'); + notifyListeners(); } Future viewNotifications() async { diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart index 66d9f8a02..a2c7750e0 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart @@ -64,8 +64,10 @@ class CustomUserBottomSheetView extends StatelessWidget { const CustomProfileTile( title: Track, subtitle: MobileDev), const Divider(), - const CustomProfileTile( - title: DisplayName, subtitle: PaulEke), + CustomProfileTile( + title: DisplayName, + subtitle: model.userModel!.displayName ?? '', + ), const Divider(), ListTile( title: const CustomText( @@ -80,14 +82,20 @@ class CustomUserBottomSheetView extends StatelessWidget { ), onTap: () => model.navigateToSetStatus(), trailing: IconButton( - onPressed: () {}, icon: const Icon(Icons.cancel)), + onPressed: () {}, + icon: const Icon(Icons.cancel), + ), ), const Divider(), - const CustomProfileTile( - title: Number, subtitle: sampleNumber), + CustomProfileTile( + title: Number, + subtitle: model.userModel!.phoneNumber ?? '', + ), const Divider(), - const CustomProfileTile( - title: EmailAddress, subtitle: EmailPlaceholder), + CustomProfileTile( + title: EmailAddress, + subtitle: model.userModel!.email!, + ), ], ), ), diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart index 34c0ab5b3..605dbdac6 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart @@ -1,35 +1,47 @@ import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.logger.dart'; import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/start_dm_models.dart'; +import 'package:hng/models/user_model.dart'; import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/services/user_service.dart'; import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; class CustomUserBottomSheetViewModel extends FutureViewModel { + final _log = getLogger('CustomUserBottomSheetViewModel'); final _navigationService = locator(); - static final _storage = locator(); - final zuriApi = ZuriApi(coreBaseUrl); + final _userService = locator(); + final _zuriApi = ZuriApi(coreBaseUrl); UserModel? _userModel; void navigateToSetStatus() => _navigationService.navigateTo(Routes.setStatusView); - void navigateToEditProfile() => - _navigationService.navigateTo(Routes.editProfileView); - - final String? userID = _storage.getString(StorageKeys.currentUserId); - final String? token = _storage.getString(StorageKeys.currentSessionToken); + void navigateToEditProfile() async { + await _navigationService.navigateTo( + Routes.editProfileView, + arguments: EditProfileViewArguments(user: userModel!), + ); + notifyListeners(); + } @override Future futureToRun() async { - final response = await zuriApi.get('$userDataEndpoint', token: token); - _userModel = UserModel.fromJson(response!.data['data']); + try { + final response = await _zuriApi.get('organizations/$orgId/members', + queryParameters: {'query': email}, token: token); + _userModel = UserModel.fromJson((response!.data['data'] as List).first); + _userService.setUserDetails(_userModel!); + } catch (e) { + _log.e(e.toString()); + } } - UserModel? get userModel => _userModel; + String? get userID => _userService.userId; + String? get token => _userService.authToken; + String? get orgId => _userService.currentOrgId; + String? get email => _userService.userEmail; + UserModel? get userModel => _userService.userDetails; } diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart index 49dd38540..93ea35fec 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart @@ -2,12 +2,15 @@ import 'package:flutter/material.dart'; import 'package:hng/constants/app_strings.dart'; import 'package:hng/general_widgets/custom_text.dart'; import 'package:hng/ui/shared/colors.dart'; +import 'package:stacked/stacked.dart'; -class ProfileHead extends StatelessWidget { +import '../custom_user_bottom_sheet_viewmodel.dart'; + +class ProfileHead extends ViewModelWidget { const ProfileHead({Key? key}) : super(key: key); @override - Widget build(BuildContext context) { + Widget build(BuildContext context, CustomUserBottomSheetViewModel viewModel) { final height = MediaQuery.of(context).size.height; return Stack( alignment: AlignmentDirectional.center, @@ -35,7 +38,7 @@ class ProfileHead extends StatelessWidget { Flexible( fit: FlexFit.loose, child: CustomText( - text: PaulImoke, + text: viewModel.userModel!.fullName!, color: AppColors.whiteColor, fontWeight: FontWeight.bold, fontSize: height * 0.025, diff --git a/lib/ui/view/edit_profile/edit_profile_view.dart b/lib/ui/view/edit_profile/edit_profile_view.dart index 5979d9621..c55b2573c 100644 --- a/lib/ui/view/edit_profile/edit_profile_view.dart +++ b/lib/ui/view/edit_profile/edit_profile_view.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/user_model.dart'; import 'package:hng/ui/shared/shared.dart'; import 'package:hng/ui/shared/zuri_appbar.dart'; @@ -10,21 +11,33 @@ import 'edit_profile_viewmodel.dart'; import 'widget/edit_profile_body.dart'; class EditProfileView extends StatelessWidget { - const EditProfileView({Key? key}) : super(key: key); + final UserModel user; + const EditProfileView({Key? key, required this.user}) : super(key: key); @override Widget build(BuildContext context) { Size _size = MediaQuery.of(context).size; return ViewModelBuilder.reactive( viewModelBuilder: () => EditProfileViewModel(), + onModelReady: (model) => model.onInit(user), builder: (context, viewModel, child) => Scaffold( appBar: ZuriAppBar( + whiteBackground: true, leading: Icons.close_rounded, leadingPress: () => viewModel.close(), orgTitle: Text( "Edit Profile", style: AppTextStyles.heading7, ), + actions: [ + TextButton( + onPressed: () => viewModel.onSave(), + child: Text( + Save.toUpperCase(), + style: AppTextStyles.body1Bold, + ), + ), + ], ), body: Visibility( visible: !viewModel.isBusy, diff --git a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart index 9e52919eb..a953717b0 100644 --- a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart +++ b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart @@ -1,4 +1,8 @@ import 'package:hng/app/app.locator.dart'; +import 'package:hng/models/user_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -6,6 +10,51 @@ import 'package:stacked_services/stacked_services.dart'; class EditProfileViewModel extends BaseViewModel { final _navigationService = locator(); + final _userService = locator(); + final _zuriApi = ZuriApi(coreBaseUrl); + + late UserModel userModel; + String fullName = ''; + String phone = ''; + String track = ''; + String displayName = ''; + + void navigateBack() { + _navigationService.back(); + } + + void onInit(UserModel user) { + userModel = user; + } + + UserModel updateData() { + userModel + ..firstName = + fullName.isNotEmpty ? fullName.split(" ").first : userModel.firstName + ..lastName = + fullName.isNotEmpty ? fullName.split(" ").last : userModel.lastName + ..displayName = + displayName.isNotEmpty ? displayName : userModel.displayName + ..phoneNumber = phone.isNotEmpty ? phone : userModel.phoneNumber; + + return userModel; + } + + Future onSave() async { + updateData(); + // await _zuriApi.patch( + // 'organizations/$orgId/members/profile', + // body: userModel.toMap(), + // token: token, + // ); + _userService.setUserDetails(userModel); + _navigationService.back(); + } void close() => _navigationService.back(); + + String? get userId => _userService.userId; + String? get orgId => _userService.currentOrgId; + String? get email => _userService.userEmail; + String? get token => _userService.authToken; } diff --git a/lib/ui/view/edit_profile/widget/edit_profile_body.dart b/lib/ui/view/edit_profile/widget/edit_profile_body.dart index 25013b1db..0079b2d36 100644 --- a/lib/ui/view/edit_profile/widget/edit_profile_body.dart +++ b/lib/ui/view/edit_profile/widget/edit_profile_body.dart @@ -41,19 +41,22 @@ class Body extends ViewModelWidget { child: Align( alignment: Alignment.bottomRight, child: IconButton( - onPressed: () {}, - icon: Icon( - Icons.add_a_photo, - size: _size.width * 0.06, - )), + onPressed: () {}, + icon: Icon( + Icons.add_a_photo, + size: _size.width * 0.06, + ), + ), ), ), const Spacer(), SizedBox( width: _size.width * 0.55, child: TextFormField( - initialValue: '', - onChanged: (value) {}, + initialValue: viewModel.userModel.fullName, + onChanged: (value) { + viewModel.fullName = value; + }, decoration: const InputDecoration( labelText: FullName, ), @@ -63,8 +66,10 @@ class Body extends ViewModelWidget { ), ), TextFormField( - initialValue: '', - onChanged: (value) {}, + initialValue: viewModel.userModel.displayName, + onChanged: (value) { + viewModel.displayName = value; + }, decoration: const InputDecoration( labelText: DisplayName, helperText: DisplayNameDescription, @@ -72,14 +77,20 @@ class Body extends ViewModelWidget { ), ), TextFormField( - initialValue: '', - onChanged: (value) {}, + initialValue: viewModel.userModel.status == null + ? '' + : viewModel.userModel.status.toString(), + onChanged: (value) { + viewModel.track = value; + }, decoration: const InputDecoration( labelText: Track, helperText: TrackDescription), ), TextFormField( - initialValue: '', - onChanged: (value) {}, + initialValue: viewModel.userModel.phoneNumber, + onChanged: (value) { + viewModel.phone = value; + }, decoration: const InputDecoration( labelText: Phone, helperText: PhoneDescription), ), diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index cb4d57652..36a534542 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -2,40 +2,40 @@ // in hng/test/helpers/test_helpers.dart. // Do not manually edit this file. -import 'dart:async' as _i4; +import 'dart:async' as _i2; import 'dart:io' as _i24; -import 'dart:ui' as _i15; +import 'dart:ui' as _i14; -import 'package:centrifuge/centrifuge.dart' as _i21; -import 'package:dio/dio.dart' as _i5; -import 'package:flutter/material.dart' as _i12; +import 'package:centrifuge/centrifuge.dart' as _i20; +import 'package:dio/dio.dart' as _i3; +import 'package:flutter/material.dart' as _i11; import 'package:hng/models/api_response.dart' as _i22; -import 'package:hng/models/channel_members.dart' as _i19; -import 'package:hng/models/channel_model.dart' as _i18; +import 'package:hng/models/channel_members.dart' as _i18; +import 'package:hng/models/channel_model.dart' as _i17; import 'package:hng/models/channels_search_model.dart' as _i28; -import 'package:hng/models/organization_member_model.dart' as _i10; -import 'package:hng/models/organization_model.dart' as _i9; +import 'package:hng/models/organization_member_model.dart' as _i6; +import 'package:hng/models/organization_model.dart' as _i5; +import 'package:hng/models/user_model.dart' as _i8; import 'package:hng/models/user_search_model.dart' as _i23; import 'package:hng/package/base/jump_to_request/jump_to_api.dart' as _i27; -import 'package:hng/package/base/server-request/api/zuri_api.dart' as _i7; +import 'package:hng/package/base/server-request/api/zuri_api.dart' as _i21; import 'package:hng/package/base/server-request/channels/channels_api_service.dart' - as _i17; -import 'package:hng/package/base/server-request/dms/dms_api_service.dart' as _i16; +import 'package:hng/package/base/server-request/dms/dms_api_service.dart' + as _i15; import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart' as _i30; -import 'package:hng/services/centrifuge_service.dart' as _i20; +import 'package:hng/services/centrifuge_service.dart' as _i19; import 'package:hng/services/connectivity_service.dart' as _i25; -import 'package:hng/services/local_storage_services.dart' as _i3; +import 'package:hng/services/local_storage_services.dart' as _i9; import 'package:hng/services/media_service.dart' as _i29; -import 'package:hng/services/user_service.dart' as _i8; +import 'package:hng/services/user_service.dart' as _i7; import 'package:hng/utilities/enums.dart' as _i26; -import 'package:hng/utilities/failures.dart' as _i6; -import 'package:logger/src/logger.dart' as _i2; +import 'package:hng/utilities/failures.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; -import 'package:stacked_services/stacked_services.dart' as _i11; -import 'package:stacked_themes/src/theme_manager.dart' as _i14; -import 'package:stacked_themes/src/theme_service.dart' as _i13; +import 'package:stacked_services/stacked_services.dart' as _i10; +import 'package:stacked_themes/src/theme_manager.dart' as _i13; +import 'package:stacked_themes/src/theme_service.dart' as _i12; // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters @@ -45,37 +45,28 @@ import 'package:stacked_themes/src/theme_service.dart' as _i13; // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis -class _FakeLogger_0 extends _i1.Fake implements _i2.Logger {} - -class _FakeSharedPreferenceLocalStorage_1 extends _i1.Fake - implements _i3.SharedPreferenceLocalStorage {} - -class _FakeStreamController_2 extends _i1.Fake - implements _i4.StreamController {} +class _FakeStreamController_0 extends _i1.Fake + implements _i2.StreamController {} -class _FakeStreamSubscription_3 extends _i1.Fake - implements _i4.StreamSubscription {} +class _FakeStreamSubscription_1 extends _i1.Fake + implements _i2.StreamSubscription {} -class _FakeDio_4 extends _i1.Fake implements _i5.Dio {} +class _FakeDio_2 extends _i1.Fake implements _i3.Dio {} -class _FakeFailure_5 extends _i1.Fake implements _i6.Failure {} +class _FakeFailure_3 extends _i1.Fake implements _i4.Failure {} -class _FakeZuriApi_6 extends _i1.Fake implements _i7.ZuriApi {} +class _FakeOrganizationModel_4 extends _i1.Fake + implements _i5.OrganizationModel {} -class _FakeUserService_7 extends _i1.Fake implements _i8.UserService {} - -class _FakeOrganizationModel_8 extends _i1.Fake - implements _i9.OrganizationModel {} - -class _FakeOrganizationMemberModelList_9 extends _i1.Fake - implements _i10.OrganizationMemberModelList {} +class _FakeOrganizationMemberModelList_5 extends _i1.Fake + implements _i6.OrganizationMemberModelList {} /// A class which mocks [UserService]. /// /// See the documentation for Mockito's code generation for more information. -class MockUserService extends _i1.Mock implements _i8.UserService { +class MockUserService extends _i1.Mock implements _i7.UserService { @override - set organizationModel(_i9.OrganizationModel? _organizationModel) => super + set organizationModel(_i5.OrganizationModel? _organizationModel) => super .noSuchMethod(Invocation.setter(#organizationModel, _organizationModel), returnValueForMissingStub: null); @override @@ -103,6 +94,10 @@ class MockUserService extends _i1.Mock implements _i8.UserService { (super.noSuchMethod(Invocation.getter(#userEmail), returnValue: '') as String); @override + void setUserDetails(_i8.UserModel? user) => + super.noSuchMethod(Invocation.method(#setUserDetails, [user]), + returnValueForMissingStub: null); + @override void setOrganization() => super.noSuchMethod(Invocation.method(#setOrganization, []), returnValueForMissingStub: null); @@ -125,23 +120,23 @@ class MockUserService extends _i1.Mock implements _i8.UserService { /// /// See the documentation for Mockito's code generation for more information. class MockSharedPreferenceLocalStorage extends _i1.Mock - implements _i3.SharedPreferenceLocalStorage { + implements _i9.SharedPreferenceLocalStorage { @override - _i4.Future setBool(String? key, bool? value) => + _i2.Future setBool(String? key, bool? value) => (super.noSuchMethod(Invocation.method(#setBool, [key, value]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future setString(String? key, String? value) => + _i2.Future setString(String? key, String? value) => (super.noSuchMethod(Invocation.method(#setString, [key, value]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future setDouble(String? key, num? value) => + _i2.Future setDouble(String? key, num? value) => (super.noSuchMethod(Invocation.method(#setDouble, [key, value]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future setStringList(String? key, List? value) => + _i2.Future setStringList(String? key, List? value) => (super.noSuchMethod(Invocation.method(#setStringList, [key, value]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override bool? getBool(String? key) => (super.noSuchMethod(Invocation.method(#getBool, [key])) as bool?); @@ -156,13 +151,13 @@ class MockSharedPreferenceLocalStorage extends _i1.Mock (super.noSuchMethod(Invocation.method(#getStringList, [key])) as List?); @override - _i4.Future clearData(String? key) => + _i2.Future clearData(String? key) => (super.noSuchMethod(Invocation.method(#clearData, [key]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future clearStorage() => + _i2.Future clearStorage() => (super.noSuchMethod(Invocation.method(#clearStorage, []), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override String toString() => super.toString(); } @@ -170,7 +165,7 @@ class MockSharedPreferenceLocalStorage extends _i1.Mock /// A class which mocks [NavigationService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNavigationService extends _i1.Mock implements _i11.NavigationService { +class MockNavigationService extends _i1.Mock implements _i10.NavigationService { @override String get previousRoute => (super.noSuchMethod(Invocation.getter(#previousRoute), returnValue: '') @@ -180,9 +175,9 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { (super.noSuchMethod(Invocation.getter(#currentRoute), returnValue: '') as String); @override - _i12.GlobalKey<_i12.NavigatorState>? nestedNavigationKey(int? index) => + _i11.GlobalKey<_i11.NavigatorState>? nestedNavigationKey(int? index) => (super.noSuchMethod(Invocation.method(#nestedNavigationKey, [index])) - as _i12.GlobalKey<_i12.NavigatorState>?); + as _i11.GlobalKey<_i11.NavigatorState>?); @override void config( {bool? enableLog, @@ -202,17 +197,17 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { }), returnValueForMissingStub: null); @override - _i4.Future? navigateWithTransition(_i12.Widget? page, + _i2.Future? navigateWithTransition(_i11.Widget? page, {bool? opaque, String? transition = r'', Duration? duration, bool? popGesture, int? id, - _i12.Curve? curve, - _i11.Bindings? binding, + _i11.Curve? curve, + _i10.Bindings? binding, bool? fullscreenDialog = false, bool? preventDuplicates = true, - _i11.Transition? transitionClass}) => + _i10.Transition? transitionClass}) => (super.noSuchMethod(Invocation.method(#navigateWithTransition, [ page ], { @@ -226,19 +221,19 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { #fullscreenDialog: fullscreenDialog, #preventDuplicates: preventDuplicates, #transitionClass: transitionClass - })) as _i4.Future?); + })) as _i2.Future?); @override - _i4.Future? replaceWithTransition(_i12.Widget? page, + _i2.Future? replaceWithTransition(_i11.Widget? page, {bool? opaque, String? transition = r'', Duration? duration, bool? popGesture, int? id, - _i12.Curve? curve, - _i11.Bindings? binding, + _i11.Curve? curve, + _i10.Bindings? binding, bool? fullscreenDialog = false, bool? preventDuplicates = true, - _i11.Transition? transitionClass}) => + _i10.Transition? transitionClass}) => (super.noSuchMethod(Invocation.method(#replaceWithTransition, [ page ], { @@ -252,13 +247,13 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { #fullscreenDialog: fullscreenDialog, #preventDuplicates: preventDuplicates, #transitionClass: transitionClass - })) as _i4.Future?); + })) as _i2.Future?); @override bool back({T? result, int? id}) => (super.noSuchMethod( Invocation.method(#back, [], {#result: result, #id: id}), returnValue: false) as bool); @override - void popUntil(_i12.RoutePredicate? predicate) => + void popUntil(_i11.RoutePredicate? predicate) => super.noSuchMethod(Invocation.method(#popUntil, [predicate]), returnValueForMissingStub: null); @override @@ -266,7 +261,7 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { super.noSuchMethod(Invocation.method(#popRepeated, [popTimes]), returnValueForMissingStub: null); @override - _i4.Future? navigateTo(String? routeName, + _i2.Future? navigateTo(String? routeName, {dynamic arguments, int? id, bool? preventDuplicates = true, @@ -278,19 +273,19 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { #id: id, #preventDuplicates: preventDuplicates, #parameters: parameters - })) as _i4.Future?); + })) as _i2.Future?); @override - _i4.Future? navigateToView(_i12.Widget? view, + _i2.Future? navigateToView(_i11.Widget? view, {dynamic arguments, int? id, bool? opaque, - _i12.Curve? curve, - _i11.Bindings? binding, + _i11.Curve? curve, + _i10.Bindings? binding, Duration? duration, bool? fullscreenDialog = false, bool? popGesture, bool? preventDuplicates = true, - _i11.Transition? transition}) => + _i10.Transition? transition}) => (super.noSuchMethod(Invocation.method(#navigateToView, [ view ], { @@ -304,9 +299,9 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { #popGesture: popGesture, #preventDuplicates: preventDuplicates, #transition: transition - })) as _i4.Future?); + })) as _i2.Future?); @override - _i4.Future? replaceWith(String? routeName, + _i2.Future? replaceWith(String? routeName, {dynamic arguments, int? id, bool? preventDuplicates = true, @@ -318,9 +313,9 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { #id: id, #preventDuplicates: preventDuplicates, #parameters: parameters - })) as _i4.Future?); + })) as _i2.Future?); @override - _i4.Future? clearStackAndShow(String? routeName, + _i2.Future? clearStackAndShow(String? routeName, {dynamic arguments, int? id, Map? parameters}) => (super.noSuchMethod(Invocation.method(#clearStackAndShow, [ routeName @@ -328,9 +323,9 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { #arguments: arguments, #id: id, #parameters: parameters - })) as _i4.Future?); + })) as _i2.Future?); @override - _i4.Future? clearTillFirstAndShow(String? routeName, + _i2.Future? clearTillFirstAndShow(String? routeName, {dynamic arguments, int? id, bool? preventDuplicates = true, @@ -342,22 +337,22 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { #id: id, #preventDuplicates: preventDuplicates, #parameters: parameters - })) as _i4.Future?); + })) as _i2.Future?); @override - _i4.Future? clearTillFirstAndShowView(_i12.Widget? view, + _i2.Future? clearTillFirstAndShowView(_i11.Widget? view, {dynamic arguments, int? id}) => (super.noSuchMethod(Invocation.method(#clearTillFirstAndShowView, [view], - {#arguments: arguments, #id: id})) as _i4.Future?); + {#arguments: arguments, #id: id})) as _i2.Future?); @override - _i4.Future? pushNamedAndRemoveUntil(String? routeName, - {_i12.RoutePredicate? predicate, dynamic arguments, int? id}) => + _i2.Future? pushNamedAndRemoveUntil(String? routeName, + {_i11.RoutePredicate? predicate, dynamic arguments, int? id}) => (super.noSuchMethod(Invocation.method(#pushNamedAndRemoveUntil, [ routeName ], { #predicate: predicate, #arguments: arguments, #id: id - })) as _i4.Future?); + })) as _i2.Future?); @override String toString() => super.toString(); } @@ -365,14 +360,14 @@ class MockNavigationService extends _i1.Mock implements _i11.NavigationService { /// A class which mocks [SnackbarService]. /// /// See the documentation for Mockito's code generation for more information. -class MockSnackbarService extends _i1.Mock implements _i11.SnackbarService { +class MockSnackbarService extends _i1.Mock implements _i10.SnackbarService { @override - void registerSnackbarConfig(_i11.SnackbarConfig? config) => + void registerSnackbarConfig(_i10.SnackbarConfig? config) => super.noSuchMethod(Invocation.method(#registerSnackbarConfig, [config]), returnValueForMissingStub: null); @override void registerCustomSnackbarconfig( - {dynamic customData, _i11.SnackbarConfig? config}) => + {dynamic customData, _i10.SnackbarConfig? config}) => super.noSuchMethod( Invocation.method(#registerCustomSnackbarconfig, [], {#customData: customData, #config: config}), @@ -380,7 +375,7 @@ class MockSnackbarService extends _i1.Mock implements _i11.SnackbarService { @override void registerCustomMainButtonBuilder( {dynamic variant, - _i12.Widget Function(String?, Function?)? builder}) => + _i11.Widget Function(String?, Function?)? builder}) => super.noSuchMethod( Invocation.method(#registerCustomMainButtonBuilder, [], {#variant: variant, #builder: builder}), @@ -388,8 +383,8 @@ class MockSnackbarService extends _i1.Mock implements _i11.SnackbarService { @override void registerCustomSnackbarConfig( {dynamic variant, - _i11.SnackbarConfig? config, - _i11.SnackbarConfig Function()? configBuilder}) => + _i10.SnackbarConfig? config, + _i10.SnackbarConfig Function()? configBuilder}) => super.noSuchMethod( Invocation.method(#registerCustomSnackbarConfig, [], { #variant: variant, @@ -416,7 +411,7 @@ class MockSnackbarService extends _i1.Mock implements _i11.SnackbarService { }), returnValueForMissingStub: null); @override - _i4.Future? showCustomSnackBar( + _i2.Future? showCustomSnackBar( {String? message, dynamic customData, dynamic variant, @@ -434,7 +429,7 @@ class MockSnackbarService extends _i1.Mock implements _i11.SnackbarService { #onMainButtonTapped: onMainButtonTapped, #onTap: onTap, #duration: duration - })) as _i4.Future?); + })) as _i2.Future?); @override String toString() => super.toString(); } @@ -442,7 +437,7 @@ class MockSnackbarService extends _i1.Mock implements _i11.SnackbarService { /// A class which mocks [ThemeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockThemeService extends _i1.Mock implements _i13.ThemeService { +class MockThemeService extends _i1.Mock implements _i12.ThemeService { @override int get themeCount => (super.noSuchMethod(Invocation.getter(#themeCount), returnValue: 0) @@ -452,23 +447,23 @@ class MockThemeService extends _i1.Mock implements _i13.ThemeService { (super.noSuchMethod(Invocation.getter(#isDarkMode), returnValue: false) as bool); @override - _i13.ThemeManagerMode get selectedThemeMode => + _i12.ThemeManagerMode get selectedThemeMode => (super.noSuchMethod(Invocation.getter(#selectedThemeMode), - returnValue: _i13.ThemeManagerMode.light) as _i13.ThemeManagerMode); + returnValue: _i12.ThemeManagerMode.light) as _i12.ThemeManagerMode); @override - void setThemeManager(_i14.ThemeManager? manager) => + void setThemeManager(_i13.ThemeManager? manager) => super.noSuchMethod(Invocation.method(#setThemeManager, [manager]), returnValueForMissingStub: null); @override - _i4.Future selectThemeAtIndex(int? themeIndex) => + _i2.Future selectThemeAtIndex(int? themeIndex) => (super.noSuchMethod(Invocation.method(#selectThemeAtIndex, [themeIndex]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override void toggleDarkLightTheme() => super.noSuchMethod(Invocation.method(#toggleDarkLightTheme, []), returnValueForMissingStub: null); @override - void setThemeMode(_i13.ThemeManagerMode? themeManagerMode) => + void setThemeMode(_i12.ThemeManagerMode? themeManagerMode) => super.noSuchMethod(Invocation.method(#setThemeMode, [themeManagerMode]), returnValueForMissingStub: null); @override @@ -478,33 +473,33 @@ class MockThemeService extends _i1.Mock implements _i13.ThemeService { /// A class which mocks [DialogService]. /// /// See the documentation for Mockito's code generation for more information. -class MockDialogService extends _i1.Mock implements _i11.DialogService { +class MockDialogService extends _i1.Mock implements _i10.DialogService { @override void registerCustomDialogBuilders( - Map? builders) => + Map? builders) => super.noSuchMethod( Invocation.method(#registerCustomDialogBuilders, [builders]), returnValueForMissingStub: null); @override void registerCustomDialogBuilder( {dynamic variant, - _i12.Widget Function(_i12.BuildContext, _i11.DialogRequest, - dynamic Function(_i11.DialogResponse))? + _i11.Widget Function(_i11.BuildContext, _i10.DialogRequest, + dynamic Function(_i10.DialogResponse))? builder}) => super.noSuchMethod( Invocation.method(#registerCustomDialogBuilder, [], {#variant: variant, #builder: builder}), returnValueForMissingStub: null); @override - _i4.Future<_i11.DialogResponse?> showDialog( + _i2.Future<_i10.DialogResponse?> showDialog( {String? title, String? description, String? cancelTitle, - _i15.Color? cancelTitleColor, + _i14.Color? cancelTitleColor, String? buttonTitle = r'Ok', - _i15.Color? buttonTitleColor, + _i14.Color? buttonTitleColor, bool? barrierDismissible = false, - _i11.DialogPlatform? dialogPlatform}) => + _i10.DialogPlatform? dialogPlatform}) => (super.noSuchMethod( Invocation.method(#showDialog, [], { #title: title, @@ -516,10 +511,10 @@ class MockDialogService extends _i1.Mock implements _i11.DialogService { #barrierDismissible: barrierDismissible, #dialogPlatform: dialogPlatform }), - returnValue: Future<_i11.DialogResponse?>.value()) - as _i4.Future<_i11.DialogResponse?>); + returnValue: Future<_i10.DialogResponse?>.value()) + as _i2.Future<_i10.DialogResponse?>); @override - _i4.Future<_i11.DialogResponse?> showCustomDialog( + _i2.Future<_i10.DialogResponse?> showCustomDialog( {dynamic variant, String? title, String? description, @@ -532,7 +527,7 @@ class MockDialogService extends _i1.Mock implements _i11.DialogService { bool? showIconInAdditionalButton = false, String? additionalButtonTitle, bool? takesInput = false, - _i15.Color? barrierColor = const _i15.Color(2315255808), + _i14.Color? barrierColor = const _i14.Color(2315255808), bool? barrierDismissible = false, String? barrierLabel = r'', dynamic customData, @@ -557,16 +552,16 @@ class MockDialogService extends _i1.Mock implements _i11.DialogService { #customData: customData, #data: data }), - returnValue: Future<_i11.DialogResponse?>.value()) - as _i4.Future<_i11.DialogResponse?>); + returnValue: Future<_i10.DialogResponse?>.value()) + as _i2.Future<_i10.DialogResponse?>); @override - _i4.Future<_i11.DialogResponse?> showConfirmationDialog( + _i2.Future<_i10.DialogResponse?> showConfirmationDialog( {String? title, String? description, String? cancelTitle = r'Cancel', String? confirmationTitle = r'Ok', bool? barrierDismissible = false, - _i11.DialogPlatform? dialogPlatform}) => + _i10.DialogPlatform? dialogPlatform}) => (super.noSuchMethod( Invocation.method(#showConfirmationDialog, [], { #title: title, @@ -576,10 +571,10 @@ class MockDialogService extends _i1.Mock implements _i11.DialogService { #barrierDismissible: barrierDismissible, #dialogPlatform: dialogPlatform }), - returnValue: Future<_i11.DialogResponse?>.value()) - as _i4.Future<_i11.DialogResponse?>); + returnValue: Future<_i10.DialogResponse?>.value()) + as _i2.Future<_i10.DialogResponse?>); @override - void completeDialog(_i11.DialogResponse? response) => + void completeDialog(_i10.DialogResponse? response) => super.noSuchMethod(Invocation.method(#completeDialog, [response]), returnValueForMissingStub: null); @override @@ -590,13 +585,13 @@ class MockDialogService extends _i1.Mock implements _i11.DialogService { /// /// See the documentation for Mockito's code generation for more information. class MockBottomSheetService extends _i1.Mock - implements _i11.BottomSheetService { + implements _i10.BottomSheetService { @override - void setCustomSheetBuilders(Map? builders) => + void setCustomSheetBuilders(Map? builders) => super.noSuchMethod(Invocation.method(#setCustomSheetBuilders, [builders]), returnValueForMissingStub: null); @override - _i4.Future<_i11.SheetResponse?> showBottomSheet( + _i2.Future<_i10.SheetResponse?> showBottomSheet( {String? title, String? description, String? confirmButtonTitle = r'Ok', @@ -620,10 +615,10 @@ class MockBottomSheetService extends _i1.Mock #enterBottomSheetDuration: enterBottomSheetDuration, #ignoreSafeArea: ignoreSafeArea }), - returnValue: Future<_i11.SheetResponse?>.value()) - as _i4.Future<_i11.SheetResponse?>); + returnValue: Future<_i10.SheetResponse?>.value()) + as _i2.Future<_i10.SheetResponse?>); @override - _i4.Future<_i11.SheetResponse?> showCustomSheet( + _i2.Future<_i10.SheetResponse?> showCustomSheet( {dynamic variant, String? title, String? description, @@ -636,7 +631,7 @@ class MockBottomSheetService extends _i1.Mock bool? showIconInAdditionalButton = false, String? additionalButtonTitle, bool? takesInput = false, - _i15.Color? barrierColor = const _i15.Color(2315255808), + _i14.Color? barrierColor = const _i14.Color(2315255808), bool? barrierDismissible = true, bool? isScrollControlled = false, String? barrierLabel = r'', @@ -671,10 +666,10 @@ class MockBottomSheetService extends _i1.Mock #enterBottomSheetDuration: enterBottomSheetDuration, #ignoreSafeArea: ignoreSafeArea }), - returnValue: Future<_i11.SheetResponse?>.value()) - as _i4.Future<_i11.SheetResponse?>); + returnValue: Future<_i10.SheetResponse?>.value()) + as _i2.Future<_i10.SheetResponse?>); @override - void completeSheet(_i11.SheetResponse? response) => + void completeSheet(_i10.SheetResponse? response) => super.noSuchMethod(Invocation.method(#completeSheet, [response]), returnValueForMissingStub: null); @override @@ -684,33 +679,16 @@ class MockBottomSheetService extends _i1.Mock /// A class which mocks [DMApiService]. /// /// See the documentation for Mockito's code generation for more information. -class MockDMApiService extends _i1.Mock implements _i16.DMApiService { - @override - _i2.Logger get log => - (super.noSuchMethod(Invocation.getter(#log), returnValue: _FakeLogger_0()) - as _i2.Logger); - @override - _i3.SharedPreferenceLocalStorage get storageService => - (super.noSuchMethod(Invocation.getter(#storageService), - returnValue: _FakeSharedPreferenceLocalStorage_1()) - as _i3.SharedPreferenceLocalStorage); +class MockDMApiService extends _i1.Mock implements _i15.DMApiService { @override - String get userId => - (super.noSuchMethod(Invocation.getter(#userId), returnValue: '') - as String); - @override - String get orgId => - (super.noSuchMethod(Invocation.getter(#orgId), returnValue: '') - as String); - @override - _i4.Future> getActiveDms() => + _i2.Future> getActiveDms() => (super.noSuchMethod(Invocation.method(#getActiveDms, []), returnValue: Future>.value([])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future getUser(dynamic ids) => + _i2.Future getUser(dynamic ids) => (super.noSuchMethod(Invocation.method(#getUser, [ids]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override String toString() => super.toString(); } @@ -719,76 +697,67 @@ class MockDMApiService extends _i1.Mock implements _i16.DMApiService { /// /// See the documentation for Mockito's code generation for more information. class MockChannelsApiService extends _i1.Mock - implements _i17.ChannelsApiService { + implements _i16.ChannelsApiService { @override - _i2.Logger get log => - (super.noSuchMethod(Invocation.getter(#log), returnValue: _FakeLogger_0()) - as _i2.Logger); - @override - _i3.SharedPreferenceLocalStorage get storageService => - (super.noSuchMethod(Invocation.getter(#storageService), - returnValue: _FakeSharedPreferenceLocalStorage_1()) - as _i3.SharedPreferenceLocalStorage); - @override - _i4.StreamController get controller => + _i2.StreamController get controller => (super.noSuchMethod(Invocation.getter(#controller), - returnValue: _FakeStreamController_2()) - as _i4.StreamController); + returnValue: _FakeStreamController_0()) + as _i2.StreamController); @override - set controller(_i4.StreamController? _controller) => + set controller(_i2.StreamController? _controller) => super.noSuchMethod(Invocation.setter(#controller, _controller), returnValueForMissingStub: null); @override - _i4.Future> getActiveDms() => + _i2.Future> getActiveDms() => (super.noSuchMethod(Invocation.method(#getActiveDms, []), returnValue: Future>.value([])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future getChannelSocketId(String? channelId) => + _i2.Future getChannelSocketId(String? channelId) => (super.noSuchMethod(Invocation.method(#getChannelSocketId, [channelId]), - returnValue: Future.value('')) as _i4.Future); + returnValue: Future.value('')) as _i2.Future); @override - _i4.Future?> joinChannel(String? channelId) => + _i2.Future?> joinChannel(String? channelId) => (super.noSuchMethod(Invocation.method(#joinChannel, [channelId]), returnValue: Future?>.value()) - as _i4.Future?>); + as _i2.Future?>); @override - _i4.Future> getChannelMessages(String? channelId) => + _i2.Future> getChannelMessages(String? channelId) => (super.noSuchMethod(Invocation.method(#getChannelMessages, [channelId]), returnValue: Future>.value([])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future sendChannelMessages( + _i2.Future sendChannelMessages( String? channelId, String? userId, String? message) => (super.noSuchMethod( Invocation.method(#sendChannelMessages, [channelId, userId, message]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future> fetchChannel() => + _i2.Future> fetchChannel() => (super.noSuchMethod(Invocation.method(#fetchChannel, []), returnValue: - Future>.value(<_i18.ChannelModel>[])) - as _i4.Future>); + Future>.value(<_i17.ChannelModel>[])) + as _i2.Future>); @override - _i4.Future createChannels( + _i2.Future createChannels( {String? name, String? description, bool? private}) => (super.noSuchMethod( Invocation.method(#createChannels, [], {#name: name, #description: description, #private: private}), - returnValue: Future.value(false)) as _i4.Future); + returnValue: Future.value(false)) as _i2.Future); @override - _i4.Future deleteChannel(String? orgId, String? channelId) => + _i2.Future deleteChannel(String? orgId, String? channelId) => (super.noSuchMethod(Invocation.method(#deleteChannel, [orgId, channelId]), - returnValue: Future.value(false)) as _i4.Future); + returnValue: Future.value(false)) as _i2.Future); @override - _i4.Future?> getChannelMembers(dynamic id) => + _i2.Future?> getChannelMembers(dynamic id) => (super.noSuchMethod(Invocation.method(#getChannelMembers, [id]), - returnValue: Future?>.value()) - as _i4.Future?>); + returnValue: Future?>.value()) + as _i2.Future?>); @override - _i4.Future? dispose() => (super.noSuchMethod( + _i2.Future? dispose() => (super.noSuchMethod( Invocation.method(#dispose, []), - returnValueForMissingStub: Future.value()) as _i4.Future?); + returnValueForMissingStub: Future.value()) as _i2.Future?); @override String toString() => super.toString(); } @@ -796,32 +765,32 @@ class MockChannelsApiService extends _i1.Mock /// A class which mocks [CentrifugeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockCentrifugeService extends _i1.Mock implements _i20.CentrifugeService { +class MockCentrifugeService extends _i1.Mock implements _i19.CentrifugeService { @override - _i4.StreamController get messageStreamController => + _i2.StreamController get messageStreamController => (super.noSuchMethod(Invocation.getter(#messageStreamController), - returnValue: _FakeStreamController_2()) - as _i4.StreamController); + returnValue: _FakeStreamController_0()) + as _i2.StreamController); @override set messageStreamController( - _i4.StreamController? _messageStreamController) => + _i2.StreamController? _messageStreamController) => super.noSuchMethod( Invocation.setter(#messageStreamController, _messageStreamController), returnValueForMissingStub: null); @override - Map get subList => + Map get subList => (super.noSuchMethod(Invocation.getter(#subList), - returnValue: {}) - as Map); + returnValue: {}) + as Map); @override - set subList(Map? _subList) => + set subList(Map? _subList) => super.noSuchMethod(Invocation.setter(#subList, _subList), returnValueForMissingStub: null); @override void disconnect() => super.noSuchMethod(Invocation.method(#disconnect, []), returnValueForMissingStub: null); @override - _i4.StreamSubscription listen( + _i2.StreamSubscription listen( {String? socketId, dynamic channelId, dynamic Function(Map)? onData}) => @@ -831,26 +800,26 @@ class MockCentrifugeService extends _i1.Mock implements _i20.CentrifugeService { #channelId: channelId, #onData: onData }), - returnValue: _FakeStreamSubscription_3()) - as _i4.StreamSubscription); + returnValue: _FakeStreamSubscription_1()) + as _i2.StreamSubscription); @override - _i4.StreamSubscription onNotificationReceived( + _i2.StreamSubscription onNotificationReceived( {String? channelId, dynamic Function(Map)? onData}) => (super.noSuchMethod( Invocation.method(#onNotificationReceived, [], {#channelId: channelId, #onData: onData}), - returnValue: _FakeStreamSubscription_3()) - as _i4.StreamSubscription); + returnValue: _FakeStreamSubscription_1()) + as _i2.StreamSubscription); @override bool hasSubscribed(String? socketId) => (super.noSuchMethod(Invocation.method(#hasSubscribed, [socketId]), returnValue: false) as bool); @override - _i4.Future<_i4.Stream?> subscribe(String? channelSocketId) => + _i2.Future<_i2.Stream?> subscribe(String? channelSocketId) => (super.noSuchMethod(Invocation.method(#subscribe, [channelSocketId]), - returnValue: Future<_i4.Stream?>.value()) - as _i4.Future<_i4.Stream?>); + returnValue: Future<_i2.Stream?>.value()) + as _i2.Future<_i2.Stream?>); @override void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), returnValueForMissingStub: null); @@ -878,66 +847,62 @@ class MockCentrifugeService extends _i1.Mock implements _i20.CentrifugeService { /// A class which mocks [ZuriApi]. /// /// See the documentation for Mockito's code generation for more information. -class MockZuriApi extends _i1.Mock implements _i7.ZuriApi { - @override - _i2.Logger get log => - (super.noSuchMethod(Invocation.getter(#log), returnValue: _FakeLogger_0()) - as _i2.Logger); +class MockZuriApi extends _i1.Mock implements _i21.ZuriApi { @override - _i5.Dio get dio => - (super.noSuchMethod(Invocation.getter(#dio), returnValue: _FakeDio_4()) - as _i5.Dio); + _i3.Dio get dio => + (super.noSuchMethod(Invocation.getter(#dio), returnValue: _FakeDio_2()) + as _i3.Dio); @override - _i4.StreamController get controller => + _i2.StreamController get controller => (super.noSuchMethod(Invocation.getter(#controller), - returnValue: _FakeStreamController_2()) - as _i4.StreamController); + returnValue: _FakeStreamController_0()) + as _i2.StreamController); @override - set controller(_i4.StreamController? _controller) => + set controller(_i2.StreamController? _controller) => super.noSuchMethod(Invocation.setter(#controller, _controller), returnValueForMissingStub: null); @override - _i4.Future get(String? string, + _i2.Future get(String? string, {Map? queryParameters, String? token}) => (super.noSuchMethod( Invocation.method(#get, [string], {#queryParameters: queryParameters, #token: token}), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future post(String? string, + _i2.Future post(String? string, {Map? body, String? token}) => (super.noSuchMethod( Invocation.method(#post, [string], {#body: body, #token: token}), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future put(String? string, + _i2.Future put(String? string, {Map? body, String? token}) => (super.noSuchMethod( Invocation.method(#put, [string], {#body: body, #token: token}), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future<_i22.ApiResponse?> patch(String? path, + _i2.Future<_i22.ApiResponse?> patch(String? path, {Map? body, String? token}) => (super.noSuchMethod( Invocation.method(#patch, [path], {#body: body, #token: token}), returnValue: Future<_i22.ApiResponse?>.value()) - as _i4.Future<_i22.ApiResponse?>); + as _i2.Future<_i22.ApiResponse?>); @override - _i4.Future<_i22.ApiResponse?> delete(String? string, + _i2.Future<_i22.ApiResponse?> delete(String? string, {Map? body, String? token}) => (super.noSuchMethod( Invocation.method(#delete, [string], {#body: body, #token: token}), returnValue: - Future<_i22.ApiResponse?>.value()) as _i4 + Future<_i22.ApiResponse?>.value()) as _i2 .Future<_i22.ApiResponse?>); @override - _i4.Future login({String? email, String? password, dynamic token}) => + _i2.Future login({String? email, String? password, dynamic token}) => (super.noSuchMethod( Invocation.method( #login, [], {#email: email, #password: password, #token: token}), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future signUp( + _i2.Future signUp( {String? email, String? password, String? firstName, @@ -955,142 +920,142 @@ class MockZuriApi extends _i1.Mock implements _i7.ZuriApi { #phoneNumber: phoneNumber, #token: token }), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future> fetchListOfOrganizations( + _i2.Future> fetchListOfOrganizations( dynamic token) => (super.noSuchMethod(Invocation.method(#fetchListOfOrganizations, [token]), - returnValue: Future>.value( - <_i9.OrganizationModel>[])) - as _i4.Future>); + returnValue: Future>.value( + <_i5.OrganizationModel>[])) + as _i2.Future>); @override - _i4.Future> getJoinedOrganizations( + _i2.Future> getJoinedOrganizations( dynamic token, String? email) => (super.noSuchMethod( Invocation.method(#getJoinedOrganizations, [token, email]), - returnValue: Future>.value( - <_i9.OrganizationModel>[])) - as _i4.Future>); + returnValue: Future>.value( + <_i5.OrganizationModel>[])) + as _i2.Future>); @override - _i4.Future fetchOrganizationInfo(String? id, dynamic token) => (super + _i2.Future fetchOrganizationInfo(String? id, dynamic token) => (super .noSuchMethod(Invocation.method(#fetchOrganizationInfo, [id, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future fetchOrganizationByUrl(String? url, dynamic token) => + _i2.Future fetchOrganizationByUrl(String? url, dynamic token) => (super.noSuchMethod( Invocation.method(#fetchOrganizationByUrl, [url, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future joinOrganization( + _i2.Future joinOrganization( String? orgId, String? email, dynamic token) => (super.noSuchMethod( Invocation.method(#joinOrganization, [orgId, email, token]), - returnValue: Future.value(false)) as _i4.Future); + returnValue: Future.value(false)) as _i2.Future); @override - _i4.Future createOrganization(String? email, dynamic token) => (super + _i2.Future createOrganization(String? email, dynamic token) => (super .noSuchMethod(Invocation.method(#createOrganization, [email, token]), - returnValue: Future.value('')) as _i4.Future); + returnValue: Future.value('')) as _i2.Future); @override - _i4.Future updateOrgUrl(String? orgId, String? url, dynamic token) => + _i2.Future updateOrgUrl(String? orgId, String? url, dynamic token) => (super.noSuchMethod(Invocation.method(#updateOrgUrl, [orgId, url, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future updateOrgName( + _i2.Future updateOrgName( String? orgId, String? name, dynamic token) => (super.noSuchMethod( Invocation.method(#updateOrgName, [orgId, name, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future updateOrgLogo( + _i2.Future updateOrgLogo( String? orgId, String? url, dynamic token) => (super.noSuchMethod( Invocation.method(#updateOrgLogo, [orgId, url, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future addMemberToChannel( + _i2.Future addMemberToChannel( String? channelId, String? orgId, String? userId, dynamic token) => (super.noSuchMethod( Invocation.method( #addMemberToChannel, [channelId, orgId, userId, token]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i2.Future); @override - _i4.Future addMemberToOrganization( + _i2.Future addMemberToOrganization( String? orgId, String? email, dynamic token) => (super.noSuchMethod( Invocation.method(#addMemberToOrganization, [orgId, email, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future> fetchMembersInOrganization( + _i2.Future> fetchMembersInOrganization( String? orgId, dynamic token) => (super.noSuchMethod( Invocation.method(#fetchMembersInOrganization, [orgId, token]), returnValue: Future>.value(<_i23.UserSearch>[])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future getChannelSocketId( + _i2.Future getChannelSocketId( String? channelId, String? orgId, dynamic token) => (super.noSuchMethod( Invocation.method(#getChannelSocketId, [channelId, orgId, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future> getActiveRooms( + _i2.Future> getActiveRooms( String? orgId, String? userId, dynamic token) => (super.noSuchMethod( Invocation.method(#getActiveRooms, [orgId, userId, token]), returnValue: Future>.value([])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future> getActiveDms(String? orgId, dynamic token) => + _i2.Future> getActiveDms(String? orgId, dynamic token) => (super.noSuchMethod(Invocation.method(#getActiveDms, [orgId, token]), returnValue: Future>.value([])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future> joinChannel( + _i2.Future> joinChannel( String? channelId, String? userId, String? orgId, dynamic token) => (super.noSuchMethod( Invocation.method(#joinChannel, [channelId, userId, orgId, token]), returnValue: - Future>.value({})) as _i4 + Future>.value({})) as _i2 .Future>); @override - _i4.Future getChannelMessages( + _i2.Future getChannelMessages( String? channelId, String? orgId, dynamic token) => (super.noSuchMethod( Invocation.method(#getChannelMessages, [channelId, orgId, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future sendChannelMessages(String? channelId, String? userId, + _i2.Future sendChannelMessages(String? channelId, String? userId, String? orgId, String? message, dynamic token) => (super.noSuchMethod( Invocation.method( #sendChannelMessages, [channelId, userId, orgId, message, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future> getRepliesToMessages( + _i2.Future> getRepliesToMessages( dynamic channelMessageId, dynamic orgId) => (super.noSuchMethod( Invocation.method(#getRepliesToMessages, [channelMessageId, orgId]), returnValue: - Future>.value([])) as _i4 + Future>.value([])) as _i2 .Future>); @override - _i4.Future addReplyToMessage(String? channelMessageId, dynamic content, + _i2.Future addReplyToMessage(String? channelMessageId, dynamic content, dynamic files, dynamic orgId, dynamic userId, dynamic channelId) => (super.noSuchMethod( Invocation.method(#addReplyToMessage, [channelMessageId, content, files, orgId, userId, channelId]), - returnValue: Future.value(false)) as _i4.Future); + returnValue: Future.value(false)) as _i2.Future); @override - _i4.Future> fetchChannel( + _i2.Future> fetchChannel( String? orgId, dynamic token) => (super.noSuchMethod(Invocation.method(#fetchChannel, [orgId, token]), returnValue: - Future>.value(<_i18.ChannelModel>[])) - as _i4.Future>); + Future>.value(<_i17.ChannelModel>[])) + as _i2.Future>); @override - _i4.Future createChannels( + _i2.Future createChannels( {String? name, String? owner, String? email, @@ -1108,7 +1073,7 @@ class MockZuriApi extends _i1.Mock implements _i7.ZuriApi { #private: private, #token: token }), - returnValue: Future.value(false)) as _i4.Future); + returnValue: Future.value(false)) as _i2.Future); @override dynamic getChannelPage(String? id, String? orgId, dynamic token) => super .noSuchMethod(Invocation.method(#getChannelPage, [id, orgId, token])); @@ -1116,53 +1081,53 @@ class MockZuriApi extends _i1.Mock implements _i7.ZuriApi { dynamic getChannelMembers(String? id, String? orgId, dynamic token) => super .noSuchMethod(Invocation.method(#getChannelMembers, [id, orgId, token])); @override - List<_i12.ThemeData> getThemes() => + List<_i11.ThemeData> getThemes() => (super.noSuchMethod(Invocation.method(#getThemes, []), - returnValue: <_i12.ThemeData>[]) as List<_i12.ThemeData>); + returnValue: <_i11.ThemeData>[]) as List<_i11.ThemeData>); @override void sendGetRequest(dynamic endpoint) => super.noSuchMethod(Invocation.method(#sendGetRequest, [endpoint]), returnValueForMissingStub: null); @override - _i4.Future sendPostRequest(dynamic body, dynamic endpoint) => + _i2.Future sendPostRequest(dynamic body, dynamic endpoint) => (super.noSuchMethod(Invocation.method(#sendPostRequest, [body, endpoint]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future sendPatchRequest( + _i2.Future sendPatchRequest( dynamic body, dynamic endpoint, dynamic userId) => (super.noSuchMethod( Invocation.method(#sendPatchRequest, [body, endpoint, userId]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future allChannelsList(String? currentOrgId, dynamic token) => + _i2.Future allChannelsList(String? currentOrgId, dynamic token) => (super.noSuchMethod( Invocation.method(#allChannelsList, [currentOrgId, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future joinedChannelsList( + _i2.Future joinedChannelsList( String? currentOrgId, String? currentUserId, dynamic token) => (super.noSuchMethod( Invocation.method( #joinedChannelsList, [currentOrgId, currentUserId, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future fetchListOfMembers( + _i2.Future fetchListOfMembers( String? currentOrgId, String? channelId, dynamic token) => (super.noSuchMethod( Invocation.method( #fetchListOfMembers, [currentOrgId, channelId, token]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i6.Failure handleApiError(_i5.DioError? e) => + _i4.Failure handleApiError(_i3.DioError? e) => (super.noSuchMethod(Invocation.method(#handleApiError, [e]), - returnValue: _FakeFailure_5()) as _i6.Failure); + returnValue: _FakeFailure_3()) as _i4.Failure); @override - _i4.Future uploadImage(_i24.File? image, + _i2.Future uploadImage(_i24.File? image, {String? token, String? memberId, String? orgId}) => (super.noSuchMethod( Invocation.method(#uploadImage, [image], {#token: token, #memberId: memberId, #orgId: orgId}), - returnValue: Future.value('')) as _i4.Future); + returnValue: Future.value('')) as _i2.Future); @override String toString() => super.toString(); } @@ -1189,31 +1154,31 @@ class MockConnectivityService extends _i1.Mock super.noSuchMethod(Invocation.setter(#networkStatus, _networkStatus), returnValueForMissingStub: null); @override - _i4.StreamController<_i26.ConnectivityStatus> + _i2.StreamController<_i26.ConnectivityStatus> get connectionChangeController => (super.noSuchMethod( Invocation.getter(#connectionChangeController), - returnValue: _FakeStreamController_2<_i26.ConnectivityStatus>()) - as _i4.StreamController<_i26.ConnectivityStatus>); + returnValue: _FakeStreamController_0<_i26.ConnectivityStatus>()) + as _i2.StreamController<_i26.ConnectivityStatus>); @override set connectionChangeController( - _i4.StreamController<_i26.ConnectivityStatus>? + _i2.StreamController<_i26.ConnectivityStatus>? _connectionChangeController) => super.noSuchMethod( Invocation.setter( #connectionChangeController, _connectionChangeController), returnValueForMissingStub: null); @override - _i4.Stream<_i26.ConnectivityStatus> get connectionChange => + _i2.Stream<_i26.ConnectivityStatus> get connectionChange => (super.noSuchMethod(Invocation.getter(#connectionChange), returnValue: Stream<_i26.ConnectivityStatus>.empty()) - as _i4.Stream<_i26.ConnectivityStatus>); + as _i2.Stream<_i26.ConnectivityStatus>); @override void initialize() => super.noSuchMethod(Invocation.method(#initialize, []), returnValueForMissingStub: null); @override - _i4.Future checkConnection() => + _i2.Future checkConnection() => (super.noSuchMethod(Invocation.method(#checkConnection, []), - returnValue: Future.value(false)) as _i4.Future); + returnValue: Future.value(false)) as _i2.Future); @override void onChange() => super.noSuchMethod(Invocation.method(#onChange, []), returnValueForMissingStub: null); @@ -1246,10 +1211,6 @@ class MockConnectivityService extends _i1.Mock /// See the documentation for Mockito's code generation for more information. class MockJumpToApi extends _i1.Mock implements _i27.JumpToApi { @override - _i2.Logger get log => - (super.noSuchMethod(Invocation.getter(#log), returnValue: _FakeLogger_0()) - as _i2.Logger); - @override String get allChannelsPath => (super.noSuchMethod(Invocation.getter(#allChannelsPath), returnValue: '') as String); @@ -1266,27 +1227,27 @@ class MockJumpToApi extends _i1.Mock implements _i27.JumpToApi { super.noSuchMethod(Invocation.setter(#headers, _headers), returnValueForMissingStub: null); @override - _i4.Future> allChannelsList() => + _i2.Future> allChannelsList() => (super.noSuchMethod(Invocation.method(#allChannelsList, []), returnValue: Future>.value( <_i28.ChannelsSearch>[])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future> joinedChannelsList() => + _i2.Future> joinedChannelsList() => (super.noSuchMethod(Invocation.method(#joinedChannelsList, []), returnValue: Future>.value( <_i28.ChannelsSearch>[])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future> fetchListOfMembers() => (super.noSuchMethod( + _i2.Future> fetchListOfMembers() => (super.noSuchMethod( Invocation.method(#fetchListOfMembers, []), returnValue: Future>.value(<_i23.UserSearch>[])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future> fetchList() => + _i2.Future> fetchList() => (super.noSuchMethod(Invocation.method(#fetchList, []), returnValue: Future>.value(<_i23.NewUser>[])) - as _i4.Future>); + as _i2.Future>); @override String toString() => super.toString(); } @@ -1296,25 +1257,13 @@ class MockJumpToApi extends _i1.Mock implements _i27.JumpToApi { /// See the documentation for Mockito's code generation for more information. class MockMediaService extends _i1.Mock implements _i29.MediaService { @override - _i7.ZuriApi get zuriApi => (super.noSuchMethod(Invocation.getter(#zuriApi), - returnValue: _FakeZuriApi_6()) as _i7.ZuriApi); - @override - _i3.SharedPreferenceLocalStorage get storageService => - (super.noSuchMethod(Invocation.getter(#storageService), - returnValue: _FakeSharedPreferenceLocalStorage_1()) - as _i3.SharedPreferenceLocalStorage); - @override - _i8.UserService get userService => - (super.noSuchMethod(Invocation.getter(#userService), - returnValue: _FakeUserService_7()) as _i8.UserService); - @override - _i4.Future getImage({bool? fromGallery}) => (super.noSuchMethod( + _i2.Future getImage({bool? fromGallery}) => (super.noSuchMethod( Invocation.method(#getImage, [], {#fromGallery: fromGallery}), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override - _i4.Future uploadImage(_i24.File? file) => + _i2.Future uploadImage(_i24.File? file) => (super.noSuchMethod(Invocation.method(#uploadImage, [file]), - returnValue: Future.value()) as _i4.Future); + returnValue: Future.value()) as _i2.Future); @override String toString() => super.toString(); } @@ -1325,82 +1274,73 @@ class MockMediaService extends _i1.Mock implements _i29.MediaService { class MockOrganizationApiService extends _i1.Mock implements _i30.OrganizationApiService { @override - _i2.Logger get log => - (super.noSuchMethod(Invocation.getter(#log), returnValue: _FakeLogger_0()) - as _i2.Logger); - @override - _i3.SharedPreferenceLocalStorage get storageService => - (super.noSuchMethod(Invocation.getter(#storageService), - returnValue: _FakeSharedPreferenceLocalStorage_1()) - as _i3.SharedPreferenceLocalStorage); - @override - _i4.Future> fetchListOfOrganizations() => + _i2.Future> fetchListOfOrganizations() => (super.noSuchMethod(Invocation.method(#fetchListOfOrganizations, []), - returnValue: Future>.value( - <_i9.OrganizationModel>[])) - as _i4.Future>); + returnValue: Future>.value( + <_i5.OrganizationModel>[])) + as _i2.Future>); @override - _i4.Future> getJoinedOrganizations() => + _i2.Future> getJoinedOrganizations() => (super.noSuchMethod(Invocation.method(#getJoinedOrganizations, []), - returnValue: Future>.value( - <_i9.OrganizationModel>[])) - as _i4.Future>); + returnValue: Future>.value( + <_i5.OrganizationModel>[])) + as _i2.Future>); @override - _i4.Future<_i9.OrganizationModel> fetchOrganizationInfo(String? id) => + _i2.Future<_i5.OrganizationModel> fetchOrganizationInfo(String? id) => (super.noSuchMethod(Invocation.method(#fetchOrganizationInfo, [id]), - returnValue: Future<_i9.OrganizationModel>.value( - _FakeOrganizationModel_8())) - as _i4.Future<_i9.OrganizationModel>); + returnValue: Future<_i5.OrganizationModel>.value( + _FakeOrganizationModel_4())) + as _i2.Future<_i5.OrganizationModel>); @override - _i4.Future<_i9.OrganizationModel> fetchOrganizationByUrl(String? url) => + _i2.Future<_i5.OrganizationModel> fetchOrganizationByUrl(String? url) => (super.noSuchMethod(Invocation.method(#fetchOrganizationByUrl, [url]), - returnValue: Future<_i9.OrganizationModel>.value( - _FakeOrganizationModel_8())) - as _i4.Future<_i9.OrganizationModel>); + returnValue: Future<_i5.OrganizationModel>.value( + _FakeOrganizationModel_4())) + as _i2.Future<_i5.OrganizationModel>); @override - _i4.Future joinOrganization(String? orgId) => + _i2.Future joinOrganization(String? orgId) => (super.noSuchMethod(Invocation.method(#joinOrganization, [orgId]), - returnValue: Future.value(false)) as _i4.Future); + returnValue: Future.value(false)) as _i2.Future); @override - _i4.Future createOrganization(String? email) => + _i2.Future createOrganization(String? email) => (super.noSuchMethod(Invocation.method(#createOrganization, [email]), - returnValue: Future.value('')) as _i4.Future); + returnValue: Future.value('')) as _i2.Future); @override - _i4.Future updateOrgUrl(String? orgId, String? url) => + _i2.Future updateOrgUrl(String? orgId, String? url) => (super.noSuchMethod(Invocation.method(#updateOrgUrl, [orgId, url]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i2.Future); @override - _i4.Future updateOrgName(String? orgId, String? name) => + _i2.Future updateOrgName(String? orgId, String? name) => (super.noSuchMethod(Invocation.method(#updateOrgName, [orgId, name]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i2.Future); @override - _i4.Future updateOrgLogo(String? orgId, String? url) => + _i2.Future updateOrgLogo(String? orgId, String? url) => (super.noSuchMethod(Invocation.method(#updateOrgLogo, [orgId, url]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i2.Future); @override - _i4.Future addMemberToOrganization(String? orgId, String? email) => + _i2.Future addMemberToOrganization(String? orgId, String? email) => (super.noSuchMethod( Invocation.method(#addMemberToOrganization, [orgId, email]), returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i4.Future); + returnValueForMissingStub: Future.value()) as _i2.Future); @override - _i4.Future> fetchMembersInOrganization(String? orgId) => + _i2.Future> fetchMembersInOrganization(String? orgId) => (super.noSuchMethod( Invocation.method(#fetchMembersInOrganization, [orgId]), returnValue: Future>.value(<_i23.UserSearch>[])) - as _i4.Future>); + as _i2.Future>); @override - _i4.Future<_i10.OrganizationMemberModelList> getOrganizationMemberList( + _i2.Future<_i6.OrganizationMemberModelList> getOrganizationMemberList( String? orgId) => (super.noSuchMethod( Invocation.method(#getOrganizationMemberList, [orgId]), - returnValue: Future<_i10.OrganizationMemberModelList>.value( - _FakeOrganizationMemberModelList_9())) - as _i4.Future<_i10.OrganizationMemberModelList>); + returnValue: Future<_i6.OrganizationMemberModelList>.value( + _FakeOrganizationMemberModelList_5())) + as _i2.Future<_i6.OrganizationMemberModelList>); @override String toString() => super.toString(); } From 742a1860c163ba315b3d600180386659be7dd55d Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Thu, 7 Oct 2021 21:52:26 +0100 Subject: [PATCH 02/20] Create organization with default email completed --- lib/models/user_model.dart | 27 ++++- .../channels/channels_api_service.dart | 6 +- .../organization_api_service.dart | 2 +- .../home_page/home_page_viewmodel.dart | 4 +- .../custom_user_bottom_sheet_viewmodel.dart | 5 +- .../edit_profile/edit_profile_viewmodel.dart | 10 +- .../create_organization/company.dart | 2 +- .../create_organization.dart | 11 +- .../create_organization_viewmodel.dart | 105 ++++++++++-------- .../create_organization/invite.dart | 2 +- .../create_organization/project.dart | 6 +- .../different_email_organization_view.dart | 3 +- .../organization_viewmodel.dart | 2 +- .../select_email/select_email_view.dart | 5 +- 14 files changed, 116 insertions(+), 74 deletions(-) diff --git a/lib/models/user_model.dart b/lib/models/user_model.dart index dfbf3fd0b..16ada19f1 100644 --- a/lib/models/user_model.dart +++ b/lib/models/user_model.dart @@ -5,7 +5,7 @@ class UserModel { String? displayName; String? email; String? phoneNumber; - String? status; + UserStatus? status; String? timezone; String? createdAt; String? updatedAt; @@ -33,7 +33,7 @@ class UserModel { 'display_name': displayName, 'email': email, 'phone': phoneNumber, - 'status': status, + 'status': status?.toMap(), 'time_zone': timezone, 'created_at': createdAt, 'updated_at': updatedAt, @@ -48,7 +48,7 @@ class UserModel { displayName: map['display_name'], email: map['email'], phoneNumber: map['phone'], - status: map['status'], + status: UserStatus.fromMap(map['status']), timezone: map['time_zone'], createdAt: map['created_at'], updatedAt: map['updated_at'], @@ -60,3 +60,24 @@ class UserModel { factory UserModel.fromJson(Map source) => UserModel.fromMap(source); } + +class UserStatus { + String? text; + String? tag; + + UserStatus({this.text, this.tag}); + + factory UserStatus.fromMap(Map map) { + return UserStatus( + text: map['text'], + tag: map['tag'], + ); + } + + Map toMap() { + return { + 'text': text, + 'tag': tag, + }; + } +} diff --git a/lib/package/base/server-request/channels/channels_api_service.dart b/lib/package/base/server-request/channels/channels_api_service.dart index f858852a3..553c901d2 100644 --- a/lib/package/base/server-request/channels/channels_api_service.dart +++ b/lib/package/base/server-request/channels/channels_api_service.dart @@ -155,9 +155,11 @@ class ChannelsApiService { required String name, required String description, required bool private, + String? email, + String? id, }) async { - final owner = _userService.userEmail; - final orgId = _userService.currentOrgId; + final owner = email ?? _userService.userEmail; + final orgId = id ?? _userService.currentOrgId; try { final res = await _api.post( diff --git a/lib/package/base/server-request/organization_request/organization_api_service.dart b/lib/package/base/server-request/organization_request/organization_api_service.dart index 3d2a6bba4..a2e1b35cd 100644 --- a/lib/package/base/server-request/organization_request/organization_api_service.dart +++ b/lib/package/base/server-request/organization_request/organization_api_service.dart @@ -82,7 +82,7 @@ class OrganizationApiService { token: token, body: {'creator_email': email}, ); - return res?.data?['data']['InsertedID']; + return res?.data?['data']['organization_id']; } /// Updates an organization's URL. The organization's id `orgId` must not be diff --git a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart index 21438fd34..9c3a13f34 100644 --- a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart +++ b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart @@ -188,8 +188,8 @@ class HomePageViewModel extends StreamViewModel { void fetchUserDetails() async { try { - final response = await zuriApi.get('organizations/$orgId/members', - queryParameters: {'query': email}, token: token); + final response = await zuriApi + .get('organizations/$orgId/members?query=$email', token: token); final _userModel = UserModel.fromJson((response!.data['data'] as List).first); userService.setUserDetails(_userModel); diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart index 605dbdac6..ae8a1564d 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart @@ -30,8 +30,9 @@ class CustomUserBottomSheetViewModel extends FutureViewModel { @override Future futureToRun() async { try { - final response = await _zuriApi.get('organizations/$orgId/members', - queryParameters: {'query': email}, token: token); + final response = + await _zuriApi.get('organizations/$orgId/members?query=$email', + token: token); _userModel = UserModel.fromJson((response!.data['data'] as List).first); _userService.setUserDetails(_userModel!); } catch (e) { diff --git a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart index a953717b0..d72f92070 100644 --- a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart +++ b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart @@ -42,11 +42,11 @@ class EditProfileViewModel extends BaseViewModel { Future onSave() async { updateData(); - // await _zuriApi.patch( - // 'organizations/$orgId/members/profile', - // body: userModel.toMap(), - // token: token, - // ); + await _zuriApi.patch( + 'organizations/$orgId/members/$userId/profile', + body: userModel.toMap(), + token: token, + ); _userService.setUserDetails(userModel); _navigationService.back(); } diff --git a/lib/ui/view/organization/create_organization/company.dart b/lib/ui/view/organization/create_organization/company.dart index 6e3570fc7..c569e052a 100644 --- a/lib/ui/view/organization/create_organization/company.dart +++ b/lib/ui/view/organization/create_organization/company.dart @@ -47,8 +47,8 @@ class CompanyPage extends ViewModelWidget { ), ), BorderTextField( - controller: viewModel.companyController, hint: CompanyNameHint, + onChanged: (val) => viewModel.company = val, ), UIHelper.verticalSpaceMedium, LongButton( diff --git a/lib/ui/view/organization/create_organization/create_organization.dart b/lib/ui/view/organization/create_organization/create_organization.dart index aec7ddeaf..169ebebd4 100644 --- a/lib/ui/view/organization/create_organization/create_organization.dart +++ b/lib/ui/view/organization/create_organization/create_organization.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hng/constants/app_strings.dart'; import 'package:hng/ui/shared/colors.dart'; import 'package:stacked/stacked.dart'; @@ -8,22 +9,22 @@ import 'company.dart'; import 'invite.dart'; import 'project.dart'; -class CreateOrganization extends StatelessWidget { +class CreateOrganization extends HookWidget { //The users email address can be passed in here from the api or database final String email; const CreateOrganization({Key? key, required this.email}) : super(key: key); @override Widget build(BuildContext context) { + final pageController = usePageController(); return ViewModelBuilder.reactive( viewModelBuilder: () => CreateOrganizationViewModel(), + onModelReady: (model) => model.init(pageController,email), builder: (context, model, child) => Scaffold( appBar: AppBar( backgroundColor: Colors.white, leading: TextButton( - onPressed: () { - Navigator.pop(context); - }, + onPressed: () => model.back(), child: Image.asset(CancelLogo), ), ), @@ -35,7 +36,7 @@ class CreateOrganization extends StatelessWidget { top: 0, bottom: 0, child: PageView( - controller: model.pageController, + controller: pageController, children: [ CompanyPage(email: email), const ProjectPage(), diff --git a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart index f4b907d36..fe69ec8c1 100644 --- a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart +++ b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart @@ -1,6 +1,7 @@ -import 'package:flutter/cupertino.dart'; +import 'package:flutter/animation.dart'; import 'package:hng/app/app.logger.dart'; import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -15,37 +16,42 @@ class CreateOrganizationViewModel extends BaseViewModel { final log = getLogger("CreateOrganizationViewModel"); final _navigation = locator(); final snackbar = locator(); + final _channelApiService = locator(); // final _storage = locator(); final _api = OrganizationApiService(); - final companyController = TextEditingController(); - final projectController = TextEditingController(); - final inviteController = TextEditingController(); + String company = ''; + String project = ''; + String invite = ''; bool? _checkBoxVal = false; late OrganizationModel? org; - final pageController = PageController(); + // ignore_for_file: prefer_typing_uninitialized_variables + late final pageController; + late final email; - // String? get userEmail => _storage.getString(StorageKeys.currentUserEmail); - // String get anotherEmail => _anotherEmail; + void init(dynamic val, String _email) { + pageController = val; + email = _email; + } + + void back() => _navigation.back(); - // void onEmailTap(WorkspaceSwitchMethod method) { - // switch (method) { - // case WorkspaceSwitchMethod.SignIn: - // navigateToWorkSpaceUrl(); - // break; - // case WorkspaceSwitchMethod.Create: + void next() { + pageController.nextPage( + duration: const Duration(seconds: 1), + curve: Curves.ease, + ); + } - // // TODO: Handle this case. - // break; - // case WorkspaceSwitchMethod.Join: - // navigateToWorkSpaceUrl(); - // break; - // } - // } + void onCheckBoxChanged(bool? value) { + _checkBoxVal = value; + notifyListeners(); + } - // void navigateToWorkSpaceUrl() { - // _navigation.navigateTo(Routes.workspaceUrlView); - // } + void onInviteTap() { + snackbar.showCustomSnackBar( + message: ComingSoon, variant: SnackbarType.failure); + } Future createOrganization( String email, String name) async { @@ -55,6 +61,11 @@ class CreateOrganizationViewModel extends BaseViewModel { await _api.updateOrgName(id, name); await _api.updateOrgUrl(id, '$organization.zurichat.com'); // await _api.updateOrgLogo(id, org.logoUrl!); + if (id.isEmpty) { + snackbar.showCustomSnackBar( + message: errorOccurred, variant: SnackbarType.failure); + return null; + } return OrganizationModel( id: id, name: name, @@ -70,52 +81,56 @@ class CreateOrganizationViewModel extends BaseViewModel { } } - void onCheckBoxChanged(bool? value) { - _checkBoxVal = value; - notifyListeners(); - } - - bool? get checkBoxVal => _checkBoxVal; - - void onInviteTap() { - snackbar.showCustomSnackBar( - message: ComingSoon, variant: SnackbarType.failure); - } - Future onCompanyNext(String email) async { - if (companyController.text.isEmpty) { + if (company.isEmpty) { return snackbar.showCustomSnackBar( message: fillAllFields, variant: SnackbarType.failure); } setBusy(true); - org = await createOrganization(email, companyController.text); + org = await createOrganization(email, company); setBusy(false); - next(); + if (org != null) next(); } - void next() { - pageController.nextPage( - duration: const Duration(seconds: 1), - curve: Curves.ease, + Future addProject() async { + if (project.isEmpty) { + return snackbar.showCustomSnackBar( + message: fillAllFields, variant: SnackbarType.failure); + } + final res = await _channelApiService.createChannels( + name: project, + description: 'First channel for your organization', + private: false, + email: email!, + id: org!.id!, ); + + if (res) { + next(); + } else { + return snackbar.showCustomSnackBar( + message: errorOccurred, variant: SnackbarType.failure); + } } Future addTeammates() async { - if (inviteController.text.isEmpty) { + if (invite.isEmpty) { return snackbar.showCustomSnackBar( message: fillAllFields, variant: SnackbarType.failure); } if (org == null) { - log.i('org is null oooo'); + log.e('Org is null'); return snackbar.showCustomSnackBar( message: errorOccurred, variant: SnackbarType.failure, ); } setBusy(true); - await _api.addMemberToOrganization(org!.id!, inviteController.text); + await _api.addMemberToOrganization(org!.id!, invite); setBusy(false); _navigation .popUntil((route) => route.settings.name == Routes.organizationView); } + + bool? get checkBoxVal => _checkBoxVal; } diff --git a/lib/ui/view/organization/create_organization/invite.dart b/lib/ui/view/organization/create_organization/invite.dart index 064671893..b8b72cf11 100644 --- a/lib/ui/view/organization/create_organization/invite.dart +++ b/lib/ui/view/organization/create_organization/invite.dart @@ -74,8 +74,8 @@ class InvitePage extends ViewModelWidget { ), ), BorderTextField( - controller: viewModel.inviteController, hint: SampleEmail, + onChanged: (val) => viewModel.invite = val, ), const InviteButton(), UIHelper.verticalSpaceMedium, diff --git a/lib/ui/view/organization/create_organization/project.dart b/lib/ui/view/organization/create_organization/project.dart index 6e2f1990c..2e40fa415 100644 --- a/lib/ui/view/organization/create_organization/project.dart +++ b/lib/ui/view/organization/create_organization/project.dart @@ -50,7 +50,7 @@ class ProjectPage extends ViewModelWidget { ), UIHelper.verticalSpaceMedium, LongButton( - onPressed: () => viewModel.next(), label: 'Next'), + onPressed: () => viewModel.addProject(), label: 'Next'), const Spacer(flex: 3), ], ), @@ -73,7 +73,7 @@ class TextForm extends HookViewModelWidget { BuildContext context, CreateOrganizationViewModel viewModel) { return Center( child: TextField( - controller: viewModel.projectController, + // controller: viewModel.projectController, maxLength: wordCount, decoration: InputDecoration( hintText: hintText, @@ -105,7 +105,7 @@ class TextForm extends HookViewModelWidget { ), errorBorder: InputBorder.none, ), - onChanged: (value) {}, + onChanged: (val) => viewModel.project = val, ), ); } diff --git a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart index 897e02db0..4dd284942 100644 --- a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart +++ b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart @@ -66,7 +66,8 @@ class UseDifferentEmailView extends StatelessWidget { ), ) ], - ) + ), + const Spacer(), ], ), ), diff --git a/lib/ui/view/organization/organization_view/organization_viewmodel.dart b/lib/ui/view/organization/organization_view/organization_viewmodel.dart index 6c3b26066..90b0081be 100644 --- a/lib/ui/view/organization/organization_view/organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_view/organization_viewmodel.dart @@ -131,7 +131,7 @@ class OrganizationViewModel extends BaseViewModel { try { setBusy(true); - var orgId = currentOrgId ?? '61459d8e62688da5302acdb1'; + var orgId = currentOrgId ?? ''; // ?? '61459d8e62688da5302acdb1'; if (orgId.isNotEmpty) { final orgMemberList = await api.getOrganizationMemberList(orgId); diff --git a/lib/ui/view/organization/select_email/select_email_view.dart b/lib/ui/view/organization/select_email/select_email_view.dart index cea114d68..f84be7b73 100644 --- a/lib/ui/view/organization/select_email/select_email_view.dart +++ b/lib/ui/view/organization/select_email/select_email_view.dart @@ -30,8 +30,8 @@ class SelectEmail extends StatelessWidget { ), body: Container( margin: const EdgeInsets.all(16), - height: 172.0, - width: 395.0, + // height: 172.0, + // width: 395.0, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(2.0), @@ -44,6 +44,7 @@ class SelectEmail extends StatelessWidget { ]), child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, children: [ Padding( padding: From 1e68b2d33d0524646f25ccc3d5f61c642342435b Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Thu, 7 Oct 2021 23:41:26 +0100 Subject: [PATCH 03/20] Edit profile done --- lib/constants/app_strings.dart | 1 + lib/models/organization_model.dart | 5 +- lib/models/user_model.dart | 7 ++ lib/services/user_service.dart | 6 + lib/ui/nav_pages/home_page/home_page.dart | 1 - .../home_page/home_page_viewmodel.dart | 12 -- .../you_page/you_page_viewmodel.dart | 12 +- .../custom_user_bottom_sheet_viewmodel.dart | 9 +- .../view/edit_profile/edit_profile_view.dart | 5 +- .../edit_profile/edit_profile_viewmodel.dart | 54 +++++++-- .../widget/edit_profile_body.dart | 11 +- .../create_organization_viewmodel.dart | 1 + .../organization_view/organization_view.dart | 2 +- .../organization_viewmodel.dart | 3 +- .../select_email/select_email_view.dart | 110 ++++++++++-------- lib/utilities/storage_keys.dart | 1 + test/helpers/test_helpers.mocks.dart | 19 ++- 17 files changed, 168 insertions(+), 91 deletions(-) diff --git a/lib/constants/app_strings.dart b/lib/constants/app_strings.dart index 0e80f6c11..a022d2f8c 100644 --- a/lib/constants/app_strings.dart +++ b/lib/constants/app_strings.dart @@ -13,6 +13,7 @@ const String invalidEmailFormat = 'Invalid email format'; const String passwordsMustMatch = 'Passwords do not match'; const String passwordUpdated = 'Password Successfully Updated'; const String passwordNotUpdated = 'Password could not be updated'; +const String profileUpdated = 'Profile Successfully Updated'; const String errorOccurred = 'An Error Occurred'; const String errorOTP = 'OTP could not be validated'; const String wrongOTP = 'Wrong OTP, please check again'; diff --git a/lib/models/organization_model.dart b/lib/models/organization_model.dart index 4183c83d0..b33e6f8d1 100644 --- a/lib/models/organization_model.dart +++ b/lib/models/organization_model.dart @@ -6,6 +6,7 @@ class OrganizationModel { final String? logoUrl; final bool? isOwner; final int? noOfMembers; + final String? userIdInOrg; OrganizationModel({ required this.id, @@ -15,6 +16,7 @@ class OrganizationModel { required this.logoUrl, required this.isOwner, required this.noOfMembers, + required this.userIdInOrg, }); factory OrganizationModel.fromJson(Map json) { @@ -25,7 +27,8 @@ class OrganizationModel { time: json['created_at'], organizationUrl: json['workspace_url'], noOfMembers: json['no_of_members'], - isOwner: json['isOwner']); + isOwner: json['isOwner'], + userIdInOrg: json['member_id'],); } String get initials { diff --git a/lib/models/user_model.dart b/lib/models/user_model.dart index 16ada19f1..bf0b06361 100644 --- a/lib/models/user_model.dart +++ b/lib/models/user_model.dart @@ -9,6 +9,8 @@ class UserModel { String? timezone; String? createdAt; String? updatedAt; + String? bio; + String? imageUrl; UserModel({ this.userId, @@ -21,6 +23,8 @@ class UserModel { this.timezone, this.createdAt, this.updatedAt, + this.bio, + this.imageUrl, }); String? get fullName => '$firstName $lastName'; @@ -37,6 +41,7 @@ class UserModel { 'time_zone': timezone, 'created_at': createdAt, 'updated_at': updatedAt, + 'bio': bio, }; } @@ -52,6 +57,8 @@ class UserModel { timezone: map['time_zone'], createdAt: map['created_at'], updatedAt: map['updated_at'], + bio: map['bio'], + imageUrl: map['image_url'], ); } diff --git a/lib/services/user_service.dart b/lib/services/user_service.dart index 0a6e73397..b8ac239f4 100644 --- a/lib/services/user_service.dart +++ b/lib/services/user_service.dart @@ -75,6 +75,12 @@ class UserService { return _userId; } + String get memberId { + _userId = _sharedPrefs.getString(StorageKeys.idInOrganization) ?? ''; + //You can perform other function before returning + return _userId; + } + String get userEmail { _userEmail = _sharedPrefs.getString(StorageKeys.currentUserEmail) ?? ''; //You can perform other function before returning diff --git a/lib/ui/nav_pages/home_page/home_page.dart b/lib/ui/nav_pages/home_page/home_page.dart index 6debfba36..08617a5dd 100644 --- a/lib/ui/nav_pages/home_page/home_page.dart +++ b/lib/ui/nav_pages/home_page/home_page.dart @@ -20,7 +20,6 @@ class HomePage extends StatelessWidget { model.getDmAndChannelsList(); model.getNewChannelStream(); model.listenToNotificationTap(); - model.fetchUserDetails(); }, viewModelBuilder: () => HomePageViewModel(), builder: (context, vmodel, child) => Scaffold( diff --git a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart index 9c3a13f34..255c1ae43 100644 --- a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart +++ b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart @@ -5,7 +5,6 @@ import 'package:hng/app/app.router.dart'; import 'package:hng/constants/app_strings.dart'; import 'package:hng/models/channel_members.dart'; import 'package:hng/models/channel_model.dart'; -import 'package:hng/models/user_model.dart'; import 'package:hng/package/base/server-request/api/zuri_api.dart'; import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; @@ -186,17 +185,6 @@ class HomePageViewModel extends StreamViewModel { _centrifugeService.subscribe(channelSockId); } - void fetchUserDetails() async { - try { - final response = await zuriApi - .get('organizations/$orgId/members?query=$email', token: token); - final _userModel = - UserModel.fromJson((response!.data['data'] as List).first); - userService.setUserDetails(_userModel); - } catch (e) { - log.e(e.toString()); - } - } // listenToChannelsChange() { // _channelsApiService.onChange.stream.listen((event) { // getDmAndChannelsList(); diff --git a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart index 991eb4a50..8344e29d9 100644 --- a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart +++ b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart @@ -14,13 +14,21 @@ class YouPageViewModel extends BaseViewModel { final _bottomSheetService = locator(); final _userService = locator(); - String get username => _userService.userDetails?.displayName ?? PaulEke; + String get username => + (_userService.userDetails?.displayName?.isNotEmpty ?? false + ? _userService.userDetails?.displayName + : _userService.userDetails?.fullName) ?? + PaulEke; String profileImage = ZuriAppbarLogo; String currentStatus = Active; String otherStatus = Away; Future editProfile() async { - await _navigationService.navigateTo(Routes.editProfileView); + await _navigationService.navigateTo( + Routes.editProfileView, + arguments: EditProfileViewArguments(user: _userService.userDetails!), + ); + notifyListeners(); } Future pauseNotifications() async { diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart index ae8a1564d..91c6fb340 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart @@ -30,17 +30,16 @@ class CustomUserBottomSheetViewModel extends FutureViewModel { @override Future futureToRun() async { try { - final response = - await _zuriApi.get('organizations/$orgId/members?query=$email', - token: token); - _userModel = UserModel.fromJson((response!.data['data'] as List).first); + final response = await _zuriApi + .get('organizations/$orgId/members/$userID', token: token); + _userModel = UserModel.fromJson(response!.data['data']); _userService.setUserDetails(_userModel!); } catch (e) { _log.e(e.toString()); } } - String? get userID => _userService.userId; + String? get userID => _userService.memberId; String? get token => _userService.authToken; String? get orgId => _userService.currentOrgId; String? get email => _userService.userEmail; diff --git a/lib/ui/view/edit_profile/edit_profile_view.dart b/lib/ui/view/edit_profile/edit_profile_view.dart index c55b2573c..0dae640d8 100644 --- a/lib/ui/view/edit_profile/edit_profile_view.dart +++ b/lib/ui/view/edit_profile/edit_profile_view.dart @@ -34,7 +34,10 @@ class EditProfileView extends StatelessWidget { onPressed: () => viewModel.onSave(), child: Text( Save.toUpperCase(), - style: AppTextStyles.body1Bold, + style: AppTextStyles.body1Bold.copyWith( + color: viewModel.hasDataChanged + ? AppColors.deepBlackColor + : AppColors.zuriGrey), ), ), ], diff --git a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart index d72f92070..2e26fc651 100644 --- a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart +++ b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart @@ -1,22 +1,26 @@ import 'package:hng/app/app.locator.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:hng/models/user_model.dart'; import 'package:hng/package/base/server-request/api/zuri_api.dart'; import 'package:hng/services/user_service.dart'; import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/mixins/validators_mixin.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; //TODO refactor entire View Model, write as a Future View Model -class EditProfileViewModel extends BaseViewModel { +class EditProfileViewModel extends BaseViewModel with ValidatorMixin { final _navigationService = locator(); final _userService = locator(); + final _snackbarService = locator(); final _zuriApi = ZuriApi(coreBaseUrl); late UserModel userModel; String fullName = ''; String phone = ''; - String track = ''; + String bio = ''; String displayName = ''; void navigateBack() { @@ -25,36 +29,68 @@ class EditProfileViewModel extends BaseViewModel { void onInit(UserModel user) { userModel = user; + fullName = user.fullName ?? ''; + phone = user.phoneNumber ?? ''; + displayName = user.displayName ?? ''; + bio = user.bio ?? ''; } + void setState() => notifyListeners(); + UserModel updateData() { + if (validateNotEmptyField(fullName) != null) { + _snackbarService.showCustomSnackBar( + message: 'Fullname cannot be null', variant: SnackbarType.failure); + } + fullName = fullName.trim(); userModel ..firstName = fullName.isNotEmpty ? fullName.split(" ").first : userModel.firstName ..lastName = fullName.isNotEmpty ? fullName.split(" ").last : userModel.lastName - ..displayName = - displayName.isNotEmpty ? displayName : userModel.displayName - ..phoneNumber = phone.isNotEmpty ? phone : userModel.phoneNumber; + ..displayName = displayName + ..bio = bio + ..phoneNumber = phone; return userModel; } Future onSave() async { + if (!hasDataChanged) { + return; + } updateData(); - await _zuriApi.patch( + final res = await _zuriApi.patch( 'organizations/$orgId/members/$userId/profile', body: userModel.toMap(), token: token, ); - _userService.setUserDetails(userModel); - _navigationService.back(); + if (res?.statusCode == 200) { + _snackbarService.showCustomSnackBar( + message: profileUpdated, variant: SnackbarType.success); + _userService.setUserDetails(userModel); + close(); + } else { + _snackbarService.showCustomSnackBar( + message: errorOccurred, variant: SnackbarType.failure); + } } void close() => _navigationService.back(); - String? get userId => _userService.userId; + String? get userId => _userService.memberId; String? get orgId => _userService.currentOrgId; String? get email => _userService.userEmail; String? get token => _userService.authToken; + bool get hasDataChanged { + if (displayName != userModel.displayName || + bio != userModel.bio || + phone != userModel.phoneNumber || + (fullName.isNotEmpty && fullName != userModel.fullName)) { + return true; + } + else { + return false; + } + } } diff --git a/lib/ui/view/edit_profile/widget/edit_profile_body.dart b/lib/ui/view/edit_profile/widget/edit_profile_body.dart index 0079b2d36..1e37e004a 100644 --- a/lib/ui/view/edit_profile/widget/edit_profile_body.dart +++ b/lib/ui/view/edit_profile/widget/edit_profile_body.dart @@ -45,6 +45,7 @@ class Body extends ViewModelWidget { icon: Icon( Icons.add_a_photo, size: _size.width * 0.06, + color: AppColors.whiteColor, ), ), ), @@ -56,6 +57,7 @@ class Body extends ViewModelWidget { initialValue: viewModel.userModel.fullName, onChanged: (value) { viewModel.fullName = value; + viewModel.setState(); }, decoration: const InputDecoration( labelText: FullName, @@ -69,6 +71,7 @@ class Body extends ViewModelWidget { initialValue: viewModel.userModel.displayName, onChanged: (value) { viewModel.displayName = value; + viewModel.setState(); }, decoration: const InputDecoration( labelText: DisplayName, @@ -77,11 +80,10 @@ class Body extends ViewModelWidget { ), ), TextFormField( - initialValue: viewModel.userModel.status == null - ? '' - : viewModel.userModel.status.toString(), + initialValue: viewModel.userModel.bio, onChanged: (value) { - viewModel.track = value; + viewModel.bio = value; + viewModel.setState(); }, decoration: const InputDecoration( labelText: Track, helperText: TrackDescription), @@ -90,6 +92,7 @@ class Body extends ViewModelWidget { initialValue: viewModel.userModel.phoneNumber, onChanged: (value) { viewModel.phone = value; + viewModel.setState(); }, decoration: const InputDecoration( labelText: Phone, helperText: PhoneDescription), diff --git a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart index fe69ec8c1..58f96935c 100644 --- a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart +++ b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart @@ -74,6 +74,7 @@ class CreateOrganizationViewModel extends BaseViewModel { time: null, isOwner: true, noOfMembers: 0, + userIdInOrg: '' ); } catch (e) { log.e(e.toString()); diff --git a/lib/ui/view/organization/organization_view/organization_view.dart b/lib/ui/view/organization/organization_view/organization_view.dart index 18fcac1ca..34a7142b6 100644 --- a/lib/ui/view/organization/organization_view/organization_view.dart +++ b/lib/ui/view/organization/organization_view/organization_view.dart @@ -125,7 +125,7 @@ class OrganizationTile extends ViewModelWidget { @override Widget build(BuildContext context, OrganizationViewModel viewModel) { return ListTile( - onTap: () => viewModel.onTap(org.id, org.name, org.organizationUrl), + onTap: () => viewModel.onTap(org.id, org.name, org.organizationUrl, org.userIdInOrg), leading: Container( height: MediaQuery.of(context).size.height * 0.06, width: MediaQuery.of(context).size.height * 0.06, diff --git a/lib/ui/view/organization/organization_view/organization_viewmodel.dart b/lib/ui/view/organization/organization_view/organization_viewmodel.dart index 90b0081be..921aa56f3 100644 --- a/lib/ui/view/organization/organization_view/organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_view/organization_viewmodel.dart @@ -79,7 +79,7 @@ class OrganizationViewModel extends BaseViewModel { organizations.retainWhere((e) => ids.any((id) => id == e.id)); } - Future onTap(String? id, String? name, String? url) async { + Future onTap(String? id, String? name, String? url, String? memberId) async { try { if (id == currentOrgId) { navigation.replaceWith(Routes.navBarView); @@ -88,6 +88,7 @@ class OrganizationViewModel extends BaseViewModel { await checkSnackBarConnectivity(); await storageService.setString(StorageKeys.currentOrgId, id!); + await storageService.setString(StorageKeys.idInOrganization, memberId!); snackbar.showCustomSnackBar( duration: const Duration(seconds: 3), variant: SnackbarType.success, diff --git a/lib/ui/view/organization/select_email/select_email_view.dart b/lib/ui/view/organization/select_email/select_email_view.dart index f84be7b73..c00a4493c 100644 --- a/lib/ui/view/organization/select_email/select_email_view.dart +++ b/lib/ui/view/organization/select_email/select_email_view.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../../utilities/enums.dart'; @@ -7,7 +8,6 @@ import 'select_email_viewmodel.dart'; class SelectEmail extends StatelessWidget { final OrganizationSwitchMethod method; - //The users email address can be passed in here from the api or database const SelectEmail({Key? key, required this.method}) : super(key: key); @@ -17,34 +17,27 @@ class SelectEmail extends StatelessWidget { return ViewModelBuilder.nonReactive( viewModelBuilder: () => SelectEmailViewModel(), builder: (context, model, child) => Scaffold( - appBar: AppBar( - leading: IconButton( - icon: const Icon(Icons.arrow_back_ios), - color: AppColors.deepBlackColor, - onPressed: model.back), - title: Text( - model.getScreenTitle(method), - style: AppTextStyles.heading4, - ), - backgroundColor: Colors.white, + appBar: ZuriAppBar( + title: model.getScreenTitle(method), + whiteBackground: true, + leading: Icons.arrow_back_ios_outlined, + leadingPress: () => model.back(), ), body: Container( - margin: const EdgeInsets.all(16), - // height: 172.0, - // width: 395.0, + margin: const EdgeInsets.fromLTRB(8.0, 20.0, 8.0, 0.0), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(2.0), boxShadow: [ BoxShadow( - color: Colors.grey.withOpacity(0.5), + color: AppColors.greyColor.withOpacity(0.5), spreadRadius: 1, blurRadius: 5, ), ]), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: @@ -57,49 +50,64 @@ class SelectEmail extends StatelessWidget { fontWeight: FontWeight.bold), ), ), - Padding( - padding: const EdgeInsets.only(left: 8, top: 24), - child: Row( - children: [ - const Icon( - Icons.email_outlined, - size: 20, - color: AppColors.deepBlackColor, - ), - const SizedBox(width: 16), - GestureDetector( - onTap: () => model.onEmailTap(method), - child: Text( - model.userEmail ?? '', - style: AppTextStyles.body3Medium.copyWith( - fontSize: 16, color: AppColors.zuriTextBodyColor), + InkWell( + onTap: () { + model.onEmailTap(method); + }, + child: Padding( + padding: + const EdgeInsets.only(left: 17.5, top: 24, bottom: 24), + child: Row( + children: [ + const Icon( + Icons.email_outlined, + size: 20, + color: AppColors.deepBlackColor, + ), + Padding( + padding: const EdgeInsets.only(left: 25.5), + child: Text( + model.userEmail ?? '', + style: const TextStyle( + color: AppColors.deepBlackColor, fontSize: 14), + ), ), - ), - ], + ], + ), ), ), const Padding( - padding: EdgeInsets.symmetric(vertical: 16), - child: Divider(color: AppColors.dividerColor), + padding: EdgeInsets.only(left: 57.0), + child: Divider( + thickness: 1, + height: 9, + color: AppColors.greyishColor, + ), ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), - child: Row( - children: [ - const Icon( - Icons.email_outlined, - size: 20, - color: AppColors.deepBlackColor, - ), - const SizedBox(width: 16), - GestureDetector( + InkWell( + onTap: () => model.navigateToUseDifferentEmailView(), + child: Padding( + padding: + const EdgeInsets.only(left: 17.5, top: 24, bottom: 24), + child: Row( + children: [ + const Icon( + Icons.email_outlined, + size: 20, + color: AppColors.deepBlackColor, + ), + Padding( + padding: const EdgeInsets.only(left: 25.5), child: Text( model.anotherEmail, - style: AppTextStyles.body3Medium.copyWith( - fontSize: 16, color: AppColors.zuriTextBodyColor), + style: const TextStyle( + color: AppColors.deepBlackColor, + fontSize: 14, + ), ), - onTap: () => model.navigateToUseDifferentEmailView()) - ], + ), + ], + ), ), ), ], diff --git a/lib/utilities/storage_keys.dart b/lib/utilities/storage_keys.dart index 1e51a475f..d23effc58 100644 --- a/lib/utilities/storage_keys.dart +++ b/lib/utilities/storage_keys.dart @@ -18,4 +18,5 @@ class StorageKeys { static const currentChannelId = 'current_channel_id'; static const organizationMemberList = 'organization_member_list'; static const savedItem = 'saved_item'; + static const idInOrganization = 'id_in_organization'; } diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index 36a534542..0e4198d83 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -90,6 +90,10 @@ class MockUserService extends _i1.Mock implements _i7.UserService { (super.noSuchMethod(Invocation.getter(#userId), returnValue: '') as String); @override + String get memberId => + (super.noSuchMethod(Invocation.getter(#memberId), returnValue: '') + as String); + @override String get userEmail => (super.noSuchMethod(Invocation.getter(#userEmail), returnValue: '') as String); @@ -740,10 +744,19 @@ class MockChannelsApiService extends _i1.Mock as _i2.Future>); @override _i2.Future createChannels( - {String? name, String? description, bool? private}) => + {String? name, + String? description, + bool? private, + String? email, + String? id}) => (super.noSuchMethod( - Invocation.method(#createChannels, [], - {#name: name, #description: description, #private: private}), + Invocation.method(#createChannels, [], { + #name: name, + #description: description, + #private: private, + #email: email, + #id: id + }), returnValue: Future.value(false)) as _i2.Future); @override _i2.Future deleteChannel(String? orgId, String? channelId) => From 443dd0058e40fe45d561f5aacfbe1815095d7d0b Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Fri, 8 Oct 2021 02:40:09 +0100 Subject: [PATCH 04/20] resolved changes requested --- .../create_organization/company.dart | 18 ++++-- .../create_organization.dart | 12 ++-- .../create_organization_viewmodel.dart | 60 +++++++++---------- .../create_organization/invite.dart | 11 +++- .../create_organization/project.dart | 26 ++++++-- 5 files changed, 80 insertions(+), 47 deletions(-) diff --git a/lib/ui/view/organization/create_organization/company.dart b/lib/ui/view/organization/create_organization/company.dart index c569e052a..fbe990845 100644 --- a/lib/ui/view/organization/create_organization/company.dart +++ b/lib/ui/view/organization/create_organization/company.dart @@ -9,12 +9,19 @@ import 'package:stacked/stacked.dart'; import 'create_organization_viewmodel.dart'; class CompanyPage extends ViewModelWidget { - final String email; + final PageController pageController; const CompanyPage({ Key? key, - required this.email, + required this.pageController, }) : super(key: key); + void next() { + pageController.nextPage( + duration: const Duration(seconds: 1), + curve: Curves.ease, + ); + } + @override Widget build(BuildContext context, CreateOrganizationViewModel viewModel) { return LayoutBuilder( @@ -48,11 +55,14 @@ class CompanyPage extends ViewModelWidget { ), BorderTextField( hint: CompanyNameHint, - onChanged: (val) => viewModel.company = val, + onChanged: (val) => viewModel.updateData(comp: val), ), UIHelper.verticalSpaceMedium, LongButton( - onPressed: () => viewModel.onCompanyNext(email), + onPressed: () async { + final res = await viewModel.onCompanyNext(); + if (res) next(); + }, label: 'Next'), const SizedBox(height: 15), const Text.rich( diff --git a/lib/ui/view/organization/create_organization/create_organization.dart b/lib/ui/view/organization/create_organization/create_organization.dart index 169ebebd4..a0519007e 100644 --- a/lib/ui/view/organization/create_organization/create_organization.dart +++ b/lib/ui/view/organization/create_organization/create_organization.dart @@ -19,10 +19,10 @@ class CreateOrganization extends HookWidget { final pageController = usePageController(); return ViewModelBuilder.reactive( viewModelBuilder: () => CreateOrganizationViewModel(), - onModelReady: (model) => model.init(pageController,email), + onModelReady: (model) => model.init(email), builder: (context, model, child) => Scaffold( appBar: AppBar( - backgroundColor: Colors.white, + backgroundColor: AppColors.whiteColor, leading: TextButton( onPressed: () => model.back(), child: Image.asset(CancelLogo), @@ -36,11 +36,11 @@ class CreateOrganization extends HookWidget { top: 0, bottom: 0, child: PageView( - controller: pageController, + controller: pageController, children: [ - CompanyPage(email: email), - const ProjectPage(), - const InvitePage(), + CompanyPage(pageController: pageController), + ProjectPage(pageController: pageController), + InvitePage(pageController: pageController), ], ), ), diff --git a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart index 58f96935c..a5edfd024 100644 --- a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart +++ b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart @@ -1,4 +1,3 @@ -import 'package:flutter/animation.dart'; import 'package:hng/app/app.logger.dart'; import 'package:hng/constants/app_strings.dart'; import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; @@ -10,14 +9,12 @@ import '../../../../app/app.router.dart'; import '../../../../models/organization_model.dart'; import '../../../../package/base/server-request/organization_request/organization_api_service.dart'; import '../../../../utilities/enums.dart'; -// import '../../../../services/local_storage_services.dart'; class CreateOrganizationViewModel extends BaseViewModel { final log = getLogger("CreateOrganizationViewModel"); final _navigation = locator(); final snackbar = locator(); final _channelApiService = locator(); - // final _storage = locator(); final _api = OrganizationApiService(); String company = ''; String project = ''; @@ -25,24 +22,14 @@ class CreateOrganizationViewModel extends BaseViewModel { bool? _checkBoxVal = false; late OrganizationModel? org; - // ignore_for_file: prefer_typing_uninitialized_variables - late final pageController; - late final email; + late String email = ''; - void init(dynamic val, String _email) { - pageController = val; + void init(String _email) { email = _email; } void back() => _navigation.back(); - void next() { - pageController.nextPage( - duration: const Duration(seconds: 1), - curve: Curves.ease, - ); - } - void onCheckBoxChanged(bool? value) { _checkBoxVal = value; notifyListeners(); @@ -53,6 +40,12 @@ class CreateOrganizationViewModel extends BaseViewModel { message: ComingSoon, variant: SnackbarType.failure); } + void updateData({String? comp, String? proj, String? invi}) { + if (comp != null) company = comp; + if (proj != null) project = proj; + if (invi != null) invite = invi; + } + Future createOrganization( String email, String name) async { try { @@ -67,36 +60,40 @@ class CreateOrganizationViewModel extends BaseViewModel { return null; } return OrganizationModel( - id: id, - name: name, - organizationUrl: '$organization.zurichat.com', - logoUrl: null, - time: null, - isOwner: true, - noOfMembers: 0, - userIdInOrg: '' - ); + id: id, + name: name, + organizationUrl: '$organization.zurichat.com', + logoUrl: null, + time: null, + isOwner: true, + noOfMembers: 0, + userIdInOrg: ''); } catch (e) { log.e(e.toString()); snackbar.showSnackbar(message: e.toString()); } } - Future onCompanyNext(String email) async { + Future onCompanyNext() async { if (company.isEmpty) { - return snackbar.showCustomSnackBar( + snackbar.showCustomSnackBar( message: fillAllFields, variant: SnackbarType.failure); + return false; } setBusy(true); org = await createOrganization(email, company); setBusy(false); - if (org != null) next(); + if (org != null) { + return true; + } + return false; } - Future addProject() async { + Future addProject() async { if (project.isEmpty) { - return snackbar.showCustomSnackBar( + snackbar.showCustomSnackBar( message: fillAllFields, variant: SnackbarType.failure); + return false; } final res = await _channelApiService.createChannels( name: project, @@ -107,10 +104,11 @@ class CreateOrganizationViewModel extends BaseViewModel { ); if (res) { - next(); + return true; } else { - return snackbar.showCustomSnackBar( + snackbar.showCustomSnackBar( message: errorOccurred, variant: SnackbarType.failure); + return false; } } diff --git a/lib/ui/view/organization/create_organization/invite.dart b/lib/ui/view/organization/create_organization/invite.dart index b8b72cf11..65d51c9e4 100644 --- a/lib/ui/view/organization/create_organization/invite.dart +++ b/lib/ui/view/organization/create_organization/invite.dart @@ -12,10 +12,19 @@ import '../../../shared/ui_helpers.dart'; import 'create_organization_viewmodel.dart'; class InvitePage extends ViewModelWidget { + final PageController pageController; const InvitePage({ Key? key, + required this.pageController, }) : super(key: key); + void next() { + pageController.nextPage( + duration: const Duration(seconds: 1), + curve: Curves.ease, + ); + } + @override Widget build(BuildContext context, CreateOrganizationViewModel viewModel) { return LayoutBuilder( @@ -75,7 +84,7 @@ class InvitePage extends ViewModelWidget { ), BorderTextField( hint: SampleEmail, - onChanged: (val) => viewModel.invite = val, + onChanged: (val) => viewModel.updateData(invi: val), ), const InviteButton(), UIHelper.verticalSpaceMedium, diff --git a/lib/ui/view/organization/create_organization/project.dart b/lib/ui/view/organization/create_organization/project.dart index 2e40fa415..6cae12fb9 100644 --- a/lib/ui/view/organization/create_organization/project.dart +++ b/lib/ui/view/organization/create_organization/project.dart @@ -9,10 +9,19 @@ import '../../../shared/ui_helpers.dart'; import 'create_organization_viewmodel.dart'; class ProjectPage extends ViewModelWidget { + final PageController pageController; const ProjectPage({ Key? key, + required this.pageController, }) : super(key: key); + void next() { + pageController.nextPage( + duration: const Duration(seconds: 1), + curve: Curves.ease, + ); + } + @override Widget build(BuildContext context, CreateOrganizationViewModel viewModel) { return LayoutBuilder( @@ -50,7 +59,12 @@ class ProjectPage extends ViewModelWidget { ), UIHelper.verticalSpaceMedium, LongButton( - onPressed: () => viewModel.addProject(), label: 'Next'), + onPressed: () async { + final res = await viewModel.addProject(); + if (res) next(); + }, + label: 'Next', + ), const Spacer(flex: 3), ], ), @@ -66,14 +80,16 @@ class ProjectPage extends ViewModelWidget { class TextForm extends HookViewModelWidget { final int? wordCount; final String hintText; - const TextForm({Key? key, this.wordCount, required this.hintText}) - : super(key: key, reactive: false); + const TextForm({ + Key? key, + this.wordCount, + required this.hintText, + }) : super(key: key, reactive: false); @override Widget buildViewModelWidget( BuildContext context, CreateOrganizationViewModel viewModel) { return Center( child: TextField( - // controller: viewModel.projectController, maxLength: wordCount, decoration: InputDecoration( hintText: hintText, @@ -105,7 +121,7 @@ class TextForm extends HookViewModelWidget { ), errorBorder: InputBorder.none, ), - onChanged: (val) => viewModel.project = val, + onChanged: (val) => viewModel.updateData(proj: val), ), ); } From 322d0e391db0b680bced00733375270a6703f834 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Wed, 13 Oct 2021 09:31:00 +0100 Subject: [PATCH 05/20] Fixed edit profile feature --- lib/ui/nav_pages/home_page/home_page.dart | 1 + .../nav_pages/home_page/home_page_viewmodel.dart | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/ui/nav_pages/home_page/home_page.dart b/lib/ui/nav_pages/home_page/home_page.dart index 08617a5dd..b75c6bf4a 100644 --- a/lib/ui/nav_pages/home_page/home_page.dart +++ b/lib/ui/nav_pages/home_page/home_page.dart @@ -20,6 +20,7 @@ class HomePage extends StatelessWidget { model.getDmAndChannelsList(); model.getNewChannelStream(); model.listenToNotificationTap(); + model.getUserInfo(); }, viewModelBuilder: () => HomePageViewModel(), builder: (context, vmodel, child) => Scaffold( diff --git a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart index 255c1ae43..8b8b2ec9f 100644 --- a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart +++ b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart @@ -5,6 +5,7 @@ import 'package:hng/app/app.router.dart'; import 'package:hng/constants/app_strings.dart'; import 'package:hng/models/channel_members.dart'; import 'package:hng/models/channel_model.dart'; +import 'package:hng/models/user_model.dart'; import 'package:hng/package/base/server-request/api/zuri_api.dart'; import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; @@ -119,6 +120,20 @@ class HomePageViewModel extends StreamViewModel { return connectionStatus; } + Future getUserInfo() async { + try { + final _zuriApi = ZuriApi(coreBaseUrl); + String? userID = userService.memberId; + + final response = await _zuriApi + .get('organizations/$orgId/members/$userID', token: token); + final _userModel = UserModel.fromJson(response!.data['data']); + userService.setUserDetails(_userModel); + } catch (e) { + log.e(e.toString()); + } + } + ///This sets all the expanded list items ///into unreads, channels and dms setAllList() { From 350837b6430ba30252dd96588e1e4863a11eea56 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Wed, 13 Oct 2021 10:29:55 +0100 Subject: [PATCH 06/20] app bundle and package name changed --- android/app/build.gradle | 2 +- lib/app/app.dart | 57 ++++++++--------- lib/general_widgets/custom_channel.dart | 2 +- lib/general_widgets/custom_user.dart | 2 +- lib/general_widgets/custom_user_channel.dart | 2 +- lib/general_widgets/menu_item_tile.dart | 2 +- lib/general_widgets/no_connection_widget.dart | 8 +-- lib/main.dart | 8 +-- .../base/jump_to_request/jump_to_api.dart | 2 +- lib/package/base/server-request/api/api.dart | 8 +-- .../server-request/api/dio_interceptors.dart | 3 +- .../base/server-request/api/zuri_api.dart | 26 ++++---- .../channels/channels_api_service.dart | 19 +++--- .../server-request/dms/dms_api_service.dart | 4 +- .../organization_api_service.dart | 6 +- lib/services/centrifuge_service.dart | 10 +-- lib/services/current_user_profile.dart | 14 ++-- lib/services/local_storage_services.dart | 4 +- lib/services/media_service.dart | 8 +-- lib/services/notification_service.dart | 6 +- lib/services/user_service.dart | 4 +- lib/ui/nav_pages/dm_page/dm_page.dart | 10 +-- .../nav_pages/dm_page/dm_page_viewmodel.dart | 5 +- .../dm_page/dm_search_find_page.dart | 4 +- .../dm_page/widgets/dmmessage_unread.dart | 2 +- .../drafted_message_page.dart | 10 +-- .../drafted_message_page_viewmodel.dart | 2 +- .../widgets/app/data.dart | 2 +- .../nav_pages/home_page/home_item_model.dart | 4 +- lib/ui/nav_pages/home_page/home_page.dart | 20 +++--- .../home_page/home_page_viewmodel.dart | 44 ++++++------- .../widgets/custom_channel_list_tile.dart | 4 +- .../widgets/custom_dm_list_tile.dart | 2 +- .../custom_homepage_section_title.dart | 9 +-- .../widgets/custom_plugin_list_tile.dart | 40 ++++++------ .../home_page/widgets/home_expanded.dart | 10 +-- .../home_page/widgets/home_list_items.dart | 12 ++-- .../home_page/widgets/zuri_logo.dart | 4 +- .../plugin_page/add_plugin_view.dart | 12 ++-- .../plugin_page/edit_plugin_view.dart | 9 ++- .../plugin_page/plugin_intro_page.dart | 12 ++-- .../plugin_page/plugin_page_view.dart | 18 +++--- .../plugin_page/plugin_viewmodel.dart | 8 +-- .../nav_pages/plugin_page/plugins_view.dart | 19 +++--- .../plugin_page/widgets/custom_appbar.dart | 4 +- .../you_page/widgets/profile_page_head.dart | 2 +- .../you_page/widgets/status_form.dart | 2 +- lib/ui/nav_pages/you_page/you_page.dart | 8 +-- .../you_page/you_page_viewmodel.dart | 18 +++--- .../custom_user_bottom_sheet_view.dart | 6 +- .../custom_user_bottom_sheet_viewmodel.dart | 14 ++-- .../widgets/custom_button.dart | 8 +-- .../widgets/custom_profile_tile.dart | 4 +- .../widgets/profile_head.dart | 6 +- .../emoji_picker_bottomsheet_view.dart | 2 +- .../custom_user_bottom_sheet_view.dart | 2 +- .../custom_user_bottom_sheet_viewmodel.dart | 4 +- .../sign_out_bottom_sheet_view.dart | 8 +-- .../sign_out_botton_sheet_viewmodel.dart | 16 ++--- .../widgets/work_space_display_info_view.dart | 2 +- .../thread_options_bottomsheet_view.dart | 6 +- .../bottom_sheets/zuri_chat_bottomsheet.dart | 10 +-- lib/ui/shared/dialogs.dart | 2 +- .../dialogs/delete_draft_alert_dialog.dart | 4 +- lib/ui/shared/dialogs/delete_message.dart | 2 +- .../remind_me_dialog/remind_me_dialog.dart | 10 ++- .../remind_me_dialog_viewmodel.dart | 27 ++++---- .../dialogs/schedule_channel_dialog.dart | 4 +- lib/ui/shared/dialogs/schedule_dialog.dart | 4 +- .../dialogs/select_language_dialog.dart | 2 +- .../shared/dialogs/select_theme_dialog.dart | 2 +- .../shared/dialogs/send_feedback_dialog.dart | 4 +- lib/ui/shared/dialogs/sign_out_dialog.dart | 4 +- lib/ui/shared/dialogs/skin_tone_dialog.dart | 2 +- lib/ui/shared/search_bar.dart | 2 +- lib/ui/shared/setup_bottom_sheet_ui.dart | 8 +-- lib/ui/shared/setup_dialog_ui.dart | 12 ++-- lib/ui/shared/shared.dart | 8 +-- .../text_parser/text_parser_viewmodel.dart | 2 +- .../thread_card/thread_card_view.dart | 10 +-- .../thread_card/thread_card_viewmodel.dart | 8 +-- .../thread_card/widgets/audio_message.dart | 2 +- .../thread_card/widgets/emojis_list.dart | 2 +- .../thread_card/widgets/media_files.dart | 2 +- .../widgets/post_files_display.dart | 10 +-- .../thread_card/widgets/post_replies.dart | 4 +- .../thread_card/widgets/quoted_replies.dart | 4 +- .../thread_card/widgets/snapshot_links.dart | 8 +-- .../widgets/thread_card_channel_main.dart | 16 ++--- .../widgets/thread_card_detail.dart | 12 ++-- .../thread_card/widgets/thread_card_main.dart | 2 +- .../thread_card/widgets/thread_card_post.dart | 50 +++++++-------- lib/ui/shared/text_field.dart | 2 +- lib/ui/shared/text_styles.dart | 2 +- lib/ui/shared/zuri_appbar.dart | 6 +- lib/ui/shared/zuri_loader.dart | 2 +- lib/ui/view/add_people/add_people_view.dart | 4 +- lib/ui/view/advanced/advanced_view.dart | 6 +- .../add_people/channel_add_people_view.dart | 8 +-- .../channel_add_people_viewmodel.dart | 14 ++-- .../channel_info/channel_info_view.dart | 10 +-- .../channel_info/channel_info_view_model.dart | 18 +++--- .../channel_info/widgets/custom_app_bar.dart | 6 +- .../channel_info/widgets/edit_button.dart | 2 +- .../channel_info/widgets/fifth_section.dart | 4 +- .../channel_info/widgets/first_section.dart | 6 +- .../channel_info/widgets/fourth_section.dart | 6 +- .../channel_info/widgets/new_row_tile.dart | 2 +- .../channel_info/widgets/second_section.dart | 4 +- .../channel_info/widgets/seventh_section.dart | 2 +- .../channel_info/widgets/sixth_section.dart | 8 +-- .../channel_info/widgets/third_section.dart | 12 ++-- .../channel/channel_list/channels_view.dart | 6 +- .../channel_list/channels_viewmodel.dart | 18 +++--- .../channel_members/channel_members_list.dart | 14 ++-- .../channel_members_list_model.dart | 4 +- .../channel_notification_view.dart | 8 +-- .../channel_notification_viewmodel.dart | 2 +- .../channel_search/channel_search_view.dart | 2 +- .../channel_search/widgets/app_bar_main.dart | 2 +- .../channel_search/widgets/search_result.dart | 2 +- .../widgets/textfield_style.dart | 2 +- .../channel_view/channel_page_view.dart | 14 ++-- .../channel_view/channel_page_viewmodel.dart | 50 +++++++-------- .../channel_view/widgets/channel_chat.dart | 10 +-- .../channel_view/widgets/channel_intro.dart | 9 +-- .../channel_view/widgets/check_user.dart | 10 +-- .../channel_view/widgets/message_tile.dart | 4 +- .../edit_channel/edit_channel_view.dart | 4 +- .../edit_channel/edit_channel_view_model.dart | 10 +-- .../widgets/edit_channel_appbar.dart | 4 +- .../widgets/edit_channel_headers.dart | 4 +- .../widgets/edit_channel_text_field.dart | 2 +- .../view/channel/new_channel/new_channel.dart | 4 +- .../new_channel/new_channel_viewmodel.dart | 8 +-- .../pinned_messages/pinned_messages_view.dart | 6 +- .../pinned_messages_viewmodel.dart | 10 +-- .../widgets/channel_browser_container.dart | 4 +- lib/ui/view/clear_after/clear_after_view.dart | 4 +- .../clear_after/clear_after_viewmodel.dart | 4 +- .../clear_after/widget/date_and_time.dart | 2 +- .../clear_notification_view.dart | 6 +- .../clear_notification_viewmodel.dart | 2 +- .../create_channel_view.dart | 4 +- .../create_channel_viewmodel.dart | 2 +- .../widgets/custom_text_field.dart | 2 +- .../view/direct_message/direct_message.dart | 4 +- .../direct_message_text_field_hook.dart | 2 +- .../direct_message_viewmodel.dart | 4 +- lib/ui/view/dm_chat_view/dm_jump_to_view.dart | 10 +-- .../dm_chat_view/dm_jump_to_viewmodel.dart | 14 ++-- lib/ui/view/dm_search/dm_search_view.dart | 8 +-- .../view/dm_search/dm_search_viewmodel.dart | 4 +- lib/ui/view/dm_search/dm_search_widgets.dart | 2 +- lib/ui/view/dm_user/dm_user_view.dart | 10 +-- lib/ui/view/dm_user/dm_user_viewmodel.dart | 14 ++-- .../dm_user/dummy_data/models/message.dart | 2 +- .../view/dm_user/dummy_data/models/user.dart | 2 +- .../dm_user/widgets/custom_start_message.dart | 7 +- lib/ui/view/dm_user/widgets/message_view.dart | 2 +- .../dm_user/widgets/online_indicator.dart | 4 +- .../do_not_disturb/do_not_disturb_view.dart | 2 +- .../do_not_disturb_viewmodel.dart | 2 +- lib/ui/view/draft/app/data.dart | 2 +- .../view/draft/app/drafted_item_widget.dart | 58 ++++++++--------- lib/ui/view/draft/draft_view.dart | 14 ++-- lib/ui/view/draft/draft_viewmodel.dart | 64 ++++++++++--------- lib/ui/view/draft/drafts.dart | 49 +++++++------- .../view/edit_profile/edit_profile_view.dart | 10 +-- .../edit_profile/edit_profile_viewmodel.dart | 16 ++--- .../widget/edit_profile_body.dart | 4 +- .../expandable_textfield_screen.dart | 45 ++++++------- ...expandable_textfield_screen_viewmodel.dart | 4 +- .../feed_back_dialog.dart | 2 +- lib/ui/view/file_search/file_search_view.dart | 2 +- .../view/file_search/widgets/search_bar.dart | 2 +- .../forgot_password_email_view.dart | 8 +-- .../forgot_password_email_viewmodel.dart | 20 +++--- .../forgot_password_newview.dart | 8 +-- .../forgot_password_newviewmodel.dart | 20 +++--- .../forgot_password_otpview.dart | 8 +-- .../forgot_password_otpviewmodel.dart | 18 +++--- .../language_and_region_view.dart | 6 +- .../language_and_region_viewmodel.dart | 4 +- lib/ui/view/login/login_view.dart | 6 +- lib/ui/view/login/login_viewmodel.dart | 15 ++--- lib/ui/view/nav_bar/nav_bar_view.dart | 4 +- .../notifications/notifications_view.dart | 10 +-- .../notifications_viewmodel.dart | 2 +- lib/ui/view/onboarding/onboading_view.dart | 2 +- .../add_organization_view.dart | 12 ++-- .../create_organization/company.dart | 2 +- .../create_organization.dart | 4 +- .../create_organization_viewmodel.dart | 6 +- .../create_organization/invite.dart | 2 +- .../create_organization/project.dart | 2 +- .../email_confirmation_view.dart | 2 +- .../email_confirmation_viewmodel.dart | 5 +- .../admin_permissions/create_invite_link.dart | 12 ++-- .../admin_permissions/invite_via_email.dart | 8 +-- .../import_contact.dart | 8 +-- .../invitation_sent.dart | 13 ++-- .../invite_via_email.dart | 8 +-- .../invite_viewmodel.dart | 8 +-- .../organization/new_email/new_email.dart | 2 +- .../different_email_organization_view.dart | 4 +- ...ifferent_email_organization_viewmodel.dart | 8 +-- .../organization_url_view.dart | 4 +- .../organization_view/organization_view.dart | 6 +- .../organization_viewmodel.dart | 10 +-- .../select_email/select_email_view.dart | 2 +- .../select_email/select_email_viewmodel.dart | 2 +- lib/ui/view/otp/otp_view.dart | 4 +- lib/ui/view/otp/otp_viewmodel.dart | 4 +- .../view/password_recovery/new_password.dart | 4 +- .../view/password_recovery/recovery_view.dart | 4 +- .../password_recovery/recovery_viewmodel.dart | 3 +- .../popup_notification.dart | 4 +- lib/ui/view/preference/preference_view.dart | 6 +- .../view/preference/preference_viewmodel.dart | 6 +- .../profile_page/profile_page_viewmodel.dart | 2 +- lib/ui/view/saved_items/saved_items_view.dart | 6 +- .../saved_items/saved_items_viewmodel.dart | 12 ++-- .../widgets/saved_item_background.dart | 6 +- lib/ui/view/set_status/set_status_view.dart | 4 +- lib/ui/view/sign_up/sign_up_view.dart | 4 +- lib/ui/view/sign_up/sign_up_viewmodel.dart | 6 +- lib/ui/view/splashscreen/splashscreen.dart | 2 +- .../splashscreen/splashscreen_viewmodel.dart | 2 +- lib/ui/view/start_dm/start_dm_view.dart | 6 +- lib/ui/view/start_dm/start_dm_viewmodel.dart | 4 +- .../start_dm/widgets/custom_chip_input.dart | 2 +- .../terms_and_conditions_view_model.dart | 2 +- .../threads/all_threads/threads_view.dart | 4 +- .../all_threads/widgets/thread_card.dart | 2 +- lib/ui/view/threads/test_data.dart | 4 +- .../thread_detail/thread_detail_view.dart | 10 +-- .../thread_detail_viewmodel.dart | 59 +++++++++-------- lib/ui/view/user_search/user_search.dart | 2 +- .../user_search/user_search_not_found.dart | 2 +- lib/ui/view/user_search/user_search_view.dart | 2 +- .../user_search/user_search_viewmodel.dart | 6 +- .../widget/custom_dm_list_tile.dart | 5 +- lib/ui/view/webview_page/web_view_model.dart | 5 +- lib/ui/view/webview_page/webview_page.dart | 6 +- .../localization/app_localization.dart | 4 +- lib/utilities/utilities.dart | 2 +- pubspec.yaml | 2 +- test/helpers/test_helpers.dart | 30 ++++----- test/helpers/test_helpers.mocks.dart | 40 ++++++------ test/services/bottom_sheet_service_test.dart | 4 +- test/services/dialog_service_test.dart | 4 +- .../services/local_storage_services_test.dart | 4 +- test/services/navigation_service_test.dart | 4 +- test/services/user_service_test.dart | 4 +- .../add_people_viewmodel_test.dart | 2 +- test/view_models/advanced_viewmodel_test.dart | 4 +- .../channel_add_people_viewmodel_test.dart | 6 +- .../channel_info_view_model_test.dart | 4 +- .../channel_members_list_model_test.dart | 2 +- .../channel_notification_viewmodel_test.dart | 2 +- test/view_models/channels_viewmodel_test.dart | 6 +- .../dm_jump_to_viewmodel_test.dart | 2 +- test/view_models/dm_user_viewmodel_test.dart | 2 +- .../forgot_password_email_viewmodel_test.dart | 2 +- .../forgot_password_new_viewmodel_test.dart | 24 +++---- .../forgot_password_otp_viewmodel_test.dart | 3 +- test/view_models/login_viewmodel_test.dart | 2 +- .../notifications_viewmodel_test.dart | 2 +- test/view_models/otp_viewmodel_test.dart | 7 +- test/view_models/plugin_viewmodel_test.dart | 4 +- test/view_models/you_page_viewmodel_test.dart | 6 +- 272 files changed, 1078 insertions(+), 1099 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 4913f4972..165495c66 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -34,7 +34,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.hng" + applicationId "com.zuri.app" minSdkVersion 19 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() diff --git a/lib/app/app.dart b/lib/app/app.dart index 9161acff6..fb3f57667 100644 --- a/lib/app/app.dart +++ b/lib/app/app.dart @@ -1,30 +1,30 @@ -import 'package:hng/services/centrifuge_service.dart'; -import 'package:hng/services/media_service.dart'; -import 'package:hng/services/notification_service.dart'; -import 'package:hng/ui/nav_pages/dm_page/dm_search_find_page.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_intro_page.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_page_view.dart'; -import 'package:hng/ui/view/direct_message/direct_message.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/import_contact.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invitation_sent.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email.dart'; -import 'package:hng/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart'; -import 'package:hng/ui/view/threads/all_threads/threads_view.dart'; -import 'package:hng/package/base/jump_to_request/jump_to_api.dart'; -import 'package:hng/ui/view/user_search/user_search_view.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/view/channel/edit_channel/edit_channel_view.dart'; -import 'package:hng/ui/view/threads/thread_detail/thread_detail_view.dart'; -import 'package:hng/ui/view/organization/organization_url/organization_url_view.dart'; -import 'package:hng/ui/view/channel/add_people/channel_add_people_view.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart'; -import 'package:hng/ui/view/webview_page/webview_page.dart'; +import 'package:zurichat/services/centrifuge_service.dart'; +import 'package:zurichat/services/media_service.dart'; +import 'package:zurichat/services/notification_service.dart'; +import 'package:zurichat/ui/nav_pages/dm_page/dm_search_find_page.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_intro_page.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_page_view.dart'; +import 'package:zurichat/ui/view/direct_message/direct_message.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/import_contact.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invitation_sent.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email.dart'; +import 'package:zurichat/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart'; +import 'package:zurichat/ui/view/threads/all_threads/threads_view.dart'; +import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart'; +import 'package:zurichat/ui/view/user_search/user_search_view.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/view/channel/edit_channel/edit_channel_view.dart'; +import 'package:zurichat/ui/view/threads/thread_detail/thread_detail_view.dart'; +import 'package:zurichat/ui/view/organization/organization_url/organization_url_view.dart'; +import 'package:zurichat/ui/view/channel/add_people/channel_add_people_view.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart'; +import 'package:zurichat/ui/view/webview_page/webview_page.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -145,9 +145,6 @@ import '../ui/view/user_search/user_search_view.dart'; MaterialRoute(page: ImportContacts), MaterialRoute(page: CreateInviteLink), MaterialRoute(page: InvitationSent), - - - ], dependencies: [ LazySingleton(classType: NavigationService), diff --git a/lib/general_widgets/custom_channel.dart b/lib/general_widgets/custom_channel.dart index c600a8eda..6a943ea0c 100644 --- a/lib/general_widgets/custom_channel.dart +++ b/lib/general_widgets/custom_channel.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/styles.dart'; class CustomChannel extends StatelessWidget { final String? text; diff --git a/lib/general_widgets/custom_user.dart b/lib/general_widgets/custom_user.dart index 3cefd3dab..15e7cebd3 100644 --- a/lib/general_widgets/custom_user.dart +++ b/lib/general_widgets/custom_user.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class CustomUser extends StatelessWidget { const CustomUser({Key? key, this.image, this.text}) : super(key: key); diff --git a/lib/general_widgets/custom_user_channel.dart b/lib/general_widgets/custom_user_channel.dart index 3e7d1b422..e2399033a 100644 --- a/lib/general_widgets/custom_user_channel.dart +++ b/lib/general_widgets/custom_user_channel.dart @@ -1,6 +1,6 @@ // import 'package:flutter/material.dart'; // import 'package:flutter_screenutil/flutter_screenutil.dart'; -// import 'package:hng/ui/shared/styles.dart'; +// import 'package:zurichat/ui/shared/styles.dart'; // // class CustomUserChannel extends StatelessWidget { // final String? image; diff --git a/lib/general_widgets/menu_item_tile.dart b/lib/general_widgets/menu_item_tile.dart index 5275c940d..73e29c4bf 100644 --- a/lib/general_widgets/menu_item_tile.dart +++ b/lib/general_widgets/menu_item_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../ui/shared/colors.dart'; diff --git a/lib/general_widgets/no_connection_widget.dart b/lib/general_widgets/no_connection_widget.dart index 726b84a55..a63738605 100644 --- a/lib/general_widgets/no_connection_widget.dart +++ b/lib/general_widgets/no_connection_widget.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/styles.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; class NoConnectionWidget extends StatelessWidget { const NoConnectionWidget( diff --git a/lib/main.dart b/lib/main.dart index 20ceda69b..3cb16d007 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/services/notification_service.dart'; -import 'package:hng/ui/shared/setup_bottom_sheet_ui.dart'; -import 'package:hng/ui/shared/setup_dialog_ui.dart'; -import 'package:hng/utilities/internalization/local_setup.dart'; +import 'package:zurichat/services/notification_service.dart'; +import 'package:zurichat/ui/shared/setup_bottom_sheet_ui.dart'; +import 'package:zurichat/ui/shared/setup_dialog_ui.dart'; +import 'package:zurichat/utilities/internalization/local_setup.dart'; import 'package:intl/intl.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/package/base/jump_to_request/jump_to_api.dart b/lib/package/base/jump_to_request/jump_to_api.dart index 0f3c581aa..27d92b601 100644 --- a/lib/package/base/jump_to_request/jump_to_api.dart +++ b/lib/package/base/jump_to_request/jump_to_api.dart @@ -1,5 +1,5 @@ import 'package:dio/dio.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import '../../../app/app.locator.dart'; import '../../../app/app.logger.dart'; diff --git a/lib/package/base/server-request/api/api.dart b/lib/package/base/server-request/api/api.dart index dd0decd20..9b5820e7e 100644 --- a/lib/package/base/server-request/api/api.dart +++ b/lib/package/base/server-request/api/api.dart @@ -2,10 +2,10 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/api_response.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/utilities/failures.dart'; +import 'package:zurichat/models/api_response.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/utilities/failures.dart'; abstract class Api { /// THIS IS THE API ABSTRACT CLASS FOR ZURI CHAT MOBILE diff --git a/lib/package/base/server-request/api/dio_interceptors.dart b/lib/package/base/server-request/api/dio_interceptors.dart index 7f8edfbec..cebc0c4c7 100644 --- a/lib/package/base/server-request/api/dio_interceptors.dart +++ b/lib/package/base/server-request/api/dio_interceptors.dart @@ -1,6 +1,5 @@ - import 'package:dio/dio.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class DioInterceptor implements Interceptor { final log = getLogger("DioInterceptor"); diff --git a/lib/package/base/server-request/api/zuri_api.dart b/lib/package/base/server-request/api/zuri_api.dart index 3bb432c26..c4ef15020 100644 --- a/lib/package/base/server-request/api/zuri_api.dart +++ b/lib/package/base/server-request/api/zuri_api.dart @@ -5,19 +5,19 @@ import 'dart:io'; import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/api_response.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/models/channels_search_model.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/api_utils.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/failures.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/api_response.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/models/channels_search_model.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/api_utils.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/failures.dart'; import 'package:stacked_services/stacked_services.dart' hide FormData, MultipartFile; diff --git a/lib/package/base/server-request/channels/channels_api_service.dart b/lib/package/base/server-request/channels/channels_api_service.dart index 2118556fc..3a1271b1e 100644 --- a/lib/package/base/server-request/channels/channels_api_service.dart +++ b/lib/package/base/server-request/channels/channels_api_service.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/models/pinned_message_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/models/pinned_message_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import '../../../../app/app.locator.dart'; import '../../../../app/app.logger.dart'; @@ -90,18 +90,17 @@ class ChannelsApiService { } } - getChanelCreator(String channelId)async{ + getChanelCreator(String channelId) async { final orgId = _userService.currentOrgId; - try{ - final res=await _api.get('v1/$orgId/channels/$channelId/',token: token); + try { + final res = + await _api.get('v1/$orgId/channels/$channelId/', token: token); return res.data; - }on Exception catch(e){ + } on Exception catch (e) { log.e(e.toString()); } } - - Future getChannelMessages(String channelId) async { final orgId = _userService.currentOrgId; diff --git a/lib/package/base/server-request/dms/dms_api_service.dart b/lib/package/base/server-request/dms/dms_api_service.dart index abc85f3d6..c5a00ba25 100644 --- a/lib/package/base/server-request/dms/dms_api_service.dart +++ b/lib/package/base/server-request/dms/dms_api_service.dart @@ -1,5 +1,5 @@ -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import '../../../../app/app.locator.dart'; import '../../../../app/app.logger.dart'; diff --git a/lib/package/base/server-request/organization_request/organization_api_service.dart b/lib/package/base/server-request/organization_request/organization_api_service.dart index a2e1b35cd..e9449cd70 100644 --- a/lib/package/base/server-request/organization_request/organization_api_service.dart +++ b/lib/package/base/server-request/organization_request/organization_api_service.dart @@ -1,6 +1,6 @@ -import 'package:hng/models/organization_member_model.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/models/organization_member_model.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import '../../../../app/app.locator.dart'; import '../../../../app/app.logger.dart'; import '../../../../models/organization_model.dart'; diff --git a/lib/services/centrifuge_service.dart b/lib/services/centrifuge_service.dart index 75413cb74..ddf852bc0 100644 --- a/lib/services/centrifuge_service.dart +++ b/lib/services/centrifuge_service.dart @@ -3,12 +3,12 @@ import 'dart:convert'; import 'package:centrifuge/centrifuge.dart' as centrifuge; import 'package:centrifuge/centrifuge.dart'; -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; class CentrifugeService with ReactiveServiceMixin { diff --git a/lib/services/current_user_profile.dart b/lib/services/current_user_profile.dart index 0e4a84034..dc1412c52 100644 --- a/lib/services/current_user_profile.dart +++ b/lib/services/current_user_profile.dart @@ -1,10 +1,10 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/models/profile_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/models/profile_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked_services/stacked_services.dart'; import 'local_storage_services.dart'; diff --git a/lib/services/local_storage_services.dart b/lib/services/local_storage_services.dart index f6b23f8f2..082865723 100644 --- a/lib/services/local_storage_services.dart +++ b/lib/services/local_storage_services.dart @@ -1,5 +1,5 @@ import 'package:shared_preferences/shared_preferences.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/utilities/constants.dart'; class SharedPreferenceLocalStorage { static SharedPreferenceLocalStorage? _instance; @@ -60,6 +60,6 @@ class SharedPreferenceLocalStorage { static int get localeVal => _preferences!.getInt(LOCALE_VAL) ?? DEFAULT_LOCALE_VAL; - + static set localeVal(int val) => _preferences?.setInt(LOCALE_VAL, val); } diff --git a/lib/services/media_service.dart b/lib/services/media_service.dart index ca5f3aebf..a02408b02 100644 --- a/lib/services/media_service.dart +++ b/lib/services/media_service.dart @@ -1,8 +1,8 @@ import 'dart:io'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/user_service.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/user_service.dart'; import 'package:image_picker/image_picker.dart'; class MediaService { diff --git a/lib/services/notification_service.dart b/lib/services/notification_service.dart index 5c299d35c..203e75d03 100644 --- a/lib/services/notification_service.dart +++ b/lib/services/notification_service.dart @@ -3,9 +3,9 @@ import 'dart:math'; import 'package:awesome_notifications/awesome_notifications.dart'; import 'package:flutter/material.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:stacked_services/stacked_services.dart'; class NotificationService { diff --git a/lib/services/user_service.dart b/lib/services/user_service.dart index b8ac239f4..fd2c9cc11 100644 --- a/lib/services/user_service.dart +++ b/lib/services/user_service.dart @@ -1,7 +1,7 @@ //On login or signup the user service is used to save all the user details import 'dart:convert'; -import 'package:hng/models/user_model.dart'; +import 'package:zurichat/models/user_model.dart'; import '../app/app.locator.dart'; import '../models/organization_model.dart'; @@ -75,7 +75,7 @@ class UserService { return _userId; } - String get memberId { + String get memberId { _userId = _sharedPrefs.getString(StorageKeys.idInOrganization) ?? ''; //You can perform other function before returning return _userId; diff --git a/lib/ui/nav_pages/dm_page/dm_page.dart b/lib/ui/nav_pages/dm_page/dm_page.dart index a597de731..71eb54e4c 100644 --- a/lib/ui/nav_pages/dm_page/dm_page.dart +++ b/lib/ui/nav_pages/dm_page/dm_page.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import '../../shared/search_bar.dart'; diff --git a/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart b/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart index a98fbfd02..4311f900e 100644 --- a/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart +++ b/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart @@ -1,6 +1,5 @@ -import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; -import 'package:hng/services/local_storage_services.dart'; - +import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; import '../../../app/app.locator.dart'; import '../../../app/app.router.dart'; diff --git a/lib/ui/nav_pages/dm_page/dm_search_find_page.dart b/lib/ui/nav_pages/dm_page/dm_search_find_page.dart index cf60381e5..68da33edd 100644 --- a/lib/ui/nav_pages/dm_page/dm_search_find_page.dart +++ b/lib/ui/nav_pages/dm_page/dm_search_find_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_chips_input/flutter_chips_input.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart b/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart index 5e4fa8e2d..42a1d3c73 100644 --- a/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart +++ b/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart index 3c9e225fd..0a2322fc7 100644 --- a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart +++ b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/nav_pages/drafted_messages_page/widgets/app/data.dart'; -import 'package:hng/ui/nav_pages/drafted_messages_page/widgets/app/drafted_item_widget.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/nav_pages/drafted_messages_page/widgets/app/data.dart'; +import 'package:zurichat/ui/nav_pages/drafted_messages_page/widgets/app/drafted_item_widget.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'drafted_message_page_viewmodel.dart'; diff --git a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart index 4d014b5fe..f04eaa3b8 100644 --- a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart +++ b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart b/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart index 5201d0386..78bbf2d34 100644 --- a/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart +++ b/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class DraftedItem { final String? username, message, time; diff --git a/lib/ui/nav_pages/home_page/home_item_model.dart b/lib/ui/nav_pages/home_page/home_item_model.dart index 686bde40f..1419313e8 100644 --- a/lib/ui/nav_pages/home_page/home_item_model.dart +++ b/lib/ui/nav_pages/home_page/home_item_model.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/utilities/enums.dart'; class HomeItemModel { final log = getLogger('HomeItemModel'); diff --git a/lib/ui/nav_pages/home_page/home_page.dart b/lib/ui/nav_pages/home_page/home_page.dart index a8006613d..59126b35a 100644 --- a/lib/ui/nav_pages/home_page/home_page.dart +++ b/lib/ui/nav_pages/home_page/home_page.dart @@ -1,15 +1,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/easy_container.dart'; -import 'package:hng/ui/nav_pages/home_page/home_page_viewmodel.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_expanded.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/easy_container.dart'; +import 'package:zurichat/ui/nav_pages/home_page/home_page_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_expanded.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; class HomePage extends StatelessWidget { diff --git a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart index 33e166604..59ba740fe 100644 --- a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart +++ b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart @@ -1,24 +1,24 @@ import 'dart:async'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/models/user_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; -import 'package:hng/services/centrifuge_service.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/notification_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/nav_pages/home_page/home_item_model.dart'; -import 'package:hng/ui/view/dm_chat_view/dm_jump_to_view.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/models/user_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; +import 'package:zurichat/services/centrifuge_service.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/notification_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/nav_pages/home_page/home_item_model.dart'; +import 'package:zurichat/ui/view/dm_chat_view/dm_jump_to_view.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -225,7 +225,6 @@ class HomePageViewModel extends StreamViewModel { // _channel= await api.getChannelPage(id); // _membersList= await api.getChannelMembers(id); - _moderateNavigation(); await navigation.navigateTo(Routes.channelPageView, arguments: ChannelPageViewArguments( @@ -235,7 +234,6 @@ class HomePageViewModel extends StreamViewModel { public: public, )); setBusy(false); - } catch (e) { log.e(e.toString()); snackbar.showCustomSnackBar( @@ -317,7 +315,7 @@ class HomePageViewModel extends StreamViewModel { return counter > 0; } - void draftChecker(){ + void draftChecker() { notifyListeners(); } } diff --git a/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart b/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart index a5a8ea7b2..cf32dbd76 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; class CustomChannelListTile extends StatelessWidget { final String channelName; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart b/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart index bc0aafb03..f4630dd99 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart b/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart index e14f579e6..f9a47302f 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/shared.dart'; class CustomHomePageSectionTitle extends StatelessWidget { final String? title; @@ -18,12 +18,9 @@ class CustomHomePageSectionTitle extends StatelessWidget { children: [ GestureDetector( onTap: ontap, - child: Text( - "$title", - style: AppTextStyles.normalText - ), + child: Text("$title", style: AppTextStyles.normalText), ), ], ); } -} \ No newline at end of file +} diff --git a/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart b/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart index b8ac83643..674da8b11 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; class CustomPluginListTile extends StatelessWidget { final String? assetName; @@ -27,25 +27,23 @@ class CustomPluginListTile extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Row( - children: [ - icon != null ? - Icon( - icon, - color: isActive ? Colors.black : AppColors.greyishColor, - size: 16, - ) : - Image.asset( - assetName!, - width: 18, - ), - const SizedBox(width: 8), - Text( - pluginName, - style: isActive ? AppTextStyles.unreadText : AppTextStyles.normalText - ), - ] - ), + Row(children: [ + icon != null + ? Icon( + icon, + color: isActive ? Colors.black : AppColors.greyishColor, + size: 16, + ) + : Image.asset( + assetName!, + width: 18, + ), + const SizedBox(width: 8), + Text(pluginName, + style: isActive + ? AppTextStyles.unreadText + : AppTextStyles.normalText), + ]), isActive ? AppTextStyles.unreadCount( int.parse(data!), diff --git a/lib/ui/nav_pages/home_page/widgets/home_expanded.dart b/lib/ui/nav_pages/home_page/widgets/home_expanded.dart index 092c0f595..94feb3381 100644 --- a/lib/ui/nav_pages/home_page/widgets/home_expanded.dart +++ b/lib/ui/nav_pages/home_page/widgets/home_expanded.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; import '../home_item_model.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/home_list_items.dart b/lib/ui/nav_pages/home_page/widgets/home_list_items.dart index a88195425..9c9bfb07e 100644 --- a/lib/ui/nav_pages/home_page/widgets/home_list_items.dart +++ b/lib/ui/nav_pages/home_page/widgets/home_list_items.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -23,7 +23,7 @@ class ThreadTextAndIcon extends ViewModelWidget { return _TextAndIcon( text: Threads, unread: true, - onTap: () async{ + onTap: () async { // Navigate to threads screen await navigationService.navigateTo(Routes.threadsView); viewModel.draftChecker(); @@ -37,16 +37,14 @@ class ThreadTextAndIcon extends ViewModelWidget { } class DraftTextAndIcon extends ViewModelWidget { - - const - DraftTextAndIcon({Key? key}) : super(key: key); + const DraftTextAndIcon({Key? key}) : super(key: key); @override Widget build(BuildContext context, viewModel) { return _TextAndIcon( text: Drafts, unread: true, - onTap: () async{ + onTap: () async { await navigationService.navigateTo(Routes.draftView); viewModel.draftChecker(); }, diff --git a/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart b/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart index ae9e95a53..876cfcb44 100644 --- a/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart +++ b/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import '../../../../utilities/constants.dart'; diff --git a/lib/ui/nav_pages/plugin_page/add_plugin_view.dart b/lib/ui/nav_pages/plugin_page/add_plugin_view.dart index 6b71bddb5..e13623997 100644 --- a/lib/ui/nav_pages/plugin_page/add_plugin_view.dart +++ b/lib/ui/nav_pages/plugin_page/add_plugin_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; class AddPluginView extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart b/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart index 72124cc34..6c362ba14 100644 --- a/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart +++ b/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart @@ -1,13 +1,12 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_appbar.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_appbar.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; import 'package:stacked/stacked.dart'; - class EditPluginView extends StatelessWidget { const EditPluginView({Key? key}) : super(key: key); diff --git a/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart b/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart index c7b71aaee..53622aace 100644 --- a/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart +++ b/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/shared/long_button.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; class PluginPageIntro extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/plugin_page_view.dart b/lib/ui/nav_pages/plugin_page/plugin_page_view.dart index c4e03f34d..9ffb1c4cc 100644 --- a/lib/ui/nav_pages/plugin_page/plugin_page_view.dart +++ b/lib/ui/nav_pages/plugin_page/plugin_page_view.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/menu_item_tile.dart'; -import 'package:hng/models/plugin_model.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/long_button.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/menu_item_tile.dart'; +import 'package:zurichat/models/plugin_model.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; class PluginPage extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart b/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart index b6a899e11..38dd12a46 100644 --- a/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart +++ b/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart @@ -1,7 +1,7 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/plugin_model.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/icons.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/plugin_model.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/icons.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/nav_pages/plugin_page/plugins_view.dart b/lib/ui/nav_pages/plugin_page/plugins_view.dart index 420ab06f5..b49d94b52 100644 --- a/lib/ui/nav_pages/plugin_page/plugins_view.dart +++ b/lib/ui/nav_pages/plugin_page/plugins_view.dart @@ -1,13 +1,13 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; -import 'package:hng/ui/shared/styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:zurichat/ui/shared/styles.dart'; import 'package:stacked/stacked.dart'; import '../../shared/colors.dart'; @@ -22,9 +22,8 @@ class PluginView extends StatelessWidget { builder: (BuildContext context, PluginViewModel model, Widget? child) { return Scaffold( appBar: ZuriAppBar( - orgTitle: - Text(Plugins, style: AppTextStyles.heading4), - whiteBackground: true, + orgTitle: Text(Plugins, style: AppTextStyles.heading4), + whiteBackground: true, ), body: SingleChildScrollView( child: Padding( diff --git a/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart b/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart index b84113511..a7d60bca7 100644 --- a/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart +++ b/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class CustomAppBars extends StatelessWidget implements PreferredSizeWidget { final String appbarTitle; diff --git a/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart b/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart index 5591acd39..a4c2beb0d 100644 --- a/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart +++ b/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import '../../../../general_widgets/custom_text.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/nav_pages/you_page/widgets/status_form.dart b/lib/ui/nav_pages/you_page/widgets/status_form.dart index de4c8b4b5..bc8d7d394 100644 --- a/lib/ui/nav_pages/you_page/widgets/status_form.dart +++ b/lib/ui/nav_pages/you_page/widgets/status_form.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class StatusForm extends StatelessWidget { const StatusForm({Key? key, this.onPressed}) : super(key: key); diff --git a/lib/ui/nav_pages/you_page/you_page.dart b/lib/ui/nav_pages/you_page/you_page.dart index da6eb8f82..9483b1777 100644 --- a/lib/ui/nav_pages/you_page/you_page.dart +++ b/lib/ui/nav_pages/you_page/you_page.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart index a46f0f7e3..a79cc3535 100644 --- a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart +++ b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart @@ -1,12 +1,12 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart index e654341c5..bc9d92f83 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/custom_text.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/custom_text.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart index 91c6fb340..282a1eeeb 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart @@ -1,10 +1,10 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/user_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/user_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart index f5060b7cb..01a745221 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/enums.dart'; class CustomButton extends StatelessWidget { const CustomButton( @@ -40,4 +40,4 @@ class CustomButton extends StatelessWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_profile_tile.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_profile_tile.dart index e46b124eb..fb9aef049 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_profile_tile.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_profile_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/custom_text.dart'; +import 'package:zurichat/general_widgets/custom_text.dart'; class CustomProfileTile extends StatelessWidget { const CustomProfileTile( @@ -16,4 +16,4 @@ class CustomProfileTile extends StatelessWidget { onTap: onPressed, ); } -} \ No newline at end of file +} diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart index 93ea35fec..7eebcb6d3 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/custom_text.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/custom_text.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:stacked/stacked.dart'; import '../custom_user_bottom_sheet_viewmodel.dart'; diff --git a/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart b/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart index 81f1db511..1cafe2efc 100644 --- a/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart +++ b/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart @@ -1,6 +1,6 @@ import 'package:emoji_picker_flutter/emoji_picker_flutter.dart'; import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import 'package:stacked_services/stacked_services.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart index 5aafb73e8..ef0e92340 100644 --- a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart index 9a94b8f45..0a2f66705 100644 --- a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart index 7bdb1fa23..4fdbc8b55 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/custom_text.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart'; -import 'package:hng/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart'; +import 'package:zurichat/general_widgets/custom_text.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart index 4c9922759..5528b617b 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart @@ -1,11 +1,11 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart index 10fc04703..e66ab135e 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/custom_text.dart'; +import 'package:zurichat/general_widgets/custom_text.dart'; class WorkSpaceDisplayInfo extends StatelessWidget { final String? imageUrl; diff --git a/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart b/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart index 699ef19a1..b6c4e5181 100644 --- a/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart +++ b/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_option_bottomsheet_viewmodel.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_option_bottomsheet_viewmodel.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -62,10 +62,10 @@ class ThreadOptionsBottomSheetView extends StatelessWidget { topBorder: false, icon: Icons.message, text: Text('Mark unread')), - const MenuItemTile( + const MenuItemTile( topBorder: false, icon: Icons.access_time_rounded, - text: Text('Remind me')), + text: Text('Remind me')), const MenuItemTile( topBorder: false, icon: Icons.bookmark_border_outlined, diff --git a/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart b/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart index 96c4e7541..b8a8bee95 100644 --- a/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart +++ b/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked_services/stacked_services.dart'; import 'thread_options_bottomsheet/widget/recent_emojis.dart'; diff --git a/lib/ui/shared/dialogs.dart b/lib/ui/shared/dialogs.dart index 3999392bb..4a574bac5 100644 --- a/lib/ui/shared/dialogs.dart +++ b/lib/ui/shared/dialogs.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'shared.dart'; diff --git a/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart b/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart index b0cbd5ba8..0374d945e 100644 --- a/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart +++ b/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import 'package:stacked_services/stacked_services.dart'; class ShowAlertDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/delete_message.dart b/lib/ui/shared/dialogs/delete_message.dart index 4d63c3b8c..336cde012 100644 --- a/lib/ui/shared/dialogs/delete_message.dart +++ b/lib/ui/shared/dialogs/delete_message.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; class DeleteMessageDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart index ae008c7d4..b61550ff9 100644 --- a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart +++ b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/custom_text.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart'; +import 'package:zurichat/general_widgets/custom_text.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -9,9 +9,7 @@ class ReminderDialog extends StatelessWidget { final DialogRequest request; final Function(DialogResponse) completer; const ReminderDialog( - {Key? key, - required this.request, - required this.completer}) + {Key? key, required this.request, required this.completer}) : super(key: key); @override diff --git a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart index e0a1ec8d5..8dd165d33 100644 --- a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart +++ b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/notification_service.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/notification_service.dart'; import 'package:intl/intl.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -22,39 +22,44 @@ class RemindMeDialogViewModel extends BaseViewModel { //twenty minutes void messageRemindertwentyMinutes() async { - await notificationService.messageReminder(dateTime: now.add(const Duration(minutes: 20))); + await notificationService.messageReminder( + dateTime: now.add(const Duration(minutes: 20))); navigationService.popRepeated(1); } //1 hour void messageReminderOneHour() async { - await notificationService.messageReminder(dateTime: now.add(const Duration(hours: 1))); - navigationService.popRepeated(1); + await notificationService.messageReminder( + dateTime: now.add(const Duration(hours: 1))); + navigationService.popRepeated(1); } //3 hours void messageReminderThreeHours() async { - await notificationService.messageReminder(dateTime: now.add(const Duration(hours: 3))); - navigationService.popRepeated(1); + await notificationService.messageReminder( + dateTime: now.add(const Duration(hours: 3))); + navigationService.popRepeated(1); } //tomorrow void messageReminderTomorrow() async { - await notificationService.messageReminder(dateTime: now.add(const Duration(days: 1))); + await notificationService.messageReminder( + dateTime: now.add(const Duration(days: 1))); navigationService.popRepeated(1); } //next week void messageReminderNextWeek() async { - await notificationService.messageReminder(dateTime: now.add(const Duration(days: 7))); + await notificationService.messageReminder( + dateTime: now.add(const Duration(days: 7))); navigationService.popRepeated(1); } //custom - void customReminder(selectedDate, selectedTime) async { + void customReminder(selectedDate, selectedTime) async { await notificationService.customReminder(selectedDate, selectedTime); - navigationService.popRepeated(1); + navigationService.popRepeated(1); notifyListeners(); } } diff --git a/lib/ui/shared/dialogs/schedule_channel_dialog.dart b/lib/ui/shared/dialogs/schedule_channel_dialog.dart index 45fe8c159..bfac8ee49 100644 --- a/lib/ui/shared/dialogs/schedule_channel_dialog.dart +++ b/lib/ui/shared/dialogs/schedule_channel_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/view/channel/channel_view/channel_page_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/view/channel/channel_view/channel_page_viewmodel.dart'; import 'package:stacked_services/stacked_services.dart'; class ScheduleMessChannel extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/schedule_dialog.dart b/lib/ui/shared/dialogs/schedule_dialog.dart index 5d4bcb8a3..29dd89e80 100644 --- a/lib/ui/shared/dialogs/schedule_dialog.dart +++ b/lib/ui/shared/dialogs/schedule_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/view/dm_user/dm_user_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/view/dm_user/dm_user_viewmodel.dart'; import 'package:stacked_services/stacked_services.dart'; class ScheduleMess extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/select_language_dialog.dart b/lib/ui/shared/dialogs/select_language_dialog.dart index ade9f4773..82cb0cc7f 100644 --- a/lib/ui/shared/dialogs/select_language_dialog.dart +++ b/lib/ui/shared/dialogs/select_language_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; import '../colors.dart'; diff --git a/lib/ui/shared/dialogs/select_theme_dialog.dart b/lib/ui/shared/dialogs/select_theme_dialog.dart index b4bc25c08..3b996256e 100644 --- a/lib/ui/shared/dialogs/select_theme_dialog.dart +++ b/lib/ui/shared/dialogs/select_theme_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../general_widgets/custom_text.dart'; diff --git a/lib/ui/shared/dialogs/send_feedback_dialog.dart b/lib/ui/shared/dialogs/send_feedback_dialog.dart index 9a4e54878..a44a49684 100644 --- a/lib/ui/shared/dialogs/send_feedback_dialog.dart +++ b/lib/ui/shared/dialogs/send_feedback_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:stacked_services/stacked_services.dart'; class SendFeedbackDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/sign_out_dialog.dart b/lib/ui/shared/dialogs/sign_out_dialog.dart index 4832b225f..2892a99b7 100644 --- a/lib/ui/shared/dialogs/sign_out_dialog.dart +++ b/lib/ui/shared/dialogs/sign_out_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/custom_text.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/general_widgets/custom_text.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:stacked_services/stacked_services.dart'; class SignOutDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/skin_tone_dialog.dart b/lib/ui/shared/dialogs/skin_tone_dialog.dart index 5d0aaf2aa..4b47d3d5b 100644 --- a/lib/ui/shared/dialogs/skin_tone_dialog.dart +++ b/lib/ui/shared/dialogs/skin_tone_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; class SkinToneDialog extends StatelessWidget { diff --git a/lib/ui/shared/search_bar.dart b/lib/ui/shared/search_bar.dart index d6ffc77c9..6a7a8b27c 100644 --- a/lib/ui/shared/search_bar.dart +++ b/lib/ui/shared/search_bar.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../general_widgets/easy_container.dart'; import '../../utilities/constants.dart'; diff --git a/lib/ui/shared/setup_bottom_sheet_ui.dart b/lib/ui/shared/setup_bottom_sheet_ui.dart index a6ba786eb..afb8230cb 100644 --- a/lib/ui/shared/setup_bottom_sheet_ui.dart +++ b/lib/ui/shared/setup_bottom_sheet_ui.dart @@ -1,6 +1,6 @@ -import 'package:hng/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart'; -import 'package:hng/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart'; -import 'package:hng/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart'; import '../../app/app.locator.dart'; import '../../utilities/enums.dart'; @@ -24,4 +24,4 @@ void setupBottomSheetUi() { }; bottomSheetService.setCustomSheetBuilders(builders); -} \ No newline at end of file +} diff --git a/lib/ui/shared/setup_dialog_ui.dart b/lib/ui/shared/setup_dialog_ui.dart index 1ea5bbb99..55428b643 100644 --- a/lib/ui/shared/setup_dialog_ui.dart +++ b/lib/ui/shared/setup_dialog_ui.dart @@ -1,10 +1,10 @@ import 'package:flutter/widgets.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart'; -import 'package:hng/ui/shared/dialogs/delete_draft_alert_dialog.dart'; -import 'package:hng/ui/shared/dialogs/schedule_dialog.dart'; -import 'package:hng/ui/shared/dialogs/sign_out_dialog.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart'; +import 'package:zurichat/ui/shared/dialogs/delete_draft_alert_dialog.dart'; +import 'package:zurichat/ui/shared/dialogs/schedule_dialog.dart'; +import 'package:zurichat/ui/shared/dialogs/sign_out_dialog.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked_services/stacked_services.dart'; import 'dialogs/schedule_channel_dialog.dart'; import 'dialogs/select_language_dialog.dart'; diff --git a/lib/ui/shared/shared.dart b/lib/ui/shared/shared.dart index 628d89e4d..728c2f722 100644 --- a/lib/ui/shared/shared.dart +++ b/lib/ui/shared/shared.dart @@ -1,4 +1,4 @@ -export 'package:hng/ui/shared/colors.dart'; -export 'package:hng/utilities/constants.dart'; -export 'package:hng/ui/shared/styles.dart'; -export 'package:hng/ui/shared/ui_helpers.dart'; +export 'package:zurichat/ui/shared/colors.dart'; +export 'package:zurichat/utilities/constants.dart'; +export 'package:zurichat/ui/shared/styles.dart'; +export 'package:zurichat/ui/shared/ui_helpers.dart'; diff --git a/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart b/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart index 8d373f172..3e3418ba6 100644 --- a/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart +++ b/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart @@ -1,5 +1,5 @@ import 'package:flutter_parsed_text/flutter_parsed_text.dart'; -import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/utilities/utilities.dart'; import 'package:stacked/stacked.dart'; import '../../shared.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart b/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart index bde968365..eed553c6b 100644 --- a/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart +++ b/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'thread_card_viewmodel.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart b/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart index ff70c6112..c4e527ab9 100644 --- a/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart +++ b/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart @@ -1,8 +1,8 @@ import 'dart:convert'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -10,7 +10,7 @@ import '../../../../app/app.locator.dart'; import '../../../../app/app.router.dart'; import '../../../../models/user_post.dart'; import '../../../../utilities/enums.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class ThreadCardViewModel extends BaseViewModel { final _navigationService = locator(); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart index 0c409b0a8..5af1215d8 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; +import 'package:zurichat/models/user_post.dart'; class AudioMessage extends StatelessWidget { const AudioMessage({Key? key, required this.postAudioFiles}) diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart index 28d0a4521..6b77f2245 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; +import 'package:zurichat/models/user_post.dart'; import 'package:stacked/stacked.dart'; import '../thread_card_viewmodel.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart index a288735ad..ef1f57f3e 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart @@ -1,6 +1,6 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; +import 'package:zurichat/models/user_post.dart'; class MediaFiles extends StatelessWidget { const MediaFiles({Key? key, required this.postMediaFiles}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart index 748070b36..42935a862 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/utilities.dart'; class PostFilesDisplay extends StatelessWidget { const PostFilesDisplay({Key? key, required this.postFiles}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart index d6c2c1196..782d0b9fe 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart @@ -1,7 +1,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; import 'package:stacked/stacked.dart'; class PostReplies extends ViewModelWidget { diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart index fa9d52c4a..d18fbe7e0 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart @@ -1,7 +1,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/shared.dart'; class QuotedReplies extends StatelessWidget { const QuotedReplies({ diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart index f96161c48..c4a35bef0 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart @@ -1,9 +1,9 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/utilities.dart'; class SnapshotLinks extends StatelessWidget { const SnapshotLinks({Key? key, required this.postSnapshotLinks}) diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart index f406ba7db..b5f7a20a3 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/custom_text.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart'; -import 'package:hng/ui/shared/styles.dart'; +import 'package:zurichat/general_widgets/custom_text.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart'; +import 'package:zurichat/ui/shared/styles.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; @@ -16,7 +16,7 @@ import 'post_files_display.dart'; import 'post_replies.dart'; import 'quoted_replies.dart'; import 'snapshot_links.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class ThreadChannelMain extends ViewModelWidget { ThreadChannelMain(this.userPost, {Key? key}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart index ab0c0f1a3..aeed9cf0d 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:hng/ui/shared/styles.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:zurichat/ui/shared/styles.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; @@ -10,13 +10,13 @@ import '../../../colors.dart'; import '../../text_parser/text_parser_view.dart'; import '../thread_card_viewmodel.dart'; import 'emojis_list.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class ThreadCardDetail extends ViewModelWidget { ThreadCardDetail(this.userPost, {Key? key}) : super(key: key); final UserPost? userPost; - final log = getLogger("ThreadCardDetail"); + final log = getLogger("ThreadCardDetail"); @override Widget build(BuildContext context, ThreadCardViewModel viewModel) { @@ -27,7 +27,7 @@ class ThreadCardDetail extends ViewModelWidget { children: [ InkWell( onTap: viewModel.viewProfile, - onLongPress: () => zuriChatBottomSheet( + onLongPress: () => zuriChatBottomSheet( context: context, addToSavedItems: () { viewModel.saveItem( diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart index bfd4ba3c8..fe47e0a6f 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; //Shows the original message with the number of replies import '../../../../../general_widgets/custom_text.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart index 70345a6c5..ce944778c 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; @@ -9,13 +9,13 @@ import '../../../shared.dart'; import '../../../styles.dart'; import '../../text_parser/text_parser_view.dart'; import '../thread_card_viewmodel.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class ThreadCardPost extends ViewModelWidget { ThreadCardPost(this.userThreadPost, {Key? key}) : super(key: key); final UserThreadPost? userThreadPost; - final log = getLogger("ThreadCardPost"); + final log = getLogger("ThreadCardPost"); @override Widget build(BuildContext context, ThreadCardViewModel viewModel) { @@ -31,28 +31,28 @@ class ThreadCardPost extends ViewModelWidget { children: [ GestureDetector( onTap: viewModel.viewProfile, - onLongPress: () => zuriChatBottomSheet( - context: context, - addToSavedItems: () { - viewModel.saveItem( - channelID: userThreadPost!.channelId, - channelName: userThreadPost!.channelName, - displayName: userThreadPost!.displayName, - message: userThreadPost!.message, - lastSeen: userThreadPost!.moment, - messageID: userThreadPost!.id, - userID: userThreadPost!.userId, - userImage: userThreadPost!.userImage); - log.i("Saved"); - viewModel.goBack(); - showSimpleNotification( - const Text("Added successfully"), - position: NotificationPosition.top, - background: AppColors.appBarGreen, - trailing: const Icon(Icons.mark_chat_read_outlined), - duration: const Duration(seconds: 3), - ); - }), + onLongPress: () => zuriChatBottomSheet( + context: context, + addToSavedItems: () { + viewModel.saveItem( + channelID: userThreadPost!.channelId, + channelName: userThreadPost!.channelName, + displayName: userThreadPost!.displayName, + message: userThreadPost!.message, + lastSeen: userThreadPost!.moment, + messageID: userThreadPost!.id, + userID: userThreadPost!.userId, + userImage: userThreadPost!.userImage); + log.i("Saved"); + viewModel.goBack(); + showSimpleNotification( + const Text("Added successfully"), + position: NotificationPosition.top, + background: AppColors.appBarGreen, + trailing: const Icon(Icons.mark_chat_read_outlined), + duration: const Duration(seconds: 3), + ); + }), child: Container( width: 40, height: 40, diff --git a/lib/ui/shared/text_field.dart b/lib/ui/shared/text_field.dart index 910b72f7a..c105f2adc 100644 --- a/lib/ui/shared/text_field.dart +++ b/lib/ui/shared/text_field.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; ///This is the text field with border ///Should accept only hint with no labels diff --git a/lib/ui/shared/text_styles.dart b/lib/ui/shared/text_styles.dart index 7d014b645..8a8de9295 100644 --- a/lib/ui/shared/text_styles.dart +++ b/lib/ui/shared/text_styles.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class ZuriTextStyle { static const double _smallSize = 13; diff --git a/lib/ui/shared/zuri_appbar.dart b/lib/ui/shared/zuri_appbar.dart index 1520a300c..650a249fc 100644 --- a/lib/ui/shared/zuri_appbar.dart +++ b/lib/ui/shared/zuri_appbar.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/styles.dart'; // ignore: must_be_immutable class ZuriAppBar extends StatelessWidget implements PreferredSizeWidget { diff --git a/lib/ui/shared/zuri_loader.dart b/lib/ui/shared/zuri_loader.dart index 14cd73756..803c20585 100644 --- a/lib/ui/shared/zuri_loader.dart +++ b/lib/ui/shared/zuri_loader.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class ZuriLoader extends StatefulWidget { const ZuriLoader({Key? key}) : super(key: key); diff --git a/lib/ui/view/add_people/add_people_view.dart b/lib/ui/view/add_people/add_people_view.dart index fd3365d85..2b9f78f51 100644 --- a/lib/ui/view/add_people/add_people_view.dart +++ b/lib/ui/view/add_people/add_people_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/advanced/advanced_view.dart b/lib/ui/view/advanced/advanced_view.dart index 5dec4d55b..f516c783a 100644 --- a/lib/ui/view/advanced/advanced_view.dart +++ b/lib/ui/view/advanced/advanced_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/view/channel/add_people/channel_add_people_view.dart b/lib/ui/view/channel/add_people/channel_add_people_view.dart index 50b310ba6..8bdb3c237 100644 --- a/lib/ui/view/channel/add_people/channel_add_people_view.dart +++ b/lib/ui/view/channel/add_people/channel_add_people_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart b/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart index 33ef4a562..40b115e15 100644 --- a/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart +++ b/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart @@ -1,10 +1,10 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_info/channel_info_view.dart b/lib/ui/view/channel/channel_info/channel_info_view.dart index 4b6eed400..e457e425b 100644 --- a/lib/ui/view/channel/channel_info/channel_info_view.dart +++ b/lib/ui/view/channel/channel_info/channel_info_view.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import '../../../shared/shared.dart'; import 'channel_info_view_model.dart'; import 'widgets/first_section.dart'; diff --git a/lib/ui/view/channel/channel_info/channel_info_view_model.dart b/lib/ui/view/channel/channel_info/channel_info_view_model.dart index 99f798100..973a2f4e0 100644 --- a/lib/ui/view/channel/channel_info/channel_info_view_model.dart +++ b/lib/ui/view/channel/channel_info/channel_info_view_model.dart @@ -1,12 +1,12 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/view/channel/channel_members/channel_members_list.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/view/channel/channel_members/channel_members_list.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../../app/app.locator.dart'; diff --git a/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart b/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart index e24c91c37..13555756d 100644 --- a/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart +++ b/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; Widget customAppBar(model) { return AppBar( diff --git a/lib/ui/view/channel/channel_info/widgets/edit_button.dart b/lib/ui/view/channel/channel_info/widgets/edit_button.dart index 4ee89c86e..4bddf3347 100644 --- a/lib/ui/view/channel/channel_info/widgets/edit_button.dart +++ b/lib/ui/view/channel/channel_info/widgets/edit_button.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../../../shared/styles.dart'; import '../channel_info_view_model.dart'; diff --git a/lib/ui/view/channel/channel_info/widgets/fifth_section.dart b/lib/ui/view/channel/channel_info/widgets/fifth_section.dart index e97bff316..eaeba4c64 100644 --- a/lib/ui/view/channel/channel_info/widgets/fifth_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/fifth_section.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/view/channel/channel_info/widgets/new_row_tile.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/view/channel/channel_info/widgets/new_row_tile.dart'; import '../../../../shared/colors.dart'; class FifthSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/first_section.dart b/lib/ui/view/channel/channel_info/widgets/first_section.dart index 16cb92970..edea4047f 100644 --- a/lib/ui/view/channel/channel_info/widgets/first_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/first_section.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; import '../../../../shared/colors.dart'; class FirstSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/fourth_section.dart b/lib/ui/view/channel/channel_info/widgets/fourth_section.dart index 035fa98ce..063cf6d04 100644 --- a/lib/ui/view/channel/channel_info/widgets/fourth_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/fourth_section.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; -import 'package:hng/ui/view/channel/channel_info/widgets/new_row_tile.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/ui/view/channel/channel_info/widgets/new_row_tile.dart'; import '../../../../shared/colors.dart'; class FourthSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart b/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart index 0d26ded38..ea52bfe3e 100644 --- a/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart +++ b/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/shared.dart'; class NewRowTile extends StatelessWidget { const NewRowTile({ diff --git a/lib/ui/view/channel/channel_info/widgets/second_section.dart b/lib/ui/view/channel/channel_info/widgets/second_section.dart index 0e15b375c..86a96ccca 100644 --- a/lib/ui/view/channel/channel_info/widgets/second_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/second_section.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import '../../../../shared/colors.dart'; class SecondSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/seventh_section.dart b/lib/ui/view/channel/channel_info/widgets/seventh_section.dart index 6982a8cd2..941233eca 100644 --- a/lib/ui/view/channel/channel_info/widgets/seventh_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/seventh_section.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/channel_info/widgets/sixth_section.dart b/lib/ui/view/channel/channel_info/widgets/sixth_section.dart index 7dd26781a..41b381566 100644 --- a/lib/ui/view/channel/channel_info/widgets/sixth_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/sixth_section.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; import 'package:stacked/stacked.dart'; class SixthSection extends ViewModelWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/third_section.dart b/lib/ui/view/channel/channel_info/widgets/third_section.dart index cd000bb19..116ab7278 100644 --- a/lib/ui/view/channel/channel_info/widgets/third_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/third_section.dart @@ -1,12 +1,12 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; -import 'package:hng/ui/view/channel/channel_info/widgets/new_row_tile.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/ui/view/channel/channel_info/widgets/new_row_tile.dart'; import '../../../../shared/colors.dart'; class ThirdSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_list/channels_view.dart b/lib/ui/view/channel/channel_list/channels_view.dart index 5f72e8c93..4407a883b 100644 --- a/lib/ui/view/channel/channel_list/channels_view.dart +++ b/lib/ui/view/channel/channel_list/channels_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:grouped_list/grouped_list.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/channel_list/channels_viewmodel.dart b/lib/ui/view/channel/channel_list/channels_viewmodel.dart index 1f09715f7..048906b3d 100644 --- a/lib/ui/view/channel/channel_list/channels_viewmodel.dart +++ b/lib/ui/view/channel/channel_list/channels_viewmodel.dart @@ -1,12 +1,12 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_members/channel_members_list.dart b/lib/ui/view/channel/channel_members/channel_members_list.dart index cd6847e2a..94c7a5398 100644 --- a/lib/ui/view/channel/channel_members/channel_members_list.dart +++ b/lib/ui/view/channel/channel_members/channel_members_list.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import '../../../shared/colors.dart'; import 'package:stacked/stacked.dart'; import '../shared_widgets.dart'; diff --git a/lib/ui/view/channel/channel_members/channel_members_list_model.dart b/lib/ui/view/channel/channel_members/channel_members_list_model.dart index 5f217f0cc..f5503c5ae 100644 --- a/lib/ui/view/channel/channel_members/channel_members_list_model.dart +++ b/lib/ui/view/channel/channel_members/channel_members_list_model.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/models/static_user_model.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/models/static_user_model.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_notification/channel_notification_view.dart b/lib/ui/view/channel/channel_notification/channel_notification_view.dart index c3b8b3389..ae9191887 100644 --- a/lib/ui/view/channel/channel_notification/channel_notification_view.dart +++ b/lib/ui/view/channel/channel_notification/channel_notification_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'channel_notification_viewmodel.dart'; diff --git a/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart b/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart index f7b51d1d6..92b988572 100644 --- a/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart +++ b/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; class ChannelNotificationViewModel extends BaseViewModel { diff --git a/lib/ui/view/channel/channel_search/channel_search_view.dart b/lib/ui/view/channel/channel_search/channel_search_view.dart index 65939b4d0..48a56bb1e 100644 --- a/lib/ui/view/channel/channel_search/channel_search_view.dart +++ b/lib/ui/view/channel/channel_search/channel_search_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'channel_search_view_model.dart'; diff --git a/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart b/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart index 628bf7cbc..2784ca539 100644 --- a/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart +++ b/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'textfield_style.dart'; diff --git a/lib/ui/view/channel/channel_search/widgets/search_result.dart b/lib/ui/view/channel/channel_search/widgets/search_result.dart index 1a31751bb..32946533d 100644 --- a/lib/ui/view/channel/channel_search/widgets/search_result.dart +++ b/lib/ui/view/channel/channel_search/widgets/search_result.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../../../shared/shared.dart'; import '../../channel_info/widgets/textstyles.dart'; diff --git a/lib/ui/view/channel/channel_search/widgets/textfield_style.dart b/lib/ui/view/channel/channel_search/widgets/textfield_style.dart index 0f2391ee9..4ba79fdda 100644 --- a/lib/ui/view/channel/channel_search/widgets/textfield_style.dart +++ b/lib/ui/view/channel/channel_search/widgets/textfield_style.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; InputDecoration textFormFields(String hintText) { return InputDecoration( diff --git a/lib/ui/view/channel/channel_view/channel_page_view.dart b/lib/ui/view/channel/channel_view/channel_page_view.dart index 35415617f..ef6d507e5 100644 --- a/lib/ui/view/channel/channel_view/channel_page_view.dart +++ b/lib/ui/view/channel/channel_view/channel_page_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/no_connection_widget.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/channel/channel_view/widgets/channel_intro.dart'; -import 'package:hng/ui/view/expandable_textfield/expandable_textfield_screen.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/no_connection_widget.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/channel/channel_view/widgets/channel_intro.dart'; +import 'package:zurichat/ui/view/expandable_textfield/expandable_textfield_screen.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import '../../../shared/shared.dart'; @@ -89,7 +89,7 @@ class ChannelPageView extends StatelessWidget with $ChannelPageView { "${model.channelMembers.length} member${model.channelMembers.length == 1 ? "" : "s"}", ), body: ExpandableTextFieldScreen( - usercheck: model.checkUser, + usercheck: model.checkUser, channelName: '$channelName', channelId: '$channelId', channelID: channelId.toString(), diff --git a/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart b/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart index aa9513308..3902bc6a5 100644 --- a/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart +++ b/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart @@ -2,21 +2,21 @@ import 'dart:async'; import 'dart:convert'; import 'package:flutter/widgets.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/centrifuge_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/notification_service.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/centrifuge_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/notification_service.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:simple_moment/simple_moment.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -31,12 +31,11 @@ class ChannelPageViewModel extends FormViewModel { final _bottomSheetService = locator(); final _storageService = locator(); final _snackbarService = locator(); - final _userService = locator(); + final _userService = locator(); bool _checkUser = true; get checkUser => _checkUser; final _api = ZuriApi(channelsBaseUrl); - //Draft implementations var storedDraft = ''; @@ -93,7 +92,7 @@ class ChannelPageViewModel extends FormViewModel { StreamSubscription? messageSubscription; StreamSubscription? notificationSubscription; String channelID = ''; - String channelCreator= ''; + String channelCreator = ''; saveItem( {String? channelID, @@ -130,13 +129,13 @@ class ChannelPageViewModel extends FormViewModel { notifyListeners(); } - getChannelCreator(String channelId)async{ - var response= await _channelsApiService.getChanelCreator(channelId); - channelCreator=response['owner']; - notifyListeners(); + getChannelCreator(String channelId) async { + var response = await _channelsApiService.getChanelCreator(channelId); + channelCreator = response['owner']; + notifyListeners(); } - void updateCheckUser() { + void updateCheckUser() { _checkUser = false; notifyListeners(); } @@ -167,7 +166,7 @@ class ChannelPageViewModel extends FormViewModel { _channelsApiService.changeChannelMessagePinnedState(userPost!.channelId, userPost.id!, userPost.userId!, !userPost.pinned); - Future joinChannel(String channelId) async { + Future joinChannel(String channelId) async { String? userId = storage.getString(StorageKeys.currentUserId); String? orgId = storage.getString(StorageKeys.currentOrgId); String? token = storage.getString(StorageKeys.currentSessionToken); @@ -189,7 +188,7 @@ class ChannelPageViewModel extends FormViewModel { } } - void checkUserId() async { + void checkUserId() async { await Future.delayed(const Duration(milliseconds: 10)); _checkUser = channelMembers.any((member) => member.name == _userService.userId); @@ -197,6 +196,7 @@ class ChannelPageViewModel extends FormViewModel { log.i(_checkUser); notifyListeners(); } + void getChannelSocketId(String channelId) async { final channelSockId = await _channelsApiService.getChannelSocketId(channelId); diff --git a/lib/ui/view/channel/channel_view/widgets/channel_chat.dart b/lib/ui/view/channel/channel_view/widgets/channel_chat.dart index 125fcfde4..4409e4624 100644 --- a/lib/ui/view/channel/channel_view/widgets/channel_chat.dart +++ b/lib/ui/view/channel/channel_view/widgets/channel_chat.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/thread_card_view.dart'; -import 'package:hng/ui/view/channel/channel_view/channel_page_viewmodel.dart'; -import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/thread_card_view.dart'; +import 'package:zurichat/ui/view/channel/channel_view/channel_page_viewmodel.dart'; +import 'package:zurichat/utilities/utilities.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/channel/channel_view/widgets/channel_intro.dart b/lib/ui/view/channel/channel_view/widgets/channel_intro.dart index ae91ee0c9..341ea2508 100644 --- a/lib/ui/view/channel/channel_view/widgets/channel_intro.dart +++ b/lib/ui/view/channel/channel_view/widgets/channel_intro.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; import 'package:stacked/stacked.dart'; import '../channel_page_viewmodel.dart'; @@ -34,7 +34,8 @@ class ChannelIntro extends ViewModelWidget { Column( children: [ MaterialButton( - onPressed: () => viewModel.navigateToChannelEdit(channelName, channelId), + onPressed: () => + viewModel.navigateToChannelEdit(channelName, channelId), padding: const EdgeInsets.all(15), shape: const CircleBorder( side: BorderSide(color: AppColors.zuriPrimaryColor)), diff --git a/lib/ui/view/channel/channel_view/widgets/check_user.dart b/lib/ui/view/channel/channel_view/widgets/check_user.dart index bbd41b63f..94952ac23 100644 --- a/lib/ui/view/channel/channel_view/widgets/check_user.dart +++ b/lib/ui/view/channel/channel_view/widgets/check_user.dart @@ -2,10 +2,10 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/channel/channel_info/widgets/textstyles.dart'; -import 'package:hng/ui/view/channel/channel_view/channel_page_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/channel/channel_info/widgets/textstyles.dart'; +import 'package:zurichat/ui/view/channel/channel_view/channel_page_viewmodel.dart'; import 'package:stacked/stacked.dart'; class CheckUser extends ViewModelWidget { @@ -41,7 +41,7 @@ class CheckUser extends ViewModelWidget { child: TextButton( onPressed: () { viewModel.joinChannel('$channelId'); - viewModel.updateCheckUser(); + viewModel.updateCheckUser(); }, child: Text( 'Join Channel', diff --git a/lib/ui/view/channel/channel_view/widgets/message_tile.dart b/lib/ui/view/channel/channel_view/widgets/message_tile.dart index e50e7828f..c2b1332ca 100644 --- a/lib/ui/view/channel/channel_view/widgets/message_tile.dart +++ b/lib/ui/view/channel/channel_view/widgets/message_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; class MessageTile extends StatelessWidget { final String message, avatar, name, time; diff --git a/lib/ui/view/channel/edit_channel/edit_channel_view.dart b/lib/ui/view/channel/edit_channel/edit_channel_view.dart index fd0c20f1a..8c01bfa03 100644 --- a/lib/ui/view/channel/edit_channel/edit_channel_view.dart +++ b/lib/ui/view/channel/edit_channel/edit_channel_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart b/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart index 7aca58a77..eceb3c372 100644 --- a/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart +++ b/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart @@ -1,8 +1,8 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/storage_keys.dart'; -// import 'package:hng/utilities/utilities.dart'; -// import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; +// import 'package:zurichat/utilities/utilities.dart'; +// import 'package:zurichat/utilities/utilities.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart b/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart index 069522d1d..11a092ba0 100644 --- a/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart +++ b/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import '../edit_channel_view_model.dart'; class CustomAppBars extends StatelessWidget implements PreferredSizeWidget { diff --git a/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart b/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart index 964273102..ea95a5316 100644 --- a/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart +++ b/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; class TextHeader extends StatelessWidget { final String headerText; diff --git a/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart b/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart index 8a822badc..e74ea1158 100644 --- a/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart +++ b/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class TextBox extends StatelessWidget { final String hint; diff --git a/lib/ui/view/channel/new_channel/new_channel.dart b/lib/ui/view/channel/new_channel/new_channel.dart index b391d70d4..e7c9ebcba 100644 --- a/lib/ui/view/channel/new_channel/new_channel.dart +++ b/lib/ui/view/channel/new_channel/new_channel.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart b/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart index c93c20806..46bc86439 100644 --- a/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart +++ b/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart @@ -1,8 +1,8 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; import 'package:stacked/stacked.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../../utilities/mixins/validators_mixin.dart'; import 'new_channel.form.dart'; diff --git a/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart b/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart index 9d325bb32..e7513e5e6 100644 --- a/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart +++ b/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart b/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart index 001ca832f..a5f2ffd3d 100644 --- a/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart +++ b/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart @@ -1,8 +1,8 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/models/pinned_message_model.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/models/pinned_message_model.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/widgets/channel_browser_container.dart b/lib/ui/view/channel/widgets/channel_browser_container.dart index 4ec71cea4..47a5a4333 100644 --- a/lib/ui/view/channel/widgets/channel_browser_container.dart +++ b/lib/ui/view/channel/widgets/channel_browser_container.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/view/channel/channel_list/channels_viewmodel.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/view/channel/channel_list/channels_viewmodel.dart'; import 'package:stacked/stacked.dart'; class ChannelBrowserContainer extends ViewModelWidget { diff --git a/lib/ui/view/clear_after/clear_after_view.dart b/lib/ui/view/clear_after/clear_after_view.dart index c58c99c19..f214c78b7 100644 --- a/lib/ui/view/clear_after/clear_after_view.dart +++ b/lib/ui/view/clear_after/clear_after_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import '../../../general_widgets/custom_text.dart'; import '../../shared/shared.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/clear_after/clear_after_viewmodel.dart b/lib/ui/view/clear_after/clear_after_viewmodel.dart index 44eaac794..7687e545d 100644 --- a/lib/ui/view/clear_after/clear_after_viewmodel.dart +++ b/lib/ui/view/clear_after/clear_after_viewmodel.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/clear_after/widget/date_and_time.dart b/lib/ui/view/clear_after/widget/date_and_time.dart index 4d357819d..998b10225 100644 --- a/lib/ui/view/clear_after/widget/date_and_time.dart +++ b/lib/ui/view/clear_after/widget/date_and_time.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class DateAndTime extends StatefulWidget { const DateAndTime({Key? key}) : super(key: key); diff --git a/lib/ui/view/clear_notification/clear_notification_view.dart b/lib/ui/view/clear_notification/clear_notification_view.dart index 8a3fbd972..96fd2b1dd 100644 --- a/lib/ui/view/clear_notification/clear_notification_view.dart +++ b/lib/ui/view/clear_notification/clear_notification_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'clear_notification_viewmodel.dart'; diff --git a/lib/ui/view/clear_notification/clear_notification_viewmodel.dart b/lib/ui/view/clear_notification/clear_notification_viewmodel.dart index 18cf7df65..3d8e0d09b 100644 --- a/lib/ui/view/clear_notification/clear_notification_viewmodel.dart +++ b/lib/ui/view/clear_notification/clear_notification_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/create_channel_view/create_channel_view.dart b/lib/ui/view/create_channel_view/create_channel_view.dart index 1b166fe85..7836d17e7 100644 --- a/lib/ui/view/create_channel_view/create_channel_view.dart +++ b/lib/ui/view/create_channel_view/create_channel_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/create_channel_view/create_channel_viewmodel.dart b/lib/ui/view/create_channel_view/create_channel_viewmodel.dart index 9f2299424..a1a7ea326 100644 --- a/lib/ui/view/create_channel_view/create_channel_viewmodel.dart +++ b/lib/ui/view/create_channel_view/create_channel_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/create_channel_view/widgets/custom_text_field.dart b/lib/ui/view/create_channel_view/widgets/custom_text_field.dart index 925c18bf0..6189eaee6 100644 --- a/lib/ui/view/create_channel_view/widgets/custom_text_field.dart +++ b/lib/ui/view/create_channel_view/widgets/custom_text_field.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class CustomTextField extends StatelessWidget { const CustomTextField({Key? key}) : super(key: key); diff --git a/lib/ui/view/direct_message/direct_message.dart b/lib/ui/view/direct_message/direct_message.dart index 53880a42a..c84838641 100644 --- a/lib/ui/view/direct_message/direct_message.dart +++ b/lib/ui/view/direct_message/direct_message.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:stacked/stacked_annotations.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import '../../../utilities/constants.dart'; import 'package:intl/intl.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/direct_message/direct_message_text_field_hook.dart b/lib/ui/view/direct_message/direct_message_text_field_hook.dart index 93ecb5d0a..9b2b82a5e 100644 --- a/lib/ui/view/direct_message/direct_message_text_field_hook.dart +++ b/lib/ui/view/direct_message/direct_message_text_field_hook.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; import 'direct_message_viewmodel.dart'; diff --git a/lib/ui/view/direct_message/direct_message_viewmodel.dart b/lib/ui/view/direct_message/direct_message_viewmodel.dart index 5287048b7..c20fdc250 100644 --- a/lib/ui/view/direct_message/direct_message_viewmodel.dart +++ b/lib/ui/view/direct_message/direct_message_viewmodel.dart @@ -1,9 +1,7 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; - - class DirectMessageViewModel extends FormViewModel { final _navigationService = locator(); diff --git a/lib/ui/view/dm_chat_view/dm_jump_to_view.dart b/lib/ui/view/dm_chat_view/dm_jump_to_view.dart index 9818a3a3b..9c7a553d2 100644 --- a/lib/ui/view/dm_chat_view/dm_jump_to_view.dart +++ b/lib/ui/view/dm_chat_view/dm_jump_to_view.dart @@ -2,11 +2,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/custom_channel.dart'; -import 'package:hng/general_widgets/custom_user.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/custom_channel.dart'; +import 'package:zurichat/general_widgets/custom_user.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked/stacked.dart'; import 'dm_jump_to_view.form.dart'; diff --git a/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart b/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart index 39fda9b77..21b232495 100644 --- a/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart +++ b/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../app/app.locator.dart'; @@ -50,7 +50,7 @@ class DmJumpToViewModel extends FormViewModel { yield await connectivityService.checkConnection(); } - Future?> ?fetchChannels() async { + Future?>? fetchChannels() async { try { setBusy(true); allChannelsSearch = await api.allChannelsList(); @@ -62,7 +62,7 @@ class DmJumpToViewModel extends FormViewModel { } } - Future?> ?fetchUsers() async { + Future?>? fetchUsers() async { try { setBusy(true); userSearch = (await api.fetchList()); @@ -75,8 +75,8 @@ class DmJumpToViewModel extends FormViewModel { } } - void navigateToChannel({String? name, String? id, - int? membersCount, bool? isPublic}) { + void navigateToChannel( + {String? name, String? id, int? membersCount, bool? isPublic}) { navigation.navigateTo(Routes.channelPageView, arguments: ChannelPageViewArguments( channelName: name, @@ -88,6 +88,4 @@ class DmJumpToViewModel extends FormViewModel { void navigateToUserDm() { navigation.navigateTo(Routes.dmUserView); } - - } diff --git a/lib/ui/view/dm_search/dm_search_view.dart b/lib/ui/view/dm_search/dm_search_view.dart index 818222c2f..283610009 100644 --- a/lib/ui/view/dm_search/dm_search_view.dart +++ b/lib/ui/view/dm_search/dm_search_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/dm_search/dm_search_widgets.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/dm_search/dm_search_widgets.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import 'dm_search_viewmodel.dart'; diff --git a/lib/ui/view/dm_search/dm_search_viewmodel.dart b/lib/ui/view/dm_search/dm_search_viewmodel.dart index 9e8dc2e41..5ea478e4a 100644 --- a/lib/ui/view/dm_search/dm_search_viewmodel.dart +++ b/lib/ui/view/dm_search/dm_search_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -14,8 +14,6 @@ class DmSearchViewModel extends IndexTrackingViewModel { _navigationService.back(); } - - DmSearchViewModel._internal(); init() {} diff --git a/lib/ui/view/dm_search/dm_search_widgets.dart b/lib/ui/view/dm_search/dm_search_widgets.dart index 58212dbca..bb0a30e6b 100644 --- a/lib/ui/view/dm_search/dm_search_widgets.dart +++ b/lib/ui/view/dm_search/dm_search_widgets.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class Users { String? userName; diff --git a/lib/ui/view/dm_user/dm_user_view.dart b/lib/ui/view/dm_user/dm_user_view.dart index e999e2bfa..1972964ca 100644 --- a/lib/ui/view/dm_user/dm_user_view.dart +++ b/lib/ui/view/dm_user/dm_user_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:grouped_list/grouped_list.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/dm_user/widgets/custom_start_message.dart'; -import 'package:hng/ui/view/dm_user/widgets/group_separator.dart'; -import 'package:hng/ui/view/expandable_textfield/expandable_textfield_screen.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/dm_user/widgets/custom_start_message.dart'; +import 'package:zurichat/ui/view/dm_user/widgets/group_separator.dart'; +import 'package:zurichat/ui/view/expandable_textfield/expandable_textfield_screen.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import '../../shared/colors.dart'; diff --git a/lib/ui/view/dm_user/dm_user_viewmodel.dart b/lib/ui/view/dm_user/dm_user_viewmodel.dart index e34070dd9..71dc18a8c 100644 --- a/lib/ui/view/dm_user/dm_user_viewmodel.dart +++ b/lib/ui/view/dm_user/dm_user_viewmodel.dart @@ -1,15 +1,15 @@ import 'dart:convert'; import 'dart:math'; import 'package:flutter/cupertino.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/view/dm_user/dummy_data/models/message.dart'; -import 'package:hng/ui/view/dm_user/dummy_data/models/user.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/view/dm_user/dummy_data/models/message.dart'; +import 'package:zurichat/ui/view/dm_user/dummy_data/models/user.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class DmUserViewModel extends FormViewModel { final navigationService = locator(); diff --git a/lib/ui/view/dm_user/dummy_data/models/message.dart b/lib/ui/view/dm_user/dummy_data/models/message.dart index 41944adcc..453d4a67f 100644 --- a/lib/ui/view/dm_user/dummy_data/models/message.dart +++ b/lib/ui/view/dm_user/dummy_data/models/message.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:intl/intl.dart'; import 'user.dart'; diff --git a/lib/ui/view/dm_user/dummy_data/models/user.dart b/lib/ui/view/dm_user/dummy_data/models/user.dart index 6df3ba7ad..48a8f6776 100644 --- a/lib/ui/view/dm_user/dummy_data/models/user.dart +++ b/lib/ui/view/dm_user/dummy_data/models/user.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class User { String name; diff --git a/lib/ui/view/dm_user/widgets/custom_start_message.dart b/lib/ui/view/dm_user/widgets/custom_start_message.dart index 9872e0847..263d51ebd 100644 --- a/lib/ui/view/dm_user/widgets/custom_start_message.dart +++ b/lib/ui/view/dm_user/widgets/custom_start_message.dart @@ -1,11 +1,12 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class StartMessage extends StatelessWidget { final String? userName; - const StartMessage(String username, { + const StartMessage( + String username, { Key? key, //TODO assign to app_strings.dart this.userName = 'OyinkanUA', diff --git a/lib/ui/view/dm_user/widgets/message_view.dart b/lib/ui/view/dm_user/widgets/message_view.dart index d6f3e2015..879fbd960 100644 --- a/lib/ui/view/dm_user/widgets/message_view.dart +++ b/lib/ui/view/dm_user/widgets/message_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:intl/intl.dart'; import '../dummy_data/models/message.dart'; diff --git a/lib/ui/view/dm_user/widgets/online_indicator.dart b/lib/ui/view/dm_user/widgets/online_indicator.dart index 474477344..d89d92ed2 100644 --- a/lib/ui/view/dm_user/widgets/online_indicator.dart +++ b/lib/ui/view/dm_user/widgets/online_indicator.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class OnlineIndicator extends StatelessWidget { - const OnlineIndicator(int i, {Key? key}):super(key: key); + const OnlineIndicator(int i, {Key? key}) : super(key: key); @override Widget build(BuildContext context) { return const Padding( diff --git a/lib/ui/view/do_not_disturb/do_not_disturb_view.dart b/lib/ui/view/do_not_disturb/do_not_disturb_view.dart index 846ba0861..b536c58e5 100644 --- a/lib/ui/view/do_not_disturb/do_not_disturb_view.dart +++ b/lib/ui/view/do_not_disturb/do_not_disturb_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/custom_text.dart'; diff --git a/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart b/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart index 3fcb4e266..ae43baa7f 100644 --- a/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart +++ b/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/draft/app/data.dart b/lib/ui/view/draft/app/data.dart index 51e0d1ad9..18b726cd0 100644 --- a/lib/ui/view/draft/app/data.dart +++ b/lib/ui/view/draft/app/data.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class DraftedItem { final String? username, message, time; diff --git a/lib/ui/view/draft/app/drafted_item_widget.dart b/lib/ui/view/draft/app/drafted_item_widget.dart index 66fad3d81..125b0bf3c 100644 --- a/lib/ui/view/draft/app/drafted_item_widget.dart +++ b/lib/ui/view/draft/app/drafted_item_widget.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/styles.dart'; class DraftedItemWidget extends StatelessWidget { const DraftedItemWidget({ @@ -16,41 +16,39 @@ class DraftedItemWidget extends StatelessWidget { children: [ Container( padding: const EdgeInsets.all(10.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Expanded( - flex: 1, - child: Text( - "$username", - overflow: TextOverflow.ellipsis, - style: AppTextStyles.body1Bold, - ), - ), - Text( - "$time", + child: + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Row( + children: [ + Expanded( + flex: 1, + child: Text( + "$username", overflow: TextOverflow.ellipsis, - style: AppTextStyles.normalText, + style: AppTextStyles.body1Bold, ), - ], - ), - const SizedBox( - height: 6, - ), - Text( - "$message", - overflow: TextOverflow.ellipsis, - style: AppTextStyles.normalText, ), - ] - ), + Text( + "$time", + overflow: TextOverflow.ellipsis, + style: AppTextStyles.normalText, + ), + ], + ), + const SizedBox( + height: 6, + ), + Text( + "$message", + overflow: TextOverflow.ellipsis, + style: AppTextStyles.normalText, + ), + ]), ), - const Divider( + const Divider( thickness: 1.0, ), ], ); } -} \ No newline at end of file +} diff --git a/lib/ui/view/draft/draft_view.dart b/lib/ui/view/draft/draft_view.dart index 38c52bf97..bb1766138 100644 --- a/lib/ui/view/draft/draft_view.dart +++ b/lib/ui/view/draft/draft_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/draft/drafts.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/draft/drafts.dart'; import 'package:stacked/stacked.dart'; import 'draft_viewmodel.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; @@ -29,10 +29,8 @@ class DraftView extends StatelessWidget { model.goBack(); }, orgTitle: const Text( - "Draft", - style: TextStyle( - color:AppColors.blackColor - ), + "Draft", + style: TextStyle(color: AppColors.blackColor), ), ), body: model.widgetBuilderList.isNotEmpty diff --git a/lib/ui/view/draft/draft_viewmodel.dart b/lib/ui/view/draft/draft_viewmodel.dart index 4155dd085..7c0430add 100644 --- a/lib/ui/view/draft/draft_viewmodel.dart +++ b/lib/ui/view/draft/draft_viewmodel.dart @@ -1,16 +1,16 @@ import 'dart:convert'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/draft_data_holder_model.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/draft_data_holder_model.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class DraftViewModel extends BaseViewModel { final _navigationService = locator(); @@ -77,52 +77,54 @@ class DraftViewModel extends BaseViewModel { notifyListeners(); } - void onDismissed(index){ + void onDismissed(index) { var removeDmDraft = ''; var removeChannelDraft = ''; var removeThreadDraft = ''; - var dmStoredDrafts = - _storageService.getStringList(StorageKeys.currentUserDmIdDrafts); + _storageService.getStringList(StorageKeys.currentUserDmIdDrafts); var channelStoredDrafts = - _storageService.getStringList(StorageKeys.currentUserChannelIdDrafts); + _storageService.getStringList(StorageKeys.currentUserChannelIdDrafts); var threadStoredDrafts = - _storageService.getStringList(StorageKeys.currentUserThreadIdDrafts); + _storageService.getStringList(StorageKeys.currentUserThreadIdDrafts); - if(dmStoredDrafts != null){ + if (dmStoredDrafts != null) { dmStoredDrafts.forEach((element) { - if(jsonDecode(element)['time'] == widgetBuilderList[index].time ){ + if (jsonDecode(element)['time'] == widgetBuilderList[index].time) { removeDmDraft = element; } }); } - if(channelStoredDrafts != null){ + if (channelStoredDrafts != null) { channelStoredDrafts.forEach((element) { - if(jsonDecode(element)['time'] == widgetBuilderList[index].time ){ - removeChannelDraft = element ; + if (jsonDecode(element)['time'] == widgetBuilderList[index].time) { + removeChannelDraft = element; } }); } - if( threadStoredDrafts != null){ + if (threadStoredDrafts != null) { threadStoredDrafts.forEach((element) { - if(jsonDecode(element)['time'] == widgetBuilderList[index].time ){ - removeThreadDraft = element ; + if (jsonDecode(element)['time'] == widgetBuilderList[index].time) { + removeThreadDraft = element; } }); } - if(removeDmDraft.isNotEmpty && dmStoredDrafts != null ){ + if (removeDmDraft.isNotEmpty && dmStoredDrafts != null) { dmStoredDrafts.remove(removeDmDraft); - _storageService.setStringList(StorageKeys.currentUserDmIdDrafts, dmStoredDrafts); - }else if(removeChannelDraft.isNotEmpty && channelStoredDrafts != null ){ + _storageService.setStringList( + StorageKeys.currentUserDmIdDrafts, dmStoredDrafts); + } else if (removeChannelDraft.isNotEmpty && channelStoredDrafts != null) { channelStoredDrafts.remove(removeChannelDraft); - _storageService.setStringList(StorageKeys.currentUserChannelIdDrafts, channelStoredDrafts); - }else if(removeThreadDraft.isNotEmpty && threadStoredDrafts != null ){ + _storageService.setStringList( + StorageKeys.currentUserChannelIdDrafts, channelStoredDrafts); + } else if (removeThreadDraft.isNotEmpty && threadStoredDrafts != null) { threadStoredDrafts.remove(removeThreadDraft); - _storageService.setStringList(StorageKeys.currentUserThreadIdDrafts, threadStoredDrafts); + _storageService.setStringList( + StorageKeys.currentUserThreadIdDrafts, threadStoredDrafts); } widgetBuilderList.removeAt(index); @@ -174,7 +176,7 @@ class DraftViewModel extends BaseViewModel { showDeleteDraftDialog(index) async { final result = await _dialogService.showCustomDialog( - variant: DialogType.deleteDraft, + variant: DialogType.deleteDraft, title: "Delete Draft", description: "Are you sure you want to delete this draft?", mainButtonTitle: 'Ok', @@ -182,7 +184,7 @@ class DraftViewModel extends BaseViewModel { barrierDismissible: true, ); - if(result!.confirmed){ + if (result!.confirmed) { onDismissed(index); return result.confirmed; } diff --git a/lib/ui/view/draft/drafts.dart b/lib/ui/view/draft/drafts.dart index 252732806..f93880a13 100644 --- a/lib/ui/view/draft/drafts.dart +++ b/lib/ui/view/draft/drafts.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/draft/draft_viewmodel.dart'; -import 'package:hng/ui/view/threads/test_data.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/draft/draft_viewmodel.dart'; +import 'package:zurichat/ui/view/threads/test_data.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:intl/intl.dart'; @@ -24,31 +24,28 @@ class CustomListTile extends StatelessWidget { @override Widget build(BuildContext context) { - var date =DateTime.parse(time); - String dateTime = '${DateFormat.MMMd().format(date)} at ${DateFormat.jm().format(date)}'; + var date = DateTime.parse(time); + String dateTime = + '${DateFormat.MMMd().format(date)} at ${DateFormat.jm().format(date)}'; return InkWell( - onTap: () async{ - if(route['receiverName'] != null ){ - await model.navigateToDmUserView(); - } else if(route['channelId'] != null){ - await model.navigateToChannelPage( - '${route['channelName']}', - '${route['channelId']}', - route['membersCount'], - route['public'] - ); - } else{ - List userPosts = userPost; - for(UserPost item in userPosts){ - if(route['userPostId'] == item.id){ - UserPost currentUserPost = item ; - await model.navigateToThread(currentUserPost); - } + onTap: () async { + if (route['receiverName'] != null) { + await model.navigateToDmUserView(); + } else if (route['channelId'] != null) { + await model.navigateToChannelPage('${route['channelName']}', + '${route['channelId']}', route['membersCount'], route['public']); + } else { + List userPosts = userPost; + for (UserPost item in userPosts) { + if (route['userPostId'] == item.id) { + UserPost currentUserPost = item; + await model.navigateToThread(currentUserPost); } } - model.widgetBuilderList.clear(); - model.drafts; - model.rebuild(); + } + model.widgetBuilderList.clear(); + model.drafts; + model.rebuild(); }, child: ListTile( title: Text( diff --git a/lib/ui/view/edit_profile/edit_profile_view.dart b/lib/ui/view/edit_profile/edit_profile_view.dart index 4674a4977..f516685d8 100644 --- a/lib/ui/view/edit_profile/edit_profile_view.dart +++ b/lib/ui/view/edit_profile/edit_profile_view.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/user_model.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/user_model.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart index 4dde9ac03..7bfc40b90 100644 --- a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart +++ b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart @@ -1,11 +1,11 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/user_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/user_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/edit_profile/widget/edit_profile_body.dart b/lib/ui/view/edit_profile/widget/edit_profile_body.dart index 67cc07e1c..d270a367e 100644 --- a/lib/ui/view/edit_profile/widget/edit_profile_body.dart +++ b/lib/ui/view/edit_profile/widget/edit_profile_body.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import 'package:stacked/stacked.dart'; import '../edit_profile_viewmodel.dart'; diff --git a/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart b/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart index badb2db5b..3bae36956 100644 --- a/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart +++ b/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/channel/channel_view/widgets/check_user.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/channel/channel_view/widgets/check_user.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; @@ -22,18 +22,18 @@ class ExpandableTextFieldScreen extends HookWidget { required this.sendMessage, required this.hintText, this.usercheck = true, - this.channelName, - this.channelId, + this.channelName, + this.channelId, required this.textController, required this.channelID}) : super(key: key); final Widget widget; final Function(String message) sendMessage; final String hintText; - final bool usercheck; + final bool usercheck; final focusNode = FocusNode(); final TextEditingController textController; - final String? channelName; + final String? channelName; final String? channelId; final String channelID; @@ -148,24 +148,25 @@ class ExpandableTextFieldScreen extends HookWidget { Expanded( // height: // size, - - child: !usercheck + + child: !usercheck ? CheckUser(channelId, channelName) : MyTextField( - toggleVisibility: model.toggleVisibility, - isExpanded: model.isExpanded, - controller: textController, - focus: focusNode, - hintText: hintText, - isVisible: model.isVisible, - toggleExpanded: () { - if (!model.isExpanded) { - model.toggleExpanded(true); - } else { - model.toggleExpanded(false); - } - }, - ), + toggleVisibility: + model.toggleVisibility, + isExpanded: model.isExpanded, + controller: textController, + focus: focusNode, + hintText: hintText, + isVisible: model.isVisible, + toggleExpanded: () { + if (!model.isExpanded) { + model.toggleExpanded(true); + } else { + model.toggleExpanded(false); + } + }, + ), ), Visibility( visible: model.isVisible, diff --git a/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart b/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart index 7ce2241d9..3fa2255d2 100644 --- a/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart +++ b/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart b/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart index 45f8183da..42974e59d 100644 --- a/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart +++ b/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../../general_widgets/app_alert_dialog.dart'; diff --git a/lib/ui/view/file_search/file_search_view.dart b/lib/ui/view/file_search/file_search_view.dart index 9e544a29c..8d4d3e46b 100644 --- a/lib/ui/view/file_search/file_search_view.dart +++ b/lib/ui/view/file_search/file_search_view.dart @@ -1,7 +1,7 @@ // ignore_for_file: prefer_typing_uninitialized_variables import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/file_search/widgets/search_bar.dart b/lib/ui/view/file_search/widgets/search_bar.dart index 1dbe6bffc..fc3c137a9 100644 --- a/lib/ui/view/file_search/widgets/search_bar.dart +++ b/lib/ui/view/file_search/widgets/search_bar.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart index 1dbf09f74..6a8234499 100644 --- a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart +++ b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart index e450b4f5e..677ca9be5 100644 --- a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart +++ b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart @@ -1,13 +1,13 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.form.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.form.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart index efd1d007d..febba0f21 100644 --- a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart +++ b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart index c15f868d4..ef5fb1e2d 100644 --- a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart +++ b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart @@ -1,13 +1,13 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart index 71cc4d7d3..2a1f9e428 100644 --- a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart +++ b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart index 25525c83e..6a7f06a0a 100644 --- a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart +++ b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart @@ -1,14 +1,14 @@ import 'dart:async'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/otp/otp_view.form.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/otp/otp_view.form.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/language_and_region/language_and_region_view.dart b/lib/ui/view/language_and_region/language_and_region_view.dart index 630ff2e3f..068ce00fc 100644 --- a/lib/ui/view/language_and_region/language_and_region_view.dart +++ b/lib/ui/view/language_and_region/language_and_region_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/view/language_and_region/language_and_region_viewmodel.dart b/lib/ui/view/language_and_region/language_and_region_viewmodel.dart index deab6f502..4489cc472 100644 --- a/lib/ui/view/language_and_region/language_and_region_viewmodel.dart +++ b/lib/ui/view/language_and_region/language_and_region_viewmodel.dart @@ -1,6 +1,6 @@ // ignore_for_file: avoid_print -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -17,7 +17,7 @@ class LanguageAndRegionModelViewModel extends BaseViewModel { bool automaticTimeZone = true; int currentValue = 1; - goBack() => _navigationService.back(); + goBack() => _navigationService.back(); List languages = [ EnglishUS, diff --git a/lib/ui/view/login/login_view.dart b/lib/ui/view/login/login_view.dart index 7fd10e704..93a6de41e 100644 --- a/lib/ui/view/login/login_view.dart +++ b/lib/ui/view/login/login_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/ui_helpers.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/ui_helpers.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/login/login_viewmodel.dart b/lib/ui/view/login/login_viewmodel.dart index 390de6ac9..0a0df359e 100644 --- a/lib/ui/view/login/login_viewmodel.dart +++ b/lib/ui/view/login/login_viewmodel.dart @@ -1,9 +1,9 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/user_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/user_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -85,7 +85,6 @@ class LoginViewModel extends FormViewModel { //saving user details to storage on request success if (response?.statusCode == 200) { - _storageService.setString( StorageKeys.currentSessionToken, response?.data['data']['user']['token'], @@ -100,7 +99,7 @@ class LoginViewModel extends FormViewModel { ); _storageService.clearData(StorageKeys.currentOrgId); // final userModel = UserModel.fromJson(response?.data['data']['user']); - final res = await zuriApi.get( + final res = await zuriApi.get( "https://api.zuri.chat/users/${response?.data['data']['user']['id']}"); if (res?.statusCode == 200) { _snackbarService.showCustomSnackBar( diff --git a/lib/ui/view/nav_bar/nav_bar_view.dart b/lib/ui/view/nav_bar/nav_bar_view.dart index 5fd587bca..93406d917 100644 --- a/lib/ui/view/nav_bar/nav_bar_view.dart +++ b/lib/ui/view/nav_bar/nav_bar_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_intro_page.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_intro_page.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/svg_icon.dart'; diff --git a/lib/ui/view/notifications/notifications_view.dart b/lib/ui/view/notifications/notifications_view.dart index 8640d190f..7c3e3c656 100644 --- a/lib/ui/view/notifications/notifications_view.dart +++ b/lib/ui/view/notifications/notifications_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/menu_item_tile.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/menu_item_tile.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'notifications_viewmodel.dart'; diff --git a/lib/ui/view/notifications/notifications_viewmodel.dart b/lib/ui/view/notifications/notifications_viewmodel.dart index ae2eb6968..a4d54fe94 100644 --- a/lib/ui/view/notifications/notifications_viewmodel.dart +++ b/lib/ui/view/notifications/notifications_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/onboarding/onboading_view.dart b/lib/ui/view/onboarding/onboading_view.dart index 15f3ba81f..db3b1d5ea 100644 --- a/lib/ui/view/onboarding/onboading_view.dart +++ b/lib/ui/view/onboarding/onboading_view.dart @@ -2,7 +2,7 @@ import 'dart:core'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:page_view_dot_indicator/page_view_dot_indicator.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/organization/add_organization/add_organization_view.dart b/lib/ui/view/organization/add_organization/add_organization_view.dart index 3b235877b..11111ac72 100644 --- a/lib/ui/view/organization/add_organization/add_organization_view.dart +++ b/lib/ui/view/organization/add_organization/add_organization_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'add_organization_viewmodel.dart'; diff --git a/lib/ui/view/organization/create_organization/company.dart b/lib/ui/view/organization/create_organization/company.dart index a6d12dc8e..6eec5323c 100644 --- a/lib/ui/view/organization/create_organization/company.dart +++ b/lib/ui/view/organization/create_organization/company.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../../shared/colors.dart'; import '../../../shared/long_button.dart'; import '../../../shared/text_field.dart'; diff --git a/lib/ui/view/organization/create_organization/create_organization.dart b/lib/ui/view/organization/create_organization/create_organization.dart index 7d10e1f09..f400a1f62 100644 --- a/lib/ui/view/organization/create_organization/create_organization.dart +++ b/lib/ui/view/organization/create_organization/create_organization.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'create_organization_viewmodel.dart'; import 'company.dart'; diff --git a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart index 5d87f135c..c61440465 100644 --- a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart +++ b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/create_organization/invite.dart b/lib/ui/view/organization/create_organization/invite.dart index d79eaaa99..6b4ad821d 100644 --- a/lib/ui/view/organization/create_organization/invite.dart +++ b/lib/ui/view/organization/create_organization/invite.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/organization/create_organization/project.dart b/lib/ui/view/organization/create_organization/project.dart index f803ee4c9..83720f3dc 100644 --- a/lib/ui/view/organization/create_organization/project.dart +++ b/lib/ui/view/organization/create_organization/project.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; diff --git a/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart b/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart index a24ffd1b8..9b3346e70 100644 --- a/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart +++ b/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'email_confirmation_viewmodel.dart'; diff --git a/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart b/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart index 014618196..d147a7ca1 100644 --- a/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart +++ b/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart @@ -1,10 +1,9 @@ import 'dart:io'; - // ignore: import_of_legacy_library_into_null_safe import 'package:flutter_appavailability/flutter_appavailability.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart b/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart index f04ad38f7..ec1aaf6e9 100644 --- a/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart +++ b/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; class CreateInviteLink extends StatelessWidget { @@ -79,14 +79,14 @@ class CreateInviteLink extends StatelessWidget { SizedBox( child: Column( children: [ - const ListTile( + const ListTile( leading: Icon( Icons.link_sharp, ), title: Text("Share your invite link"), ), UIHelper.horizontalSpaceSmall, - const Text( + const Text( "Create a link to share with your teammates. \n Anyone can use this link to join your zuri chat workspace"), ], ), diff --git a/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart b/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart index a35856032..5dc401250 100644 --- a/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart +++ b/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; class InviteViaEmailAdmin extends StatelessWidget { diff --git a/lib/ui/view/organization/invite_to_organization/import_contact.dart b/lib/ui/view/organization/invite_to_organization/import_contact.dart index 88344aedf..f1e0b5f75 100644 --- a/lib/ui/view/organization/invite_to_organization/import_contact.dart +++ b/lib/ui/view/organization/invite_to_organization/import_contact.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'invite_viewmodel.dart'; @@ -47,7 +47,7 @@ class ImportContacts extends StatelessWidget { children: [ const SizedBox( height: 40.0, - child: CustomSearchField( + child: CustomSearchField( searchHint: 'Select or type an email address', ), ), diff --git a/lib/ui/view/organization/invite_to_organization/invitation_sent.dart b/lib/ui/view/organization/invite_to_organization/invitation_sent.dart index 56560ae35..abd09945e 100644 --- a/lib/ui/view/organization/invite_to_organization/invitation_sent.dart +++ b/lib/ui/view/organization/invite_to_organization/invitation_sent.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/ui/shared/long_button.dart'; -import 'package:hng/ui/shared/ui_helpers.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; +import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/ui_helpers.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; class InvitationSent extends StatelessWidget { @@ -24,7 +24,8 @@ class InvitationSent extends StatelessWidget { ), body: Padding( padding: const EdgeInsets.symmetric( - horizontal: 8.0, vertical: 64.0, + horizontal: 8.0, + vertical: 64.0, ), child: Column( children: [ @@ -42,7 +43,7 @@ class InvitationSent extends StatelessWidget { title: Text("thepump@gmail.com"), ), UIHelper.verticalSpaceLarge, - const Center( + const Center( child: Text( "Has been invited as a member of zuri chat. \n They’ll be able to receive and reply in messages by email until they join."), ), diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_email.dart b/lib/ui/view/organization/invite_to_organization/invite_via_email.dart index ff88ea196..7e9822876 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_via_email.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_via_email.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; class InviteViaEmail extends StatelessWidget { diff --git a/lib/ui/view/organization/invite_to_organization/invite_viewmodel.dart b/lib/ui/view/organization/invite_to_organization/invite_viewmodel.dart index d0902b38d..9bd9fe71f 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_viewmodel.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -11,11 +11,11 @@ class InviteViewModel extends BaseViewModel { navigationService.back(); } - void navigateToContacts(){ + void navigateToContacts() { navigationService.navigateTo(Routes.importContacts); } - void navigateToInvitationSent(){ + void navigateToInvitationSent() { navigationService.navigateTo(Routes.invitationSent); } } diff --git a/lib/ui/view/organization/new_email/new_email.dart b/lib/ui/view/organization/new_email/new_email.dart index b406f081f..d073c74f0 100644 --- a/lib/ui/view/organization/new_email/new_email.dart +++ b/lib/ui/view/organization/new_email/new_email.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; diff --git a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart index 47566f06d..327b6e89e 100644 --- a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart +++ b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart b/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart index bcbc501d1..abc91c062 100644 --- a/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart @@ -1,7 +1,7 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/organization_url/organization_url_view.dart b/lib/ui/view/organization/organization_url/organization_url_view.dart index ae69b8044..1d7fde11e 100644 --- a/lib/ui/view/organization/organization_url/organization_url_view.dart +++ b/lib/ui/view/organization/organization_url/organization_url_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import '../../../shared/shared.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/organization/organization_view/organization_view.dart b/lib/ui/view/organization/organization_view/organization_view.dart index ff875f39e..b76e46865 100644 --- a/lib/ui/view/organization/organization_view/organization_view.dart +++ b/lib/ui/view/organization/organization_view/organization_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import '../../../../models/organization_model.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/organization/organization_view/organization_viewmodel.dart b/lib/ui/view/organization/organization_view/organization_viewmodel.dart index e391f7888..223acdff5 100644 --- a/lib/ui/view/organization/organization_view/organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_view/organization_viewmodel.dart @@ -1,10 +1,10 @@ import 'dart:convert'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/select_email/select_email_view.dart b/lib/ui/view/organization/select_email/select_email_view.dart index ff54b6a40..f07f61043 100644 --- a/lib/ui/view/organization/select_email/select_email_view.dart +++ b/lib/ui/view/organization/select_email/select_email_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../../utilities/enums.dart'; diff --git a/lib/ui/view/organization/select_email/select_email_viewmodel.dart b/lib/ui/view/organization/select_email/select_email_viewmodel.dart index e5a58a81c..1958bc623 100644 --- a/lib/ui/view/organization/select_email/select_email_viewmodel.dart +++ b/lib/ui/view/organization/select_email/select_email_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/otp/otp_view.dart b/lib/ui/view/otp/otp_view.dart index 30d62ff76..bc4304a0d 100644 --- a/lib/ui/view/otp/otp_view.dart +++ b/lib/ui/view/otp/otp_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/otp/otp_viewmodel.dart b/lib/ui/view/otp/otp_viewmodel.dart index ef8c3808a..b1448298f 100644 --- a/lib/ui/view/otp/otp_viewmodel.dart +++ b/lib/ui/view/otp/otp_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/password_recovery/new_password.dart b/lib/ui/view/password_recovery/new_password.dart index 7febd3c53..9fafdab81 100644 --- a/lib/ui/view/password_recovery/new_password.dart +++ b/lib/ui/view/password_recovery/new_password.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/custom_textfield.dart'; -import 'package:hng/ui/view/password_recovery/recovery_viewmodel.dart'; +import 'package:zurichat/general_widgets/custom_textfield.dart'; +import 'package:zurichat/ui/view/password_recovery/recovery_viewmodel.dart'; import 'package:stacked/stacked.dart'; class NewPassView extends StatelessWidget { diff --git a/lib/ui/view/password_recovery/recovery_view.dart b/lib/ui/view/password_recovery/recovery_view.dart index 3392d6deb..47bd3d341 100644 --- a/lib/ui/view/password_recovery/recovery_view.dart +++ b/lib/ui/view/password_recovery/recovery_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; -import 'package:hng/general_widgets/custom_textfield.dart'; -import 'package:hng/ui/view/password_recovery/recovery_viewmodel.dart'; +import 'package:zurichat/general_widgets/custom_textfield.dart'; +import 'package:zurichat/ui/view/password_recovery/recovery_viewmodel.dart'; class ForgotPassView extends StatelessWidget { const ForgotPassView({Key? key}) : super(key: key); diff --git a/lib/ui/view/password_recovery/recovery_viewmodel.dart b/lib/ui/view/password_recovery/recovery_viewmodel.dart index a7b4ab121..ac446f54e 100644 --- a/lib/ui/view/password_recovery/recovery_viewmodel.dart +++ b/lib/ui/view/password_recovery/recovery_viewmodel.dart @@ -1,6 +1,5 @@ -// import 'package:hng/app/app.router.dart'; +// import 'package:zurichat/app/app.router.dart'; import 'package:stacked/stacked.dart'; // import 'package:stacked_services/stacked_services.dart'; - class ForgotPassViewModel extends BaseViewModel {} diff --git a/lib/ui/view/popup_notification/popup_notification.dart b/lib/ui/view/popup_notification/popup_notification.dart index 1112dcdeb..9aa08dac7 100644 --- a/lib/ui/view/popup_notification/popup_notification.dart +++ b/lib/ui/view/popup_notification/popup_notification.dart @@ -1,8 +1,8 @@ // import 'dart:ui'; import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/view/popup_notification/popup_notification_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/view/popup_notification/popup_notification_viewmodel.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/preference/preference_view.dart b/lib/ui/view/preference/preference_view.dart index 9fa937af0..b0ffee54d 100644 --- a/lib/ui/view/preference/preference_view.dart +++ b/lib/ui/view/preference/preference_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/view/preference/preference_viewmodel.dart b/lib/ui/view/preference/preference_viewmodel.dart index cc8ced05a..b86448e52 100644 --- a/lib/ui/view/preference/preference_viewmodel.dart +++ b/lib/ui/view/preference/preference_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import 'package:stacked_themes/stacked_themes.dart'; diff --git a/lib/ui/view/profile_page/profile_page_viewmodel.dart b/lib/ui/view/profile_page/profile_page_viewmodel.dart index c3365f83c..e45266868 100644 --- a/lib/ui/view/profile_page/profile_page_viewmodel.dart +++ b/lib/ui/view/profile_page/profile_page_viewmodel.dart @@ -3,7 +3,7 @@ this is the view model i created to run my test, the dev in charge can delete if he sees fit */ -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; // import 'package:image_gallery_saver/image_gallery_saver.dart'; // import 'package:permission_handler/permission_handler.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/saved_items/saved_items_view.dart b/lib/ui/view/saved_items/saved_items_view.dart index 2fe91cd30..d4bd5be3a 100644 --- a/lib/ui/view/saved_items/saved_items_view.dart +++ b/lib/ui/view/saved_items/saved_items_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'saved_items_viewmodel.dart'; import 'widgets/saved_item_background.dart'; diff --git a/lib/ui/view/saved_items/saved_items_viewmodel.dart b/lib/ui/view/saved_items/saved_items_viewmodel.dart index 1c635ee7d..4ba85708c 100644 --- a/lib/ui/view/saved_items/saved_items_viewmodel.dart +++ b/lib/ui/view/saved_items/saved_items_viewmodel.dart @@ -1,13 +1,13 @@ import 'dart:convert'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/saved_item_model.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/saved_item_model.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class SavedItemsViewModel extends BaseViewModel { final _navigationService = locator(); diff --git a/lib/ui/view/saved_items/widgets/saved_item_background.dart b/lib/ui/view/saved_items/widgets/saved_item_background.dart index cad36da35..f4e268839 100644 --- a/lib/ui/view/saved_items/widgets/saved_item_background.dart +++ b/lib/ui/view/saved_items/widgets/saved_item_background.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/custom_text.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/general_widgets/custom_text.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class SavedItemBackground extends StatelessWidget { const SavedItemBackground({ @@ -9,7 +9,7 @@ class SavedItemBackground extends StatelessWidget { @override Widget build(BuildContext context) { - final _size = MediaQuery.of(context).size; + final _size = MediaQuery.of(context).size; return SizedBox( width: double.infinity, child: Column( diff --git a/lib/ui/view/set_status/set_status_view.dart b/lib/ui/view/set_status/set_status_view.dart index 25c5f9a9e..ebb56ba1a 100644 --- a/lib/ui/view/set_status/set_status_view.dart +++ b/lib/ui/view/set_status/set_status_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/sign_up/sign_up_view.dart b/lib/ui/view/sign_up/sign_up_view.dart index 3512cc77d..10d5881a5 100644 --- a/lib/ui/view/sign_up/sign_up_view.dart +++ b/lib/ui/view/sign_up/sign_up_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/sign_up/sign_up_viewmodel.dart b/lib/ui/view/sign_up/sign_up_viewmodel.dart index 8b4cf1ef4..951d01a4d 100644 --- a/lib/ui/view/sign_up/sign_up_viewmodel.dart +++ b/lib/ui/view/sign_up/sign_up_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../app/app.locator.dart'; diff --git a/lib/ui/view/splashscreen/splashscreen.dart b/lib/ui/view/splashscreen/splashscreen.dart index c44ee663f..809e97955 100644 --- a/lib/ui/view/splashscreen/splashscreen.dart +++ b/lib/ui/view/splashscreen/splashscreen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'splashscreen_viewmodel.dart'; diff --git a/lib/ui/view/splashscreen/splashscreen_viewmodel.dart b/lib/ui/view/splashscreen/splashscreen_viewmodel.dart index 2fc4dfd39..f9556cecd 100644 --- a/lib/ui/view/splashscreen/splashscreen_viewmodel.dart +++ b/lib/ui/view/splashscreen/splashscreen_viewmodel.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/start_dm/start_dm_view.dart b/lib/ui/view/start_dm/start_dm_view.dart index 20a20831e..d0a09a2cf 100644 --- a/lib/ui/view/start_dm/start_dm_view.dart +++ b/lib/ui/view/start_dm/start_dm_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_chips_input/flutter_chips_input.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/start_dm/start_dm_viewmodel.dart b/lib/ui/view/start_dm/start_dm_viewmodel.dart index 16cb9ff9e..632b9900b 100644 --- a/lib/ui/view/start_dm/start_dm_viewmodel.dart +++ b/lib/ui/view/start_dm/start_dm_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/start_dm/widgets/custom_chip_input.dart b/lib/ui/view/start_dm/widgets/custom_chip_input.dart index 36dcb8e31..08fd55f9e 100644 --- a/lib/ui/view/start_dm/widgets/custom_chip_input.dart +++ b/lib/ui/view/start_dm/widgets/custom_chip_input.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_chips_input/flutter_chips_input.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../../../models/start_dm_models.dart'; import '../../../../utilities/utilities.dart'; diff --git a/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart b/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart index 06271f8be..11d9bf828 100644 --- a/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart +++ b/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/threads/all_threads/threads_view.dart b/lib/ui/view/threads/all_threads/threads_view.dart index 442bf72e0..32a064686 100644 --- a/lib/ui/view/threads/all_threads/threads_view.dart +++ b/lib/ui/view/threads/all_threads/threads_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/threads/all_threads/widgets/thread_card.dart b/lib/ui/view/threads/all_threads/widgets/thread_card.dart index 7a1153a61..4c05e0c58 100644 --- a/lib/ui/view/threads/all_threads/widgets/thread_card.dart +++ b/lib/ui/view/threads/all_threads/widgets/thread_card.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; //The screen shown in homepage -> Threads diff --git a/lib/ui/view/threads/test_data.dart b/lib/ui/view/threads/test_data.dart index 498a2b1f9..cfcda3c18 100644 --- a/lib/ui/view/threads/test_data.dart +++ b/lib/ui/view/threads/test_data.dart @@ -1,5 +1,5 @@ -import 'package:hng/models/user_post.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/utilities/enums.dart'; List thread1 = [ UserThreadPost( diff --git a/lib/ui/view/threads/thread_detail/thread_detail_view.dart b/lib/ui/view/threads/thread_detail/thread_detail_view.dart index dc23dbb6a..ba979f1b5 100644 --- a/lib/ui/view/threads/thread_detail/thread_detail_view.dart +++ b/lib/ui/view/threads/thread_detail/thread_detail_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; @@ -14,7 +14,7 @@ import '../../../shared/smart_widgets/thread_card/thread_card_view.dart'; import '../../../shared/styles.dart'; import '../../dm_user/icons/zap_icon.dart'; import 'thread_detail_viewmodel.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; import 'thread_detail_view.form.dart'; @FormView(fields: [FormTextField(name: 'message')]) diff --git a/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart b/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart index a0813ec06..0ce273a7c 100644 --- a/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart +++ b/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart @@ -1,15 +1,15 @@ import 'dart:convert'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:intl/intl.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; import '../../../../app/app.locator.dart'; import '../../../../models/user_post.dart'; import '../../../../package/base/server-request/api/zuri_api.dart'; @@ -28,7 +28,6 @@ class ThreadDetailViewModel extends BaseViewModel { final _userService = locator(); final storageService = locator(); - List channelThreadMessages = []; late String channelMessageId; @@ -115,6 +114,7 @@ class ThreadDetailViewModel extends BaseViewModel { storeDraft(userPost, value); _navigationService.back(); } + Future sendThreadMessage(String message, String channelId) async { await _apiService.addReplyToMessage( channelMessageId, message, null, currentOrg, userId, channelId); @@ -135,40 +135,45 @@ class ThreadDetailViewModel extends BaseViewModel { var storedDraft = ''; - void getDraft(userPost){ - List? spList = storageService.getStringList(StorageKeys.currentUserThreadIdDrafts); - if (spList != null){ - for ( String encodedStoredDraft in spList) { - if(jsonDecode(encodedStoredDraft)['userPostId'] == userPost.id && - jsonDecode(encodedStoredDraft)['userPostChannelName'] == userPost.channelName - ){ + void getDraft(userPost) { + List? spList = + storageService.getStringList(StorageKeys.currentUserThreadIdDrafts); + if (spList != null) { + for (String encodedStoredDraft in spList) { + if (jsonDecode(encodedStoredDraft)['userPostId'] == userPost.id && + jsonDecode(encodedStoredDraft)['userPostChannelName'] == + userPost.channelName) { storedDraft = jsonDecode(encodedStoredDraft)['draft']; spList.remove(encodedStoredDraft); - storageService.setStringList(StorageKeys.currentUserThreadIdDrafts, spList); + storageService.setStringList( + StorageKeys.currentUserThreadIdDrafts, spList); return; } } } } - void storeDraft(userPost, value){ + void storeDraft(userPost, value) { var keyMap = { 'draft': value, - 'time' : '${DateTime.now()}', - 'userPostId' : userPost.id, - 'userPostChannelName' : userPost.channelName, - 'userPostMessage' : userPost.message, - 'userPostDisplayName' : userPost.displayName, + 'time': '${DateTime.now()}', + 'userPostId': userPost.id, + 'userPostChannelName': userPost.channelName, + 'userPostMessage': userPost.message, + 'userPostDisplayName': userPost.displayName, }; - List? spList = storageService.getStringList(StorageKeys.currentUserThreadIdDrafts); + List? spList = + storageService.getStringList(StorageKeys.currentUserThreadIdDrafts); - if(value.length > 0 && spList != null){ + if (value.length > 0 && spList != null) { spList.add(json.encode(keyMap)); - storageService.setStringList(StorageKeys.currentUserThreadIdDrafts, spList); - }else if (value.length > 0 && spList == null){ + storageService.setStringList( + StorageKeys.currentUserThreadIdDrafts, spList); + } else if (value.length > 0 && spList == null) { spList = [json.encode(keyMap)]; - storageService.setStringList(StorageKeys.currentUserThreadIdDrafts, spList); + storageService.setStringList( + StorageKeys.currentUserThreadIdDrafts, spList); } } //**draft implementation ends here diff --git a/lib/ui/view/user_search/user_search.dart b/lib/ui/view/user_search/user_search.dart index a2339829b..8addcd8fc 100644 --- a/lib/ui/view/user_search/user_search.dart +++ b/lib/ui/view/user_search/user_search.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../utilities/constants.dart'; diff --git a/lib/ui/view/user_search/user_search_not_found.dart b/lib/ui/view/user_search/user_search_not_found.dart index c8a476723..ad0254e68 100644 --- a/lib/ui/view/user_search/user_search_not_found.dart +++ b/lib/ui/view/user_search/user_search_not_found.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../shared/colors.dart'; diff --git a/lib/ui/view/user_search/user_search_view.dart b/lib/ui/view/user_search/user_search_view.dart index 4b9688396..87b3dfc02 100644 --- a/lib/ui/view/user_search/user_search_view.dart +++ b/lib/ui/view/user_search/user_search_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../nav_pages/home_page/widgets/custom_channel_list_tile.dart'; diff --git a/lib/ui/view/user_search/user_search_viewmodel.dart b/lib/ui/view/user_search/user_search_viewmodel.dart index 4e93517c8..c888bc59d 100644 --- a/lib/ui/view/user_search/user_search_viewmodel.dart +++ b/lib/ui/view/user_search/user_search_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/user_search/widget/custom_dm_list_tile.dart b/lib/ui/view/user_search/widget/custom_dm_list_tile.dart index dec4ac758..b79820afd 100644 --- a/lib/ui/view/user_search/widget/custom_dm_list_tile.dart +++ b/lib/ui/view/user_search/widget/custom_dm_list_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/view/user_search/user_search_viewmodel.dart'; +import 'package:zurichat/ui/view/user_search/user_search_viewmodel.dart'; import 'package:stacked/stacked.dart'; class CustomDMListTile extends ViewModelWidget { @@ -22,8 +22,7 @@ class CustomDMListTile extends ViewModelWidget { ), const SizedBox(width: 8), TextButton( - onPressed: viewModel.viewProfile - , + onPressed: viewModel.viewProfile, child: Text( "$userName", style: const TextStyle( diff --git a/lib/ui/view/webview_page/web_view_model.dart b/lib/ui/view/webview_page/web_view_model.dart index dfc13bed1..a853a708e 100644 --- a/lib/ui/view/webview_page/web_view_model.dart +++ b/lib/ui/view/webview_page/web_view_model.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -11,8 +11,9 @@ class WebViewModel extends BaseViewModel { isLoading = true; notifyListeners(); } + stopLoading() { isLoading = false; notifyListeners(); } -} \ No newline at end of file +} diff --git a/lib/ui/view/webview_page/webview_page.dart b/lib/ui/view/webview_page/webview_page.dart index d20928e4c..c98af6877 100644 --- a/lib/ui/view/webview_page/webview_page.dart +++ b/lib/ui/view/webview_page/webview_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:webview_flutter/webview_flutter.dart'; import 'package:stacked/stacked.dart'; import 'web_view_model.dart'; diff --git a/lib/utilities/internalization/localization/app_localization.dart b/lib/utilities/internalization/localization/app_localization.dart index 3284c9860..69a15dc6c 100644 --- a/lib/utilities/internalization/localization/app_localization.dart +++ b/lib/utilities/internalization/localization/app_localization.dart @@ -3,8 +3,8 @@ import 'dart:convert'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:hng/constants/local_keys.dart'; -import 'package:hng/utilities/internalization/local_setup.dart'; +import 'package:zurichat/constants/local_keys.dart'; +import 'package:zurichat/utilities/internalization/local_setup.dart'; class AppLocalization { ///TODO: Remove late diff --git a/lib/utilities/utilities.dart b/lib/utilities/utilities.dart index 1396b76cc..d8c107f03 100644 --- a/lib/utilities/utilities.dart +++ b/lib/utilities/utilities.dart @@ -1,6 +1,6 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/widgets.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index a710bae97..28ada1879 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: hng +name: zurichat description: A new Flutter project. publish_to: "none" version: 1.0.0+1 diff --git a/test/helpers/test_helpers.dart b/test/helpers/test_helpers.dart index 97a38e934..70a4ae56b 100644 --- a/test/helpers/test_helpers.dart +++ b/test/helpers/test_helpers.dart @@ -1,18 +1,18 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/channels_search_model.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/package/base/jump_to_request/jump_to_api.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; -import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart'; -import 'package:hng/services/centrifuge_service.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/media_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/channels_search_model.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; +import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart'; +import 'package:zurichat/services/centrifuge_service.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/media_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index 30c2b7216..4afe9a896 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -9,29 +9,29 @@ import 'dart:ui' as _i14; import 'package:centrifuge/centrifuge.dart' as _i20; import 'package:dio/dio.dart' as _i3; import 'package:flutter/material.dart' as _i11; -import 'package:hng/models/api_response.dart' as _i22; -import 'package:hng/models/channel_members.dart' as _i18; -import 'package:hng/models/channel_model.dart' as _i17; -import 'package:hng/models/channels_search_model.dart' as _i28; -import 'package:hng/models/organization_member_model.dart' as _i6; -import 'package:hng/models/organization_model.dart' as _i5; -import 'package:hng/models/user_model.dart' as _i8; -import 'package:hng/models/user_search_model.dart' as _i23; -import 'package:hng/package/base/jump_to_request/jump_to_api.dart' as _i27; -import 'package:hng/package/base/server-request/api/zuri_api.dart' as _i21; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart' +import 'package:zurichat/models/api_response.dart' as _i22; +import 'package:zurichat/models/channel_members.dart' as _i18; +import 'package:zurichat/models/channel_model.dart' as _i17; +import 'package:zurichat/models/channels_search_model.dart' as _i28; +import 'package:zurichat/models/organization_member_model.dart' as _i6; +import 'package:zurichat/models/organization_model.dart' as _i5; +import 'package:zurichat/models/user_model.dart' as _i8; +import 'package:zurichat/models/user_search_model.dart' as _i23; +import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart' as _i27; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart' as _i21; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart' as _i16; -import 'package:hng/package/base/server-request/dms/dms_api_service.dart' +import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart' as _i15; -import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart' +import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart' as _i30; -import 'package:hng/services/centrifuge_service.dart' as _i19; -import 'package:hng/services/connectivity_service.dart' as _i25; -import 'package:hng/services/local_storage_services.dart' as _i9; -import 'package:hng/services/media_service.dart' as _i29; -import 'package:hng/services/user_service.dart' as _i7; -import 'package:hng/utilities/enums.dart' as _i26; -import 'package:hng/utilities/failures.dart' as _i4; +import 'package:zurichat/services/centrifuge_service.dart' as _i19; +import 'package:zurichat/services/connectivity_service.dart' as _i25; +import 'package:zurichat/services/local_storage_services.dart' as _i9; +import 'package:zurichat/services/media_service.dart' as _i29; +import 'package:zurichat/services/user_service.dart' as _i7; +import 'package:zurichat/utilities/enums.dart' as _i26; +import 'package:zurichat/utilities/failures.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; import 'package:stacked_services/stacked_services.dart' as _i10; import 'package:stacked_themes/src/theme_manager.dart' as _i13; diff --git a/test/services/bottom_sheet_service_test.dart b/test/services/bottom_sheet_service_test.dart index 3178d9d18..3532db6f2 100644 --- a/test/services/bottom_sheet_service_test.dart +++ b/test/services/bottom_sheet_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/services/dialog_service_test.dart b/test/services/dialog_service_test.dart index 44d90bcb9..884cc6371 100644 --- a/test/services/dialog_service_test.dart +++ b/test/services/dialog_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/services/local_storage_services_test.dart b/test/services/local_storage_services_test.dart index 0a4b2af5f..869b2e7d9 100644 --- a/test/services/local_storage_services_test.dart +++ b/test/services/local_storage_services_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; void main() { group('LocalStorageServiceTest -', () { diff --git a/test/services/navigation_service_test.dart b/test/services/navigation_service_test.dart index f6eb096d1..2854703c4 100644 --- a/test/services/navigation_service_test.dart +++ b/test/services/navigation_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/view/login/login_viewmodel.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/view/login/login_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/services/user_service_test.dart b/test/services/user_service_test.dart index 804d7675f..4fc22bbe6 100644 --- a/test/services/user_service_test.dart +++ b/test/services/user_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/user_service.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/user_service.dart'; void main() { group('UserServiceTest -', () { diff --git a/test/view_models/add_people_viewmodel_test.dart b/test/view_models/add_people_viewmodel_test.dart index 32e113e26..45b1d7f74 100644 --- a/test/view_models/add_people_viewmodel_test.dart +++ b/test/view_models/add_people_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/add_people/add_people_viewmodel.dart'; +import 'package:zurichat/ui/view/add_people/add_people_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/advanced_viewmodel_test.dart b/test/view_models/advanced_viewmodel_test.dart index 4ffac81d2..0abbe40f1 100644 --- a/test/view_models/advanced_viewmodel_test.dart +++ b/test/view_models/advanced_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/advanced/advanced_viewmodel.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/view/advanced/advanced_viewmodel.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_add_people_viewmodel_test.dart b/test/view_models/channel_add_people_viewmodel_test.dart index c3fe9c40e..8a6976ce2 100644 --- a/test/view_models/channel_add_people_viewmodel_test.dart +++ b/test/view_models/channel_add_people_viewmodel_test.dart @@ -1,7 +1,7 @@ -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/ui/view/channel/add_people/channel_add_people_viewmodel.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/ui/view/channel/add_people/channel_add_people_viewmodel.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_info_view_model_test.dart b/test/view_models/channel_info_view_model_test.dart index 33e64b117..3dcd7824b 100644 --- a/test/view_models/channel_info_view_model_test.dart +++ b/test/view_models/channel_info_view_model_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_members_list_model_test.dart b/test/view_models/channel_members_list_model_test.dart index dbb747259..ea05ae380 100644 --- a/test/view_models/channel_members_list_model_test.dart +++ b/test/view_models/channel_members_list_model_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/channel/channel_members/channel_members_list_model.dart'; +import 'package:zurichat/ui/view/channel/channel_members/channel_members_list_model.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_notification_viewmodel_test.dart b/test/view_models/channel_notification_viewmodel_test.dart index bc1030de7..0e23d3950 100644 --- a/test/view_models/channel_notification_viewmodel_test.dart +++ b/test/view_models/channel_notification_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/channel/channel_notification/channel_notification_viewmodel.dart'; +import 'package:zurichat/ui/view/channel/channel_notification/channel_notification_viewmodel.dart'; import '../helpers/test_helpers.dart'; // This is a test setup diff --git a/test/view_models/channels_viewmodel_test.dart b/test/view_models/channels_viewmodel_test.dart index 1ae1c87a6..ea870b25a 100644 --- a/test/view_models/channels_viewmodel_test.dart +++ b/test/view_models/channels_viewmodel_test.dart @@ -1,7 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/models/app_model.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/ui/view/channel/channel_list/channels_viewmodel.dart'; +import 'package:zurichat/models/app_model.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/ui/view/channel/channel_list/channels_viewmodel.dart'; import '../helpers/test_helpers.dart'; // This is a test setup diff --git a/test/view_models/dm_jump_to_viewmodel_test.dart b/test/view_models/dm_jump_to_viewmodel_test.dart index dc0d92bfd..5a2c21026 100644 --- a/test/view_models/dm_jump_to_viewmodel_test.dart +++ b/test/view_models/dm_jump_to_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart'; +import 'package:zurichat/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart'; import '../helpers/test_helpers.dart'; void main() { diff --git a/test/view_models/dm_user_viewmodel_test.dart b/test/view_models/dm_user_viewmodel_test.dart index f9ce091c9..31386d00c 100644 --- a/test/view_models/dm_user_viewmodel_test.dart +++ b/test/view_models/dm_user_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/dm_user/dm_user_viewmodel.dart'; +import 'package:zurichat/ui/view/dm_user/dm_user_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/forgot_password_email_viewmodel_test.dart b/test/view_models/forgot_password_email_viewmodel_test.dart index 5f4a7a3fd..065a050f5 100644 --- a/test/view_models/forgot_password_email_viewmodel_test.dart +++ b/test/view_models/forgot_password_email_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/forgot_password_new_viewmodel_test.dart b/test/view_models/forgot_password_new_viewmodel_test.dart index c415255c1..60dd6d18e 100644 --- a/test/view_models/forgot_password_new_viewmodel_test.dart +++ b/test/view_models/forgot_password_new_viewmodel_test.dart @@ -1,27 +1,27 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; void main() { group('Forgot password New ViewModel Test -', () { - group('initialise/navigation -', () { - setUp(() => registerServices()); - tearDown(() => unregisterServices()); - test('when called, check if new password is valid', () { - final model = ForgotPasswordNewViewModel(); - var valid = model.passValidation("Test1234"); - expect(valid, true); - }); + group('initialise/navigation -', () { + setUp(() => registerServices()); + tearDown(() => unregisterServices()); + test('when called, check if new password is valid', () { + final model = ForgotPasswordNewViewModel(); + var valid = model.passValidation("Test1234"); + expect(valid, true); + }); - test('when called navigate to login view if password is valid', () { + test('when called navigate to login view if password is valid', () { final service = getAndRegisterNavigationServiceMock(); final model = ForgotPasswordNewViewModel(); model.passValidation("Test1234"); verify(service.navigateTo(Routes.loginView)); }); - }); + }); }); } diff --git a/test/view_models/forgot_password_otp_viewmodel_test.dart b/test/view_models/forgot_password_otp_viewmodel_test.dart index fd2b3a28e..7e9425bb0 100644 --- a/test/view_models/forgot_password_otp_viewmodel_test.dart +++ b/test/view_models/forgot_password_otp_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; +import 'package:zurichat/app/app.router.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; @@ -13,7 +13,6 @@ void main() { final service = getAndRegisterNavigationServiceMock(); verify(service.navigateTo(Routes.forgotPasswordNewView)); }); - }); }); } diff --git a/test/view_models/login_viewmodel_test.dart b/test/view_models/login_viewmodel_test.dart index 00625c587..364374be2 100644 --- a/test/view_models/login_viewmodel_test.dart +++ b/test/view_models/login_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/login/login_viewmodel.dart'; +import 'package:zurichat/ui/view/login/login_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/notifications_viewmodel_test.dart b/test/view_models/notifications_viewmodel_test.dart index 5f880bc69..f672e8496 100644 --- a/test/view_models/notifications_viewmodel_test.dart +++ b/test/view_models/notifications_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/notifications/notifications_viewmodel.dart'; +import 'package:zurichat/ui/view/notifications/notifications_viewmodel.dart'; import '../helpers/test_helpers.dart'; void main() { diff --git a/test/view_models/otp_viewmodel_test.dart b/test/view_models/otp_viewmodel_test.dart index a2aa570b8..661b0b0b5 100644 --- a/test/view_models/otp_viewmodel_test.dart +++ b/test/view_models/otp_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/view/otp/otp_viewmodel.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/view/otp/otp_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; @@ -17,8 +17,7 @@ void main() { verify(service.navigateTo(Routes.loginView)); }); - test('when called, loading indicator is disabled', - () { + test('when called, loading indicator is disabled', () { final model = OTPViewModel(); var load = model.isLoading; expect(load, false); diff --git a/test/view_models/plugin_viewmodel_test.dart b/test/view_models/plugin_viewmodel_test.dart index fb106d766..0bd85eb16 100644 --- a/test/view_models/plugin_viewmodel_test.dart +++ b/test/view_models/plugin_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/you_page_viewmodel_test.dart b/test/view_models/you_page_viewmodel_test.dart index 76762ede1..913166ca9 100644 --- a/test/view_models/you_page_viewmodel_test.dart +++ b/test/view_models/you_page_viewmodel_test.dart @@ -1,8 +1,8 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; +import 'package:zurichat/app/app.router.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; -import 'package:hng/ui/nav_pages/you_page/you_page_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/you_page/you_page_viewmodel.dart'; void main() { group('YouPageViewModelTest -', () { @@ -34,7 +34,7 @@ void main() { }); group('navigateToViewProfile -', () { test('when called, it takes user to the edit profile page', () async { - //TODO write proper test + //TODO write proper test }); }); group('navigateToViewNotification -', () { From 386b71b47991202730809eef36533665237f2b67 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Wed, 13 Oct 2021 13:01:43 +0100 Subject: [PATCH 07/20] changed package id --- android/app/build.gradle | 2 +- .../channel_view/channel_page_viewmodel.dart | 27 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 165495c66..d8ce10d61 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -34,7 +34,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.zuri.app" + applicationId "com.zuri.chat.app" minSdkVersion 19 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() diff --git a/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart b/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart index 3902bc6a5..9910d07d4 100644 --- a/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart +++ b/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart @@ -220,19 +220,20 @@ class ChannelPageViewModel extends FormViewModel { channelUserMessages?.add( UserPost( - id: data['_id'], - displayName: userid, - statusIcon: '7️⃣', - moment: Moment.now().from(DateTime.parse(data['timestamp'])), - message: data['content'], - channelType: ChannelType.public, - postEmojis: [], - userThreadPosts: [], - channelName: channelId, - userImage: 'assets/images/chimamanda.png', - userId: userid, - channelId: channelId, - pinned: data['pinned']), + id: data['_id'], + displayName: userid, + statusIcon: '7️⃣', + moment: Moment.now().from(DateTime.parse(data['timestamp'])), + message: data['content'], + channelType: ChannelType.public, + postEmojis: [], + userThreadPosts: [], + channelName: channelId, + userImage: 'assets/images/chimamanda.png', + userId: userid, + channelId: channelId, + pinned: data['pinned'], + ), ); }); isLoading = false; From 0305c9b790816247ca77234399f5356dcc132bb3 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Wed, 13 Oct 2021 16:43:49 +0100 Subject: [PATCH 08/20] fixed issues --- lib/app/app.dart | 4 +- lib/app/app.router.dart | 3 +- .../sign_out_bottom_sheet_view.dart | 36 +++++++ .../sign_out_botton_sheet_viewmodel.dart | 5 + .../pinned_messages/pinned_messages_view.dart | 2 +- .../admin_permissions/create_invite_link.dart | 2 +- .../admin_permissions/invite_via_email.dart | 2 +- .../invitation_sent.dart | 10 +- .../invite_via_email.dart | 97 ------------------- .../invite_via_email/invite_via_email.dart | 11 ++- .../invite_via_email/invite_viewmodel.dart | 16 +-- .../invite_viewmodel.dart | 21 ---- .../different_email_organization_view.dart | 1 + ...ifferent_email_organization_viewmodel.dart | 1 + test/helpers/test_helpers.dart | 1 + test/helpers/test_helpers.mocks.dart | 35 +++---- 16 files changed, 91 insertions(+), 156 deletions(-) delete mode 100644 lib/ui/view/organization/invite_to_organization/invite_via_email.dart delete mode 100644 lib/ui/view/organization/invite_to_organization/invite_viewmodel.dart diff --git a/lib/app/app.dart b/lib/app/app.dart index fb3f57667..430986b5a 100644 --- a/lib/app/app.dart +++ b/lib/app/app.dart @@ -7,9 +7,9 @@ import 'package:zurichat/ui/nav_pages/plugin_page/plugin_page_view.dart'; import 'package:zurichat/ui/view/direct_message/direct_message.dart'; import 'package:zurichat/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart'; import 'package:zurichat/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/import_contact.dart'; import 'package:zurichat/ui/view/organization/invite_to_organization/invitation_sent.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart'; import 'package:zurichat/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart'; import 'package:zurichat/ui/view/threads/all_threads/threads_view.dart'; import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart'; diff --git a/lib/app/app.router.dart b/lib/app/app.router.dart index 95588a5ae..416b7a9d5 100644 --- a/lib/app/app.router.dart +++ b/lib/app/app.router.dart @@ -6,6 +6,7 @@ // ignore_for_file: public_member_api_docs +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; @@ -51,8 +52,8 @@ import '../ui/view/organization/add_organization/add_organization_view.dart'; import '../ui/view/organization/create_organization/create_organization.dart'; import '../ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart'; import '../ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart'; -import '../ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart'; import '../ui/view/organization/invite_to_organization/invitation_sent.dart'; +import '../ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart'; import '../ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart'; import '../ui/view/organization/organization_different_email/different_email_organization_view.dart'; import '../ui/view/organization/organization_url/organization_url_view.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart index 4fdbc8b55..1c63e0913 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart @@ -32,6 +32,42 @@ class SignOutBottomSheet extends StatelessWidget { workSpaceTitle: org.name, workSpaceSlackUrl: org.organizationUrl, ), + GestureDetector( + onTap: () { + // model.dismissDialog(); + // model.showSignOutDialog(org.name ?? ""); + }, + child: const ListTile( + title: CustomText( + text: 'Invite members', + fontWeight: FontWeight.w700, + fontSize: 16, + color: AppColors.zuriPrimaryColor, + ), + leading: Icon( + Icons.logout_sharp, + color: AppColors.zuriPrimaryColor, + ), + ), + ), + GestureDetector( + onTap: () { + model.dismissDialog(); + model.showSignOutDialog(org.name ?? ""); + }, + child: const ListTile( + title: CustomText( + text: 'Organization settings', + fontWeight: FontWeight.w700, + fontSize: 16, + color: AppColors.zuriPrimaryColor, + ), + leading: Icon( + Icons.settings, + color: AppColors.zuriPrimaryColor, + ), + ), + ), GestureDetector( onTap: () { model.dismissDialog(); diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart index 5528b617b..fdfbe559f 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart @@ -1,5 +1,6 @@ import 'package:zurichat/app/app.locator.dart'; import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/organization_model.dart'; import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import 'package:zurichat/services/connectivity_service.dart'; import 'package:zurichat/services/local_storage_services.dart'; @@ -25,6 +26,10 @@ class SignOutBottomSheetViewModel extends BaseViewModel { } } + void navigateToWorkSpaceSettings(OrganizationModel org) { + _navigator.navigateTo(Routes.startDmView); + } + void navigateToSignIn() => _navigator.pushNamedAndRemoveUntil(Routes.loginView); diff --git a/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart b/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart index e7513e5e6..66c2b36b8 100644 --- a/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart +++ b/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/ui/shared/shared.dart'; import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart b/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart index ec1aaf6e9..26b6dde87 100644 --- a/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart +++ b/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:zurichat/ui/shared/shared.dart'; import 'package:zurichat/ui/shared/styles.dart'; import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; class CreateInviteLink extends StatelessWidget { diff --git a/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart b/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart index 5dc401250..8af56479a 100644 --- a/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart +++ b/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:zurichat/ui/shared/shared.dart'; import 'package:zurichat/ui/shared/styles.dart'; import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; class InviteViaEmailAdmin extends StatelessWidget { diff --git a/lib/ui/view/organization/invite_to_organization/invitation_sent.dart b/lib/ui/view/organization/invite_to_organization/invitation_sent.dart index 478563868..b9c05db48 100644 --- a/lib/ui/view/organization/invite_to_organization/invitation_sent.dart +++ b/lib/ui/view/organization/invite_to_organization/invitation_sent.dart @@ -1,10 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/styles.dart'; import 'package:zurichat/ui/shared/ui_helpers.dart'; import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; class InvitationSent extends StatelessWidget { const InvitationSent({Key? key}) : super(key: key); @@ -66,7 +68,11 @@ class InvitationSent extends StatelessWidget { ), const Spacer(), LongButton( - label: "Done",), + onPressed: () { + model.navigateToHome(); + }, + label: "Done", + ), ], ), ), diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_email.dart b/lib/ui/view/organization/invite_to_organization/invite_via_email.dart deleted file mode 100644 index 7e9822876..000000000 --- a/lib/ui/view/organization/invite_to_organization/invite_via_email.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_viewmodel.dart'; -import 'package:stacked/stacked.dart'; - -class InviteViaEmail extends StatelessWidget { - const InviteViaEmail({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return ViewModelBuilder.reactive( - viewModelBuilder: () => InviteViewModel(), - builder: (BuildContext context, InviteViewModel model, Widget? children) { - return Scaffold( - appBar: ZuriAppBar( - leading: Icons.close, - leadingPress: () { - model.navigateBack(); - }, - whiteBackground: true, - orgTitle: Text( - 'Invite', - style: AppTextStyles.heading7, - ), - actions: [ - Padding( - padding: const EdgeInsets.fromLTRB(0.0, 16.0, 20.0, 0.0), - child: InkWell( - child: Text( - "Send Request", - style: AppTextStyles.body1Green, - ), - highlightColor: Colors.transparent, - splashColor: Colors.transparent, - onTap: () {}), - ), - ], - ), - body: Padding( - padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 16), - child: Column( - children: [ - const Center( - child: Text( - "Fill in who you'd like to invite. Your request will be sent to \n the admin for approval.", - //style: AppTextStyles.body2_400, - ), - ), - UIHelper.verticalSpaceLarge, - Container( - color: AppColors.whiteColor, - child: TextField( - cursorColor: AppColors.zuriPrimaryColor, - keyboardType: TextInputType.emailAddress, - decoration: InputDecoration( - prefixIcon: const Icon( - Icons.email_outlined, - ), - labelText: "Add an Email Address", - border: border(), - focusedBorder: border(), - enabledBorder: border(), - ), - ), - ), - UIHelper.verticalSpaceLarge, - ElevatedButton( - style: ElevatedButton.styleFrom( - primary: AppColors.whiteColor, - ), - onPressed: () { - model.navigateToContacts(); - }, - child: const ListTile( - leading: Icon(Icons.person_sharp), - title: Text("Invite from contacts"), - ), - ), - ], - ), - ), - ); - }, - ); - } -} - -OutlineInputBorder border({Color? color}) { - return OutlineInputBorder( - borderSide: BorderSide( - color: Colors.grey[300] ?? AppColors.greyColor, - ), - borderRadius: BorderRadius.circular(4), - ); -} diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart index 7ba54e42b..a0fa6a603 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart @@ -1,12 +1,13 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/ui_helpers.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'invite_via_email.form.dart'; +import 'invite_viewmodel.dart'; @FormView(fields: [ FormTextField(name: 'email'), diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart index 4c4a49250..80dd96b6c 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart @@ -1,13 +1,13 @@ import 'package:dio/dio.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; -import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import '../../../../../../app/app.logger.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/invite_to_organization/invite_viewmodel.dart b/lib/ui/view/organization/invite_to_organization/invite_viewmodel.dart deleted file mode 100644 index 9bd9fe71f..000000000 --- a/lib/ui/view/organization/invite_to_organization/invite_viewmodel.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:stacked/stacked.dart'; -import 'package:stacked_services/stacked_services.dart'; - -class InviteViewModel extends BaseViewModel { - final navigationService = locator(); - final snackbar = locator(); - - void navigateBack() { - navigationService.back(); - } - - void navigateToContacts() { - navigationService.navigateTo(Routes.importContacts); - } - - void navigateToInvitationSent() { - navigationService.navigateTo(Routes.invitationSent); - } -} diff --git a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart index d1bdba799..49826f79b 100644 --- a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart +++ b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_field.dart'; import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart b/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart index c0f6a6db1..94657c1bf 100644 --- a/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart @@ -1,5 +1,6 @@ import 'package:zurichat/app/app.locator.dart'; import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:zurichat/utilities/enums.dart'; import 'package:zurichat/utilities/mixins/validators_mixin.dart'; import 'package:stacked/stacked.dart'; diff --git a/test/helpers/test_helpers.dart b/test/helpers/test_helpers.dart index 70a4ae56b..3c9be1073 100644 --- a/test/helpers/test_helpers.dart +++ b/test/helpers/test_helpers.dart @@ -239,3 +239,4 @@ void _removeRegistrationIfExists() { locator.unregister(); } } + diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index 3f957aca4..96a5f3735 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -1,5 +1,5 @@ // Mocks generated by Mockito 5.0.15 from annotations -// in hng/test/helpers/test_helpers.dart. +// in zurichat/test/helpers/test_helpers.dart. // Do not manually edit this file. import 'dart:async' as _i2; @@ -9,33 +9,34 @@ import 'dart:ui' as _i14; import 'package:centrifuge/centrifuge.dart' as _i21; import 'package:dio/dio.dart' as _i3; import 'package:flutter/material.dart' as _i11; -import 'package:zurichat/models/api_response.dart' as _i22; -import 'package:zurichat/models/channel_members.dart' as _i18; -import 'package:zurichat/models/channel_model.dart' as _i17; -import 'package:zurichat/models/channels_search_model.dart' as _i28; +import 'package:mockito/mockito.dart' as _i1; +import 'package:stacked_services/stacked_services.dart' as _i10; +import 'package:stacked_themes/src/theme_manager.dart' as _i13; +import 'package:stacked_themes/src/theme_service.dart' as _i12; +import 'package:zurichat/models/api_response.dart' as _i23; +import 'package:zurichat/models/channel_members.dart' as _i19; +import 'package:zurichat/models/channel_model.dart' as _i18; +import 'package:zurichat/models/channels_search_model.dart' as _i29; import 'package:zurichat/models/organization_member_model.dart' as _i6; import 'package:zurichat/models/organization_model.dart' as _i5; +import 'package:zurichat/models/pinned_message_model.dart' as _i17; import 'package:zurichat/models/user_model.dart' as _i8; -import 'package:zurichat/models/user_search_model.dart' as _i23; -import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart' as _i27; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart' as _i21; +import 'package:zurichat/models/user_search_model.dart' as _i24; +import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart' as _i28; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart' as _i22; import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart' as _i16; import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart' as _i15; import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart' - as _i30; -import 'package:zurichat/services/centrifuge_service.dart' as _i19; -import 'package:zurichat/services/connectivity_service.dart' as _i25; + as _i31; +import 'package:zurichat/services/centrifuge_service.dart' as _i20; +import 'package:zurichat/services/connectivity_service.dart' as _i26; import 'package:zurichat/services/local_storage_services.dart' as _i9; -import 'package:zurichat/services/media_service.dart' as _i29; +import 'package:zurichat/services/media_service.dart' as _i30; import 'package:zurichat/services/user_service.dart' as _i7; -import 'package:zurichat/utilities/enums.dart' as _i26; +import 'package:zurichat/utilities/enums.dart' as _i27; import 'package:zurichat/utilities/failures.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:stacked_services/stacked_services.dart' as _i10; -import 'package:stacked_themes/src/theme_manager.dart' as _i13; -import 'package:stacked_themes/src/theme_service.dart' as _i12; // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters From cb2f9277d9c3237e4c8993688573921e838919cc Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Thu, 14 Oct 2021 06:41:14 +0100 Subject: [PATCH 09/20] Workspace settings, phase 1 --- assets/logo/zuri_word_and_logo.png | Bin 0 -> 4385 bytes lib/app/app.dart | 6 + lib/app/app.router.dart | 64 +++++++++ lib/package/base/server-request/api/api.dart | 3 +- .../base/server-request/api/zuri_api.dart | 7 +- lib/services/media_service.dart | 14 +- .../sign_out_bottom_sheet_view.dart | 15 +- .../sign_out_botton_sheet_viewmodel.dart | 5 +- .../shared/dialogs/image_source_dialog.dart | 42 ++++++ lib/ui/shared/setup_dialog_ui.dart | 5 +- lib/ui/shared/text_field.dart | 11 +- .../organization_icon.dart | 79 +++++++++++ .../organization_name_url.dart | 132 ++++++++++++++++++ .../organization_settings_view.dart | 120 ++++++++++++++++ .../organization_settings_view_model.dart | 93 ++++++++++++ lib/utilities/enums.dart | 1 + lib/utilities/mixins/validators_mixin.dart | 12 ++ test/helpers/test_helpers.dart | 4 +- test/helpers/test_helpers.mocks.dart | 14 +- test/services/media_service_test.dart | 4 +- 20 files changed, 595 insertions(+), 36 deletions(-) create mode 100644 assets/logo/zuri_word_and_logo.png create mode 100644 lib/ui/shared/dialogs/image_source_dialog.dart create mode 100644 lib/ui/view/organization/organization_settings/organization_icon.dart create mode 100644 lib/ui/view/organization/organization_settings/organization_name_url.dart create mode 100644 lib/ui/view/organization/organization_settings/organization_settings_view.dart create mode 100644 lib/ui/view/organization/organization_settings/organization_settings_view_model.dart diff --git a/assets/logo/zuri_word_and_logo.png b/assets/logo/zuri_word_and_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..b2d1e29da17d3020bd972ce3e766c9da6e0ff582 GIT binary patch literal 4385 zcmds5SyU40+6J6TEwfC`AuG~SQ+H`v;Xvh-^H6FIQMy$e&=PR~QQYmFBii6ti36#n zsZmZrVVP-VfnyGYrbeI$P9-QRznzPJt#i)$FZMZi|HZqW^}cI;-^KGi@AnQFZZ3A) zWYuH=0Km3$_SPN%0MPB1ZIRxLOmlQbHeu^k`-?~b;E3Zd16EoTJlYHbksfwu0QEGD z=}kv6^tAJ70DzP$w{}Ge0NBxd&ieHE1R#$Ii!2GnzFO!Cdjt1PcQin_-6h9*wCkj6 z9^I<+pla6@<^|u3a-Lq)hx&e;q>7V6OjnWht}wHH`^W86_a(LP?cT4=eWaG& zA1HvvTf4b>pSJLQ8{5pk9xfHT|9+ZE`-t(eV;-GdUENp)Ump@Td)TizaykHTH!?Yy z>i;5v6raeOjR;1g$?=p1+3DYzHx1Q$4(Sk1_+X!agRgWv7xh!R`AiC?SCaF`5}RJ= zNiWq4rQM$v_eLJSoSp7s__I}80)2V%mFK!UJBJ7PkZPpC!J7lghixl7>COQPVaL@h z;$jxRmEU8E10>WumuFJxUS@)h#-wp7Hh3;npo}}cgV_7%(W9~0wqu^#4rxltWjB~Dzxjw$wp&se$#U=8*P2it@-ypmVYEaj+i(#sb= z`W#t{tnN|`b#;n~vGLN&jd7R)e2~@~UbGsELJE>QhG@$u4B=F{* z8brCw6uQ6tV!kc0p3#iZ2fU!1_;a0b3p4rsYNN4j8D=v6THp>qL32csxA^;TRk(;v zYi)XxwiTz{v4^8PJ8~W&*1-G4?FAlbNYNpOLpZde_T0{BNu|q)Su~8f22hhap#W^n zP?wN}{(%D>+hur0(+j!L-SLw0;kC%>!j0&Z=+vs; zK$<(!Xd6L^i?ddZhJ^i=Y_NF6h&55@Qt(_qS{W`2)CAnIy35C#Gorp1iUV@!&0=mD zL^2lOwEkn<(c4^b=b6;qGfg9_U6I=5WXSs(+}iS8uE5k zfB&$ORoHFxecTXnZTuaNb!&n0L5oLz){_KsU?*`u8g);!iNb2zM+D5Fdh7;l7~-F^ zF=Agn;xsXxr<%C;)WVckCz2HHMP#?t8JgU~_34h!y2ZL|flqBcT(bBk{9dSc2mEfx zF1J%GkM3%IW7dDn_jX*bV0&Rbr*G(tXe$RWoHCa%ow+XH>-8vsP63vazNW?qU#B@T zc;cRfVopyMkjKVO$aLHqUw?B9-Nj@TYrXUj8HW#1EON$Nj(U(t73zB@iQhxxK-w?F~fWr+FJw=q9IzV}F8^9?HzMC!7LrMhP! zg54Z7PhnM7f~DA-mmQk!zNDW5tEbKnNs(=#>iqECrRi{PK#?IU#dq}pz-)h+v&zJD zdhNKCXPKj97gnQav-jK>xoAL5yWnlX0pgm(30oi|{Gjzw-FI+|;J}%*4c48c!#_3zN@Q1PST<$j+v~pF@s=^La*JUO z+(F>~Z+O6vi z5s`*@!V~jV4w2B`x)EtHxRTPSM&GIrE{iy_(O+tbB{!Zc zp`Q$lshvrJ>FDTusPoNYU#1f*UebBxX?uP1=ibJA=AOI~>@=}|f1olD`!!VtO?)#l zGSdE4(XG{{D@T)y$l1~R8eFE?G{)da2Xr8ll9J9g$3MF!*+^XGF}!_XNF>s>Lc$gb zIlR2Hp_8WKWq4p!IF+j+ef{NpM5K6Q{iQ{7i(Z`Xz{s6QT}Rp{YV=X<6jr`BdR#;X zcW)q@)aa1S43CIBZu`f=b;!w+7r9i@a(_%gein}EH?J(dID6z2`UgBZ@A-WdSdu$b z2B(`O*P(zY>2>WG9l-L;SH9h8vJ)WuM2eJ-7r+oW*O& zgGMhOoyoQtMHP`7N>Ax)%s4HDSpgAGy7pooe^!_b*D!Lyl0KAg?=IdHwYpw2=5w)h z=R@PTs2=kWN#>!lZA#!muwBjoc}~vgg_{qIO)K$Rw#<=K-@F-$a#>OitiI(=TdhTg zn>!XsU&om`F^xqXajj(Hc`sLUGgQIhlX-E!ZGm6!cvnSRcCu4PWDl3CK$Z(IsaY3O zOVHO(L)F`FSB7M{hccfTyq%ylr*4-{i!uF^h&TQG$py5Ne$M(CpG-@*@+>U)>K3@f ziBb5J%|0$6`fJGK3P~^UNl|Cy*C(GB69~$5;P0|+sTzoZ zDAH$R(?>o_CtI_jX6Z!yXoEO;LEaF^1gr~akBGH)>c%TV_`@lic(;O?WqD{<_wSDUZ;5$Rtfg_v!|9ClHwy_{gb0*OV;Y z5JfQOyj;}$1tj(3t2rrx>FUz@^}v`l;lif0dQeJM@T04bgTRGH1}(-}0|V#Z*NBG6 zrQN>iDx`$HGwCWeo-3QG<32R7Q@3g5YGkVRzHd9?wN9Rp8qD%sn$hUbZiga?C zlPN3j>QPV~1f1^vP}AZ1S?JJd=F3LsQ=^9~+|9l%#I-5rRGPYWaE?$FP%!%gKF+?> z-A0ip(}>^gSdDkUw?6wYd4z>Gdlvlb1iNx|g>?iE1KV;`3-_mM`p$`fwP*o7q_NLp z*%=b%kYurN#+@y-&z5x*9rve)U@J$>_x%7?JB!OrM`gFD^{7f&E`2oC&qRL_c)=v^ zqUWI>cTCz;(BuMNT$P1y7M_OkLHSABM-=6lCXz-o~>827nhN2L3{& zaue@1o8EVQ#(!G1!$>mjFzOzz{+45*VSc?&Zn|yWWZqRof_^rc5z2F$`E|-lyh3*@ z`~fD9%B_j|Cxyd^M6L4tBN3UJ4z*1|H@_>og>$vE_JZFI4xiqsn3=m9)4~YR=AyXN zDF6>#_Sk2Zlc5+iJDn>Ww76tpTckLa?wZ{*gpnBx&uq}9%8;C6pWi|rnK+g|S5@A1 zXm6XEnTsX%Dby=+j@yO__NSFVh9J8GIx17(aKE6fW~b(bsbfv3vd5VloSo7cy5|2? zXZttH+5g>1dq~C_Mt!8yRW`f!hxy1MiPg?Ebtzos`s^fq)hyI(TYh;^H|x9?!(G z7V}-Ht24F1Nka)EPlFwSs@9711~F@>yV9``4Pn$KBqJ8a$K$3XYSK6Qg~LL^%F0Tw z&)mU^SNk$A3O&aYYTAOZRhjG{voUsaJm&Io*%CFqv$^LL*Gqgx8xxnlFMhqQ@N2AO zn7a~AjHoAixp))lR`t?_(PIg1<&~E2IyyQ?dJkl#miex8hN5MjJ{Sy^D$5FN+@pUh zFcj@m)NGabOr&5S0M@3voL98)XKLWb?d%17re8CH;RPV?%W2OZS*}14kaCdh9D|>& z!4hgUH*&nZ?P_lF=foGYt%F3I&02{ channelAddPeopleView, navBarView, @@ -196,6 +203,9 @@ class Routes { importContacts, createInviteLink, invitationSent, + organizationSettingsView, + organizationNameUrl, + organizationLogo, }; } @@ -263,6 +273,9 @@ class StackedRouter extends RouterBase { RouteDef(Routes.importContacts, page: ImportContacts), RouteDef(Routes.createInviteLink, page: CreateInviteLink), RouteDef(Routes.invitationSent, page: InvitationSent), + RouteDef(Routes.organizationSettingsView, page: OrganizationSettingsView), + RouteDef(Routes.organizationNameUrl, page: OrganizationNameUrl), + RouteDef(Routes.organizationLogo, page: OrganizationLogo), ]; @override Map get pagesMap => _pagesMap; @@ -726,6 +739,36 @@ class StackedRouter extends RouterBase { settings: data, ); }, + OrganizationSettingsView: (data) { + var args = data.getArgs(nullOk: false); + return MaterialPageRoute( + builder: (context) => OrganizationSettingsView( + key: args.key, + org: args.org, + ), + settings: data, + ); + }, + OrganizationNameUrl: (data) { + var args = data.getArgs(nullOk: false); + return MaterialPageRoute( + builder: (context) => OrganizationNameUrl( + key: args.key, + org: args.org, + ), + settings: data, + ); + }, + OrganizationLogo: (data) { + var args = data.getArgs(nullOk: false); + return MaterialPageRoute( + builder: (context) => OrganizationLogo( + key: args.key, + org: args.org, + ), + settings: data, + ); + }, }; } @@ -919,3 +962,24 @@ class InviteViaEmailArguments { final Key? key; InviteViaEmailArguments({this.key}); } + +/// OrganizationSettingsView arguments holder class +class OrganizationSettingsViewArguments { + final Key? key; + final OrganizationModel org; + OrganizationSettingsViewArguments({this.key, required this.org}); +} + +/// OrganizationNameUrl arguments holder class +class OrganizationNameUrlArguments { + final Key? key; + final OrganizationModel org; + OrganizationNameUrlArguments({this.key, required this.org}); +} + +/// OrganizationLogo arguments holder class +class OrganizationLogoArguments { + final Key? key; + final OrganizationModel org; + OrganizationLogoArguments({this.key, required this.org}); +} diff --git a/lib/package/base/server-request/api/api.dart b/lib/package/base/server-request/api/api.dart index 9b5820e7e..59c8d5c1d 100644 --- a/lib/package/base/server-request/api/api.dart +++ b/lib/package/base/server-request/api/api.dart @@ -74,8 +74,7 @@ abstract class Api { Future uploadImage( File image, { required String token, - required String orgId, - required String memberId, + required String pluginId, }); // THE SERVICE TO UPDATE AN ORGANIZATION LOGO diff --git a/lib/package/base/server-request/api/zuri_api.dart b/lib/package/base/server-request/api/zuri_api.dart index 63a09429c..fc43062a1 100644 --- a/lib/package/base/server-request/api/zuri_api.dart +++ b/lib/package/base/server-request/api/zuri_api.dart @@ -806,11 +806,10 @@ class ZuriApi implements Api { Future uploadImage( File? image, { required String token, - required String memberId, - required String orgId, + required String pluginId, }) async { var formData = FormData.fromMap({ - "image": MultipartFile( + "file": MultipartFile( image!.openRead(), await image.length(), filename: image.path.split(Platform.pathSeparator).last, @@ -818,7 +817,7 @@ class ZuriApi implements Api { }); try { final res = await dio.post( - 'https://api.zuri.chat/organizations/$orgId/members/$memberId/photo', + 'https://api.zuri.chat/upload/file/$pluginId', options: Options( headers: {'Authorization': 'Bearer $token'}, ), diff --git a/lib/services/media_service.dart b/lib/services/media_service.dart index a02408b02..bcb2b5dd4 100644 --- a/lib/services/media_service.dart +++ b/lib/services/media_service.dart @@ -4,29 +4,27 @@ import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import 'package:zurichat/services/local_storage_services.dart'; import 'package:zurichat/services/user_service.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:zurichat/ui/shared/shared.dart'; class MediaService { final ImagePicker _picker = ImagePicker(); - final zuriApi = locator(); + final zuriApi = ZuriApi(coreBaseUrl); final storageService = locator(); final userService = locator(); - Future getImage({required bool fromGallery}) async { + Future getImage({required bool fromGallery}) async { /// Pick an image/capture a photo final XFile? image = await _picker.pickImage( source: fromGallery ? ImageSource.gallery : ImageSource.camera); final File? file = File(image!.path); - Future imageAddress = uploadImage(file); - return imageAddress; + return file; } - Future uploadImage(File? file) async { + Future uploadImage(File? file, String pluginId) async { String imageAddress = await zuriApi.uploadImage(file, - token: userService.authToken, - orgId: userService.currentOrgId, - memberId: userService.userId); + token: userService.authToken, pluginId: pluginId); return imageAddress; } } diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart index 1c63e0913..8bb48d6aa 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart @@ -40,31 +40,30 @@ class SignOutBottomSheet extends StatelessWidget { child: const ListTile( title: CustomText( text: 'Invite members', - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w500, fontSize: 16, - color: AppColors.zuriPrimaryColor, + color: AppColors.greyColor, ), leading: Icon( Icons.logout_sharp, - color: AppColors.zuriPrimaryColor, + color: AppColors.greyColor, ), ), ), GestureDetector( onTap: () { - model.dismissDialog(); - model.showSignOutDialog(org.name ?? ""); + model.navigateToWorkSpaceSettings(org); }, child: const ListTile( title: CustomText( text: 'Organization settings', - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w500, fontSize: 16, - color: AppColors.zuriPrimaryColor, + color: AppColors.greyColor, ), leading: Icon( Icons.settings, - color: AppColors.zuriPrimaryColor, + color: AppColors.greyColor, ), ), ), diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart index fdfbe559f..a8f6c1a89 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart @@ -27,7 +27,10 @@ class SignOutBottomSheetViewModel extends BaseViewModel { } void navigateToWorkSpaceSettings(OrganizationModel org) { - _navigator.navigateTo(Routes.startDmView); + _navigator.navigateTo( + Routes.organizationSettingsView, + arguments: OrganizationSettingsViewArguments(org: org), + ); } void navigateToSignIn() => diff --git a/lib/ui/shared/dialogs/image_source_dialog.dart b/lib/ui/shared/dialogs/image_source_dialog.dart new file mode 100644 index 000000000..f03bc4c3b --- /dev/null +++ b/lib/ui/shared/dialogs/image_source_dialog.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; +import 'package:stacked_services/stacked_services.dart'; + +class ImageSourceDialog extends StatelessWidget { + final DialogRequest request; + final Function(DialogResponse) completer; + const ImageSourceDialog( + {Key? key, required this.request, required this.completer}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return AlertDialog( + content: SizedBox( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ListTile( + contentPadding: + const EdgeInsets.symmetric(horizontal: 5, vertical: 0), + onTap: () => completer(DialogResponse(confirmed: true)), + leading: const Icon(Icons.camera), + title: const Text( + 'Take Photo', + ), + ), + // const SizedBox(height: 5), + ListTile( + contentPadding: + const EdgeInsets.symmetric(horizontal: 5, vertical: 0), + onTap: () => completer(DialogResponse(confirmed: false)), + leading: const Icon(Icons.photo), + title: const Text( + 'Choose photo from gallery', + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/ui/shared/setup_dialog_ui.dart b/lib/ui/shared/setup_dialog_ui.dart index 55428b643..2c1871f9a 100644 --- a/lib/ui/shared/setup_dialog_ui.dart +++ b/lib/ui/shared/setup_dialog_ui.dart @@ -6,6 +6,7 @@ import 'package:zurichat/ui/shared/dialogs/schedule_dialog.dart'; import 'package:zurichat/ui/shared/dialogs/sign_out_dialog.dart'; import 'package:zurichat/utilities/enums.dart'; import 'package:stacked_services/stacked_services.dart'; +import 'dialogs/image_source_dialog.dart'; import 'dialogs/schedule_channel_dialog.dart'; import 'dialogs/select_language_dialog.dart'; import 'dialogs/skin_tone_dialog.dart'; @@ -41,7 +42,9 @@ void setupDialogUi() { ScheduleMessChannel( request: request, completer: completer, - ) + ), + DialogType.imageSource: (context, request, completer) => + ImageSourceDialog(request: request, completer: completer), }; dialogService.registerCustomDialogBuilders(builders); diff --git a/lib/ui/shared/text_field.dart b/lib/ui/shared/text_field.dart index c105f2adc..f13101801 100644 --- a/lib/ui/shared/text_field.dart +++ b/lib/ui/shared/text_field.dart @@ -14,6 +14,9 @@ class BorderTextField extends StatelessWidget { final TextEditingController? controller; final String hint; final bool autofocus; + final TextCapitalization textCapitalization; + final String? Function(String?)? validator; + final TextAlign textAlign; const BorderTextField({ Key? key, @@ -21,16 +24,22 @@ class BorderTextField extends StatelessWidget { this.controller, required this.hint, this.autofocus = false, + this.textCapitalization = TextCapitalization.none, + this.validator, + this.textAlign = TextAlign.start, }) : super(key: key); @override Widget build(BuildContext context) { - return TextField( + return TextFormField( style: const TextStyle(fontSize: 16, color: Colors.black87), autofocus: autofocus, onChanged: onChanged, controller: controller, cursorColor: AppColors.zuriPrimaryColor, + textCapitalization: textCapitalization, + validator: validator, + textAlign: textAlign, decoration: InputDecoration( hintText: hint, border: border(), diff --git a/lib/ui/view/organization/organization_settings/organization_icon.dart b/lib/ui/view/organization/organization_settings/organization_icon.dart new file mode 100644 index 000000000..dc6f85189 --- /dev/null +++ b/lib/ui/view/organization/organization_settings/organization_icon.dart @@ -0,0 +1,79 @@ +import 'package:flutter/material.dart'; +import 'package:stacked/stacked.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view_model.dart'; + +class OrganizationLogo extends StatelessWidget { + final OrganizationModel org; + const OrganizationLogo({Key? key, required this.org}) : super(key: key); + + @override + Widget build(BuildContext context) { + return ViewModelBuilder.reactive( + viewModelBuilder: () => OrganizationSettingsViewModel(), + builder: (context, model, child) { + return Scaffold( + appBar: ZuriAppBar( + whiteBackground: true, + title: 'Workspace Icon', + actions: [ + TextButton( + onPressed: () => model.updateOrgLogo(org.id.toString()), + child: Text( + Save, + style: AppTextStyles.bodyRegular.copyWith( + color: AppColors.zuriPrimaryColor, + ), + ), + ), + ], + ), + body: Padding( + padding: const EdgeInsets.all(10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + height: 150, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + // border: Border.all(color: AppColors.greyColor, width: 1), + ), + clipBehavior: Clip.hardEdge, + child: model.tempImage == null && org.logoUrl!.isEmpty + ? Image.asset('assets/logo/zuri_word_and_logo.png') + : model.tempImage != null + ? Image.file(model.tempImage!) + : Image.network(org.logoUrl!), + ), + const SizedBox(height: 20), + LongButton( + onPressed: () => model.selectImage(), + label: 'Upload Icon', + width: 200, + ), + const SizedBox(height: 30), + Text( + 'Workspace Icon guideline', + style: AppTextStyles.heading4 + .copyWith(color: AppColors.blackColor, fontSize: 20), + ), + const SizedBox(height: 10), + Text( + '''Your workspace icon is a way for you to visually identify the Clutch king workspace. It is used in the desktop and mobile apps, and on your workspace admin site. It's most helpful when you are on multiple ZuriChat workspaces.''', + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 17, color: AppColors.greyishColor), + ), + ], + ), + ), + ); + }, + ); + } +} diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart new file mode 100644 index 000000000..f20551329 --- /dev/null +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -0,0 +1,132 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:stacked/stacked.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/text_field.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view_model.dart'; + +class OrganizationNameUrl extends HookWidget { + final OrganizationModel org; + + OrganizationNameUrl({Key? key, required this.org}) : super(key: key); + final _formKey = GlobalKey(); + @override + Widget build(BuildContext context) { + final _orgNameController = useTextEditingController(text: org.name); + final _orgUrlController = + useTextEditingController(text: org.organizationUrl?.split('.').first); + return ViewModelBuilder.reactive( + viewModelBuilder: () => OrganizationSettingsViewModel(), + builder: (context, model, child) { + return Scaffold( + appBar: ZuriAppBar( + whiteBackground: true, + title: 'Workspace Name & URL', + leading: Icons.chevron_left, + actions: [ + TextButton( + onPressed: () { + if (!_formKey.currentState!.validate()) return; + model.updateOrgNameAndUrl(org.id.toString(), + _orgNameController.text, _orgUrlController.text); + }, + child: Text( + Save, + style: AppTextStyles.bodyRegular.copyWith( + color: AppColors.zuriPrimaryColor, + ), + ), + ), + ], + ), + body: Form( + key: _formKey, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 25, vertical: 20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Workspace Name', + style: AppTextStyles.heading4.copyWith( + color: AppColors.blackColor, fontSize: 18), + ), + const SizedBox(height: 15), + Flexible( + child: BorderTextField( + hint: "HNG i8", + controller: _orgNameController, + textCapitalization: TextCapitalization.words, + validator: (val) => model.validateNotEmptyField(val!), + ), + ), + const SizedBox(height: 15), + Text( + 'Your workspace name is displayed in menus and headings. It will usually be (or include) the name of your company.', + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 15, color: AppColors.greyColor), + ), + ], + ), + ), + const Divider(color: AppColors.greyColor, thickness: 1), + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 25, vertical: 20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Workspace URL', + style: AppTextStyles.heading3.copyWith( + color: AppColors.blackColor, fontSize: 18), + ), + const SizedBox(height: 15), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Flexible( + child: BorderTextField( + hint: "hng_i8", + controller: _orgUrlController, + textCapitalization: TextCapitalization.words, + validator: model.vaidateOrgUrl, + textAlign: TextAlign.end, + ), + ), + const SizedBox(width: 10), + Text( + '.zuri.com', + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 15), + ), + ], + ), + const SizedBox(height: 15), + Text( + 'Your workspace URL can only contain lowercase letters, numbers and dashes (and must start with a letter or number).', + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 15, color: AppColors.greyColor), + ), + ], + ), + ), + ], + ), + ), + ); + }, + ); + } +} diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart new file mode 100644 index 000000000..260ebd424 --- /dev/null +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -0,0 +1,120 @@ +import 'package:flutter/material.dart'; +import 'package:stacked/stacked.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; + +import 'organization_settings_view_model.dart'; + +class OrganizationSettingsView extends StatelessWidget { + final OrganizationModel org; + const OrganizationSettingsView({Key? key, required this.org}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return ViewModelBuilder.reactive( + viewModelBuilder: () => OrganizationSettingsViewModel(), + builder: (context, model, child) { + return Scaffold( + appBar: ZuriAppBar( + title: 'Workspace Settings', + subtitle: 'zuri chat', + whiteBackground: true, + leading: Icons.chevron_left, + leadingPress: () => model.back(), + ), + body: Container( + margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 20), + decoration: const BoxDecoration( + color: AppColors.whiteColor, + boxShadow: [ + BoxShadow( + color: AppColors.shadowColor, + spreadRadius: 10, + ), + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + InkWell( + onTap: () => model.navigateToWorkspaceLogo(org), + child: Padding( + padding: const EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Edit Workspace Icon', + style: AppTextStyles.heading4 + .copyWith(color: AppColors.blackColor), + ), + const SizedBox(height: 10), + Text( + 'Workspace icon is used in the desktop and mobile apps where it\'s useful in helping to quickly identify this workspace.', + style: + AppTextStyles.bodyRegular.copyWith(fontSize: 15), + ), + ], + ), + ), + ), + const Divider(color: AppColors.greyColor), + InkWell( + onTap: () => model.navigateToWorkspaceName(org), + child: Padding( + padding: const EdgeInsets.all(20), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Edit Workspace Name & URL', + style: AppTextStyles.heading4 + .copyWith(color: AppColors.blackColor), + ), + const SizedBox(height: 10), + Text.rich( + TextSpan( + children: [ + TextSpan( + text: 'Your workspace name is ', + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 15), + ), + TextSpan( + text: org.name, + style: AppTextStyles.bodyBig.copyWith( + fontSize: 15, + color: AppColors.blackColor, + ), + ), + TextSpan( + text: ' and your URL is ', + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 15), + ), + TextSpan( + text: org.organizationUrl ?? '', + style: AppTextStyles.bodyBig.copyWith( + fontSize: 15, + color: AppColors.blackColor, + ), + ), + ], + ), + ), + ], + ), + ), + ), + ], + ), + ), + ); + }, + ); + } +} diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart new file mode 100644 index 000000000..e577788a7 --- /dev/null +++ b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart @@ -0,0 +1,93 @@ +import 'dart:io'; + +import 'package:stacked/stacked.dart'; +import 'package:stacked_services/stacked_services.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/media_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import '../../../../app/app.logger.dart'; + +class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { + final log = getLogger('OrganizationSettingsViewModel'); + final navigation = locator(); + final snackbar = locator(); + final dialog = locator(); + final _mediaService = locator(); + final _userService = locator(); + final _zuriApi = ZuriApi(coreBaseUrl); + + File? tempImage; + + void back() { + navigation.back(); + } + + void navigateToWorkspaceName(OrganizationModel org) { + navigation.navigateTo( + Routes.organizationNameUrl, + arguments: OrganizationNameUrlArguments(org: org), + ); + } + + void navigateToWorkspaceLogo(OrganizationModel org) { + navigation.navigateTo( + Routes.organizationLogo, + arguments: OrganizationLogoArguments(org: org), + ); + } + + Future updateOrgLogo(String orgId) async { + try { + setBusy(true); + if (tempImage == null) return; + final url = await _mediaService.uploadImage(tempImage, orgId); + await _zuriApi.updateOrgLogo(orgId, url!, token); + setBusy(false); + navigation + .popUntil((route) => route.settings.name == Routes.organizationView); + snackbar.showCustomSnackBar( + variant: SnackbarType.success, message: 'Update Successful'); + } catch (e) { + setBusy(false); + log.e(e.toString()); + snackbar.showCustomSnackBar( + variant: SnackbarType.failure, + message: 'Error Updating Workspace logo'); + } + } + + Future selectImage() async { + final isCamera = + await dialog.showCustomDialog(variant: DialogType.imageSource); + if (isCamera?.confirmed == null) return; + tempImage = await _mediaService.getImage(fromGallery: isCamera!.confirmed); + notifyListeners(); + } + + String get token => _userService.authToken; + + Future updateOrgNameAndUrl( + String orgId, String orgName, String orgUrl) async { + try { + setBusy(true); + await _zuriApi.updateOrgName(orgId, orgName, token); + await _zuriApi.updateOrgUrl(orgId, orgUrl, token); + setBusy(false); + navigation + .popUntil((route) => route.settings.name == Routes.organizationView); + snackbar.showCustomSnackBar( + variant: SnackbarType.success, message: 'Update Successful'); + } catch (e) { + setBusy(false); + log.e(e.toString()); + snackbar.showCustomSnackBar( + variant: SnackbarType.failure, message: 'Update not successful'); + } + } +} diff --git a/lib/utilities/enums.dart b/lib/utilities/enums.dart index 161500d76..1ec21432d 100644 --- a/lib/utilities/enums.dart +++ b/lib/utilities/enums.dart @@ -12,6 +12,7 @@ enum DialogType { deleteDraft, scheduleMessageDm, scheduleMessageChannel, + imageSource, } enum ChannelType { private, public, personal } diff --git a/lib/utilities/mixins/validators_mixin.dart b/lib/utilities/mixins/validators_mixin.dart index 44dbb5eda..87afd3994 100644 --- a/lib/utilities/mixins/validators_mixin.dart +++ b/lib/utilities/mixins/validators_mixin.dart @@ -82,4 +82,16 @@ mixin ValidatorMixin { return true; } } + + String? vaidateOrgUrl(String? val) { + var regexp = r'/^[a-zA-Z0-9-_]+$/'; + + if (val!.isEmpty) { + return 'Workspace url cannot be empty'; + } + if (RegExp(regexp).hasMatch(val)) { + return 'Invalid url'; + } + return null; + } } diff --git a/test/helpers/test_helpers.dart b/test/helpers/test_helpers.dart index 3c9be1073..a1d9ca9be 100644 --- a/test/helpers/test_helpers.dart +++ b/test/helpers/test_helpers.dart @@ -160,7 +160,7 @@ MockZuriApi getAndRegisterZuriApiMock() { locator.registerSingleton(service); when(service.uploadImage(fileMock, - token: token_string, memberId: memberId_string, orgId: orgId_string)) + token: token_string, pluginId: orgId_string)) .thenAnswer((_) async => Future.value("Image Address")); return service; } @@ -191,7 +191,7 @@ MockMediaService getAndRegisterMediaServiceMock() { final service = MockMediaService(); Future response = Future.value("Image Address"); - when(service.uploadImage(fileMock)).thenAnswer((_) async => response); + when(service.uploadImage(fileMock, orgId_string)).thenAnswer((_) async => response); locator.registerSingleton(service); return service; diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index 96a5f3735..f67b03d73 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -1165,10 +1165,10 @@ class MockZuriApi extends _i1.Mock implements _i22.ZuriApi { returnValue: _FakeFailure_3()) as _i4.Failure); @override _i2.Future uploadImage(_i25.File? image, - {String? token, String? memberId, String? orgId}) => + {String? token, String? pluginId}) => (super.noSuchMethod( - Invocation.method(#uploadImage, [image], - {#token: token, #memberId: memberId, #orgId: orgId}), + Invocation.method( + #uploadImage, [image], {#token: token, #pluginId: pluginId}), returnValue: Future.value('')) as _i2.Future); @override String toString() => super.toString(); @@ -1299,12 +1299,12 @@ class MockJumpToApi extends _i1.Mock implements _i28.JumpToApi { /// See the documentation for Mockito's code generation for more information. class MockMediaService extends _i1.Mock implements _i30.MediaService { @override - _i2.Future getImage({bool? fromGallery}) => (super.noSuchMethod( + _i2.Future<_i25.File?> getImage({bool? fromGallery}) => (super.noSuchMethod( Invocation.method(#getImage, [], {#fromGallery: fromGallery}), - returnValue: Future.value()) as _i2.Future); + returnValue: Future<_i25.File?>.value()) as _i2.Future<_i25.File?>); @override - _i2.Future uploadImage(_i25.File? file) => - (super.noSuchMethod(Invocation.method(#uploadImage, [file]), + _i2.Future uploadImage(_i25.File? file, String? pluginId) => + (super.noSuchMethod(Invocation.method(#uploadImage, [file, pluginId]), returnValue: Future.value()) as _i2.Future); @override String toString() => super.toString(); diff --git a/test/services/media_service_test.dart b/test/services/media_service_test.dart index de88c2101..4b708e70c 100644 --- a/test/services/media_service_test.dart +++ b/test/services/media_service_test.dart @@ -12,8 +12,8 @@ void main() { final mediaService = getAndRegisterMediaServiceMock(); test('When called it should upload an image and return image address', () async { - mediaService.uploadImage(fileMock); - verify(mediaService.uploadImage(fileMock)); + mediaService.uploadImage(fileMock, orgId_string); + verify(mediaService.uploadImage(fileMock, orgId_string)); }); }); }); From 0858d8d20f7ef81548e16b2346c2b4a5c142a901 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Thu, 14 Oct 2021 08:54:50 +0100 Subject: [PATCH 10/20] workspace settings phase 2 --- lib/package/base/server-request/api/api.dart | 2 +- .../server-request/api/dio_interceptors.dart | 2 +- .../base/server-request/api/zuri_api.dart | 16 +++- .../widgets/work_space_display_info_view.dart | 23 ++++- lib/ui/shared/zuri_loader.dart | 5 +- .../organization_icon.dart | 96 ++++++++++++------- .../organization_name_url.dart | 3 +- .../organization_settings_view.dart | 12 +-- .../organization_settings_view_model.dart | 21 ++-- .../organization_view/organization_view.dart | 17 ++-- .../organization_viewmodel.dart | 6 +- 11 files changed, 132 insertions(+), 71 deletions(-) diff --git a/lib/package/base/server-request/api/api.dart b/lib/package/base/server-request/api/api.dart index 59c8d5c1d..5aaf4ceb5 100644 --- a/lib/package/base/server-request/api/api.dart +++ b/lib/package/base/server-request/api/api.dart @@ -78,7 +78,7 @@ abstract class Api { }); // THE SERVICE TO UPDATE AN ORGANIZATION LOGO - Future updateOrgLogo(String orgId, String url, token); + Future updateOrgLogo(String orgId, File image, token); // THE SERVICE TO ADD A MEMBERS TO AN ORGANIZATION Future addMemberToOrganization(String orgId, String email, token); diff --git a/lib/package/base/server-request/api/dio_interceptors.dart b/lib/package/base/server-request/api/dio_interceptors.dart index cebc0c4c7..311dd5b6a 100644 --- a/lib/package/base/server-request/api/dio_interceptors.dart +++ b/lib/package/base/server-request/api/dio_interceptors.dart @@ -16,7 +16,7 @@ class DioInterceptor implements Interceptor { void onRequest(RequestOptions options, RequestInterceptorHandler handler) { log.i('METHOD: ' + options.method); log.i('ENDPOINT: ' + options.uri.toString()); - // log('HEADERS: ' + options.headers.toString()); + log.i('HEADERS: ' + options.headers.toString()); log.i('DATA: ' + (options.data ?? options.queryParameters).toString()); handler.next(options); } diff --git a/lib/package/base/server-request/api/zuri_api.dart b/lib/package/base/server-request/api/zuri_api.dart index fc43062a1..8ee017b9a 100644 --- a/lib/package/base/server-request/api/zuri_api.dart +++ b/lib/package/base/server-request/api/zuri_api.dart @@ -308,7 +308,7 @@ class ZuriApi implements Api { Future updateOrgUrl(String orgId, String url, token) async { try { final res = await dio.patch( - '$channelsBaseUrl/organizations/$orgId/url', + '${coreBaseUrl}organizations/$orgId/url', options: Options( headers: {'Authorization': 'Bearer $token'}, ), @@ -327,7 +327,7 @@ class ZuriApi implements Api { Future updateOrgName(String orgId, String name, token) async { try { final res = await dio.patch( - '$channelsBaseUrl/organizations/$orgId/name', + '${coreBaseUrl}organizations/$orgId/name', options: Options( headers: {'Authorization': 'Bearer $token'}, ), @@ -343,14 +343,20 @@ class ZuriApi implements Api { /// Updates an organization's logo. The organization's id `orgId` must not be /// null or empty @override - Future updateOrgLogo(String orgId, String url, token) async { + Future updateOrgLogo(String orgId, File image, token) async { try { + var formData = FormData.fromMap({ + "image": await MultipartFile.fromFile( + image.path, + filename: image.path.split(Platform.pathSeparator).last, + ), + }); final res = await dio.patch( - '$channelsBaseUrl/organizations/$orgId/logo', + '${coreBaseUrl}organizations/$orgId/logo', options: Options( headers: {'Authorization': 'Bearer $token'}, ), - data: {'url': url}, + data: formData, ); return res.data['message']; } on DioError catch (e) { diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart index e66ab135e..0bfbc24ec 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart @@ -1,5 +1,7 @@ +import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:zurichat/general_widgets/custom_text.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class WorkSpaceDisplayInfo extends StatelessWidget { final String? imageUrl; @@ -20,12 +22,23 @@ class WorkSpaceDisplayInfo extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, children: [ Container( - padding: const EdgeInsets.all(15), - child: Container( - color: Colors.grey, - height: 32, - width: 32, + height: MediaQuery.of(context).size.height * 0.05, + width: MediaQuery.of(context).size.height * 0.05, + margin: const EdgeInsets.all(10), + decoration: BoxDecoration( + color: AppColors.whiteColor, + borderRadius: BorderRadius.circular(5), ), + clipBehavior: Clip.antiAlias, + child: imageUrl != null && imageUrl!.isNotEmpty + ? CachedNetworkImage( + imageUrl: imageUrl!, + fit: BoxFit.cover, + ) + : Image.asset( + 'assets/logo/new_zuri_logo.png', + fit: BoxFit.cover, + ), ), Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/shared/zuri_loader.dart b/lib/ui/shared/zuri_loader.dart index 803c20585..c8bed276e 100644 --- a/lib/ui/shared/zuri_loader.dart +++ b/lib/ui/shared/zuri_loader.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class ZuriLoader extends StatefulWidget { - const ZuriLoader({Key? key}) : super(key: key); + final bool isTransparent; + const ZuriLoader({Key? key, this.isTransparent = false}) : super(key: key); @override _ZuriLoaderState createState() => _ZuriLoaderState(); @@ -27,6 +29,7 @@ class _ZuriLoaderState extends State with TickerProviderStateMixin { @override Widget build(BuildContext context) { return Scaffold( + backgroundColor: widget.isTransparent ? Colors.transparent : AppColors.whiteColor, body: Center( child: RotationTransition( turns: _animation, diff --git a/lib/ui/view/organization/organization_settings/organization_icon.dart b/lib/ui/view/organization/organization_settings/organization_icon.dart index dc6f85189..a5b4e76d2 100644 --- a/lib/ui/view/organization/organization_settings/organization_icon.dart +++ b/lib/ui/view/organization/organization_settings/organization_icon.dart @@ -6,6 +6,7 @@ import 'package:zurichat/ui/shared/colors.dart'; import 'package:zurichat/ui/shared/long_button.dart'; import 'package:zurichat/ui/shared/styles.dart'; import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view_model.dart'; class OrganizationLogo extends StatelessWidget { @@ -33,44 +34,67 @@ class OrganizationLogo extends StatelessWidget { ), ], ), - body: Padding( - padding: const EdgeInsets.all(10.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - height: 150, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5), - // border: Border.all(color: AppColors.greyColor, width: 1), - ), - clipBehavior: Clip.hardEdge, - child: model.tempImage == null && org.logoUrl!.isEmpty - ? Image.asset('assets/logo/zuri_word_and_logo.png') - : model.tempImage != null - ? Image.file(model.tempImage!) - : Image.network(org.logoUrl!), - ), - const SizedBox(height: 20), - LongButton( - onPressed: () => model.selectImage(), - label: 'Upload Icon', - width: 200, - ), - const SizedBox(height: 30), - Text( - 'Workspace Icon guideline', - style: AppTextStyles.heading4 - .copyWith(color: AppColors.blackColor, fontSize: 20), + body: Stack( + fit: StackFit.expand, + children: [ + Padding( + padding: const EdgeInsets.all(10.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + height: 150, + width: 150, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + // border: Border.all(color: AppColors.greyColor, width: 1), + ), + clipBehavior: Clip.hardEdge, + child: model.tempImage == null && org.logoUrl!.isEmpty + ? Image.asset( + 'assets/logo/zuri_word_and_logo.png', + fit: BoxFit.cover, + ) + : model.tempImage != null + ? Image.file( + model.tempImage!, + fit: BoxFit.cover, + ) + : Image.network( + org.logoUrl!, + fit: BoxFit.cover, + ), + ), + const SizedBox(height: 20), + LongButton( + onPressed: () => model.selectImage(), + label: 'Upload Icon', + width: 200, + ), + const SizedBox(height: 30), + Text( + 'Workspace Icon guideline', + style: AppTextStyles.heading4 + .copyWith(color: AppColors.blackColor, fontSize: 20), + ), + const SizedBox(height: 10), + Text( + '''Your workspace icon is a way for you to visually identify the Clutch king workspace. It is used in the desktop and mobile apps, and on your workspace admin site. It's most helpful when you are on multiple ZuriChat workspaces.''', + style: AppTextStyles.bodyRegular.copyWith( + fontSize: 17, color: AppColors.greyishColor), + ), + ], ), - const SizedBox(height: 10), - Text( - '''Your workspace icon is a way for you to visually identify the Clutch king workspace. It is used in the desktop and mobile apps, and on your workspace admin site. It's most helpful when you are on multiple ZuriChat workspaces.''', - style: AppTextStyles.bodyRegular - .copyWith(fontSize: 17, color: AppColors.greyishColor), + ), + Visibility( + visible: model.isBusy, + child: Container( + alignment: Alignment.center, + height: 100, + child: const ZuriLoader(isTransparent: true), ), - ], - ), + ), + ], ), ); }, diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart index f20551329..95ef65cf5 100644 --- a/lib/ui/view/organization/organization_settings/organization_name_url.dart +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -21,6 +21,7 @@ class OrganizationNameUrl extends HookWidget { useTextEditingController(text: org.organizationUrl?.split('.').first); return ViewModelBuilder.reactive( viewModelBuilder: () => OrganizationSettingsViewModel(), + onModelReady: (model) => model.init(org.name!, org.organizationUrl!), builder: (context, model, child) { return Scaffold( appBar: ZuriAppBar( @@ -100,7 +101,7 @@ class OrganizationNameUrl extends HookWidget { child: BorderTextField( hint: "hng_i8", controller: _orgUrlController, - textCapitalization: TextCapitalization.words, + textCapitalization: TextCapitalization.none, validator: model.vaidateOrgUrl, textAlign: TextAlign.end, ), diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart index 260ebd424..8a2663eae 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -55,8 +55,8 @@ class OrganizationSettingsView extends StatelessWidget { const SizedBox(height: 10), Text( 'Workspace icon is used in the desktop and mobile apps where it\'s useful in helping to quickly identify this workspace.', - style: - AppTextStyles.bodyRegular.copyWith(fontSize: 15), + style: AppTextStyles.bodyRegular.copyWith( + fontSize: 15, color: AppColors.greyColor), ), ], ), @@ -81,8 +81,8 @@ class OrganizationSettingsView extends StatelessWidget { children: [ TextSpan( text: 'Your workspace name is ', - style: AppTextStyles.bodyRegular - .copyWith(fontSize: 15), + style: AppTextStyles.bodyRegular.copyWith( + fontSize: 15, color: AppColors.greyColor), ), TextSpan( text: org.name, @@ -93,8 +93,8 @@ class OrganizationSettingsView extends StatelessWidget { ), TextSpan( text: ' and your URL is ', - style: AppTextStyles.bodyRegular - .copyWith(fontSize: 15), + style: AppTextStyles.bodyRegular.copyWith( + fontSize: 15, color: AppColors.greyColor), ), TextSpan( text: org.organizationUrl ?? '', diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart index e577788a7..949246256 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart @@ -21,9 +21,15 @@ class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { final _mediaService = locator(); final _userService = locator(); final _zuriApi = ZuriApi(coreBaseUrl); + late String name, url; File? tempImage; + void init(String _name, String _url) { + name = _name; + url = _url; + } + void back() { navigation.back(); } @@ -46,8 +52,7 @@ class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { try { setBusy(true); if (tempImage == null) return; - final url = await _mediaService.uploadImage(tempImage, orgId); - await _zuriApi.updateOrgLogo(orgId, url!, token); + await _zuriApi.updateOrgLogo(orgId, tempImage!, token); setBusy(false); navigation .popUntil((route) => route.settings.name == Routes.organizationView); @@ -66,18 +71,18 @@ class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { final isCamera = await dialog.showCustomDialog(variant: DialogType.imageSource); if (isCamera?.confirmed == null) return; - tempImage = await _mediaService.getImage(fromGallery: isCamera!.confirmed); + tempImage = await _mediaService.getImage(fromGallery: !isCamera!.confirmed); notifyListeners(); } - String get token => _userService.authToken; - Future updateOrgNameAndUrl( String orgId, String orgName, String orgUrl) async { try { + final parsedUrl = '$orgUrl.zurichat.com'; + setBusy(true); - await _zuriApi.updateOrgName(orgId, orgName, token); - await _zuriApi.updateOrgUrl(orgId, orgUrl, token); + if (orgName != name) await _zuriApi.updateOrgName(orgId, orgName, token); + if (orgUrl != url) await _zuriApi.updateOrgUrl(orgId, parsedUrl, token); setBusy(false); navigation .popUntil((route) => route.settings.name == Routes.organizationView); @@ -90,4 +95,6 @@ class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { variant: SnackbarType.failure, message: 'Update not successful'); } } + + String get token => _userService.authToken; } diff --git a/lib/ui/view/organization/organization_view/organization_view.dart b/lib/ui/view/organization/organization_view/organization_view.dart index b76e46865..e5bb731c1 100644 --- a/lib/ui/view/organization/organization_view/organization_view.dart +++ b/lib/ui/view/organization/organization_view/organization_view.dart @@ -1,3 +1,4 @@ +import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:zurichat/constants/app_strings.dart'; import 'package:zurichat/models/organization_model.dart'; @@ -151,16 +152,20 @@ class OrganizationTile extends ViewModelWidget { width: 2, style: BorderStyle.solid, ), - color: AppColors.greyishColor, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(5), ), clipBehavior: Clip.antiAlias, //TODO : Add the org image here - child: Container( - height: MediaQuery.of(context).size.height * 0.05, - width: MediaQuery.of(context).size.width * 0.5, - color: Colors.grey, - ), + child: org.logoUrl != null && org.logoUrl!.isNotEmpty + ? CachedNetworkImage( + imageUrl: org.logoUrl!, + fit: BoxFit.cover, + ) + : Image.asset( + 'assets/logo/new_zuri_logo.png', + fit: BoxFit.cover, + ), ), ), //TODO : Add the org name here diff --git a/lib/ui/view/organization/organization_view/organization_viewmodel.dart b/lib/ui/view/organization/organization_view/organization_viewmodel.dart index 223acdff5..0d57c1a0c 100644 --- a/lib/ui/view/organization/organization_view/organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_view/organization_viewmodel.dart @@ -163,13 +163,15 @@ class OrganizationViewModel extends BaseViewModel { String? get token => _storage.getString(StorageKeys.currentSessionToken); - void showSignOutBottomSheet(OrganizationModel org) { - _bottomSheetService.showCustomSheet( + Future showSignOutBottomSheet(OrganizationModel org) async { + await _bottomSheetService.showCustomSheet( barrierColor: AppColors.blackColor, variant: BottomSheetType.signOut, isScrollControlled: true, data: org, ); + organizations = await api.getJoinedOrganizations(); + notifyListeners(); } void navigateToSignIn() => From b4cd5b4cc8e511ddd0c1adb5d57ca429c7866a50 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Thu, 14 Oct 2021 16:31:16 +0100 Subject: [PATCH 11/20] Workspace Settings complete --- lib/constants/app_strings.dart | 13 +- .../base/server-request/api/zuri_api.dart | 2 + lib/services/user_service.dart | 7 + lib/ui/nav_pages/home_page/home_page.dart | 22 ++- .../home_page/home_page_viewmodel.dart | 1 + .../organization_icon.dart | 9 +- .../organization_name_url.dart | 157 ++++++++++-------- .../organization_settings_view.dart | 7 +- .../organization_view/organization_view.dart | 17 +- .../organization_viewmodel.dart | 17 +- lib/utilities/storage_keys.dart | 1 + pubspec.lock | 2 +- pubspec.yaml | 8 +- 13 files changed, 161 insertions(+), 102 deletions(-) diff --git a/lib/constants/app_strings.dart b/lib/constants/app_strings.dart index b0c1530f1..624bd222d 100644 --- a/lib/constants/app_strings.dart +++ b/lib/constants/app_strings.dart @@ -392,11 +392,22 @@ const String CreateNewOrg = 'Create a new workspace'; const String SignInNewOrg = 'Sign in to another workspace'; const String JoinAnotherOrg = 'Join another workspace'; const String SplashScreen = 'assets/logo/splash_image.png'; +const String EditOrgIcon = 'Edit Workspace Icon'; +const String EditOrgIconDesc = + 'Workspace icon is used in the desktop and mobile apps where it\'s useful in helping to quickly identify this workspace.'; +const String EditOrgNameUrl = 'Edit Workspace Name & URL'; +const String OrgIcon = 'Workspace Icon'; +const String OrgIconGuide = 'Workspace Icon guideline'; +const String OrgIconGuideDesc = + "Your workspace icon is a way for you to visually identify the Clutch king workspace. It is used in the desktop and mobile apps, and on your workspace admin site. It's most helpful when you are on multiple ZuriChat workspaces."; +const String OrgNameDesc = + 'Your workspace name is displayed in menus and headings. It will usually be (or include) the name of your company.'; +const String OrgUrlDesc = + 'Your workspace URL can only contain lowercase letters, numbers and dashes (and must start with a letter or number).'; //Pinned Messages const String NoPinnedMessagesYet = 'No Pinned Messages Yet'; const String PinnedMessages = 'Pinned Messages'; - //View Profile const String MessageText = 'Message'; diff --git a/lib/package/base/server-request/api/zuri_api.dart b/lib/package/base/server-request/api/zuri_api.dart index 8ee017b9a..798e1909b 100644 --- a/lib/package/base/server-request/api/zuri_api.dart +++ b/lib/package/base/server-request/api/zuri_api.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; +import 'package:http_parser/http_parser.dart'; import 'package:zurichat/app/app.locator.dart'; import 'package:zurichat/app/app.logger.dart'; import 'package:zurichat/constants/app_strings.dart'; @@ -349,6 +350,7 @@ class ZuriApi implements Api { "image": await MultipartFile.fromFile( image.path, filename: image.path.split(Platform.pathSeparator).last, + contentType: MediaType('image', 'jpeg'), ), }); final res = await dio.patch( diff --git a/lib/services/user_service.dart b/lib/services/user_service.dart index fd2c9cc11..2e8b11d69 100644 --- a/lib/services/user_service.dart +++ b/lib/services/user_service.dart @@ -19,6 +19,7 @@ class UserService { String _currentOrgId = ''; String _currentOrgUrl = ''; String _currentOrgName = ''; + String _currentOrgLogo = ''; String _authToken = ''; String _userId = ''; String _userEmail = ''; @@ -40,6 +41,12 @@ class UserService { return _currentOrgName; } + String get currentOrgLogo { + _currentOrgLogo = _sharedPrefs.getString(StorageKeys.currentOrgLogo) ?? ''; + //You can perform other function before returning + return _currentOrgLogo; + } + String get currentOrgUrl { _currentOrgUrl = _sharedPrefs.getString(StorageKeys.currentOrgUrl) ?? ''; //You can perform other function before returning diff --git a/lib/ui/nav_pages/home_page/home_page.dart b/lib/ui/nav_pages/home_page/home_page.dart index 321f20663..746e93f3f 100644 --- a/lib/ui/nav_pages/home_page/home_page.dart +++ b/lib/ui/nav_pages/home_page/home_page.dart @@ -1,3 +1,4 @@ +import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:zurichat/constants/app_strings.dart'; @@ -34,10 +35,25 @@ class HomePage extends StatelessWidget { children: [ InkWell( onTap: () => vmodel.navigateToOrganization(), - child: const Image( - image: appBarLogo, - fit: BoxFit.cover, + child: Container( height: 25, + width: 25, + decoration: BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.circular(5), + ), + clipBehavior: Clip.hardEdge, + //TODO : Add the org image here + child: vmodel.orgLogo != null && vmodel.orgLogo!.isNotEmpty + ? CachedNetworkImage( + imageUrl: vmodel.orgLogo!, + fit: BoxFit.cover, + ) + : const Image( + image: appBarLogo, + fit: BoxFit.cover, + height: 25, + ), ), ), const SizedBox(width: 16), diff --git a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart index 59ba740fe..557ae65f8 100644 --- a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart +++ b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart @@ -60,6 +60,7 @@ class HomePageViewModel extends StreamViewModel { String get orgName => userService.currentOrgName; String get orgId => userService.currentOrgId; String get email => userService.userEmail; + String? get orgLogo => userService.currentOrgLogo; StreamSubscription? notificationSub; diff --git a/lib/ui/view/organization/organization_settings/organization_icon.dart b/lib/ui/view/organization/organization_settings/organization_icon.dart index a5b4e76d2..eea8d525a 100644 --- a/lib/ui/view/organization/organization_settings/organization_icon.dart +++ b/lib/ui/view/organization/organization_settings/organization_icon.dart @@ -21,7 +21,10 @@ class OrganizationLogo extends StatelessWidget { return Scaffold( appBar: ZuriAppBar( whiteBackground: true, - title: 'Workspace Icon', + leading: Icons.chevron_left, + leadingPress: () => model.back(), + title: OrgIcon, + subtitle: '', actions: [ TextButton( onPressed: () => model.updateOrgLogo(org.id.toString()), @@ -73,13 +76,13 @@ class OrganizationLogo extends StatelessWidget { ), const SizedBox(height: 30), Text( - 'Workspace Icon guideline', + OrgIconGuide, style: AppTextStyles.heading4 .copyWith(color: AppColors.blackColor, fontSize: 20), ), const SizedBox(height: 10), Text( - '''Your workspace icon is a way for you to visually identify the Clutch king workspace. It is used in the desktop and mobile apps, and on your workspace admin site. It's most helpful when you are on multiple ZuriChat workspaces.''', + OrgIconGuideDesc, style: AppTextStyles.bodyRegular.copyWith( fontSize: 17, color: AppColors.greyishColor), ), diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart index 95ef65cf5..2f2cb1502 100644 --- a/lib/ui/view/organization/organization_settings/organization_name_url.dart +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -7,6 +7,7 @@ import 'package:zurichat/ui/shared/colors.dart'; import 'package:zurichat/ui/shared/styles.dart'; import 'package:zurichat/ui/shared/text_field.dart'; import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view_model.dart'; class OrganizationNameUrl extends HookWidget { @@ -27,7 +28,9 @@ class OrganizationNameUrl extends HookWidget { appBar: ZuriAppBar( whiteBackground: true, title: 'Workspace Name & URL', + subtitle: '', leading: Icons.chevron_left, + leadingPress: () => model.back(), actions: [ TextButton( onPressed: () { @@ -44,87 +47,101 @@ class OrganizationNameUrl extends HookWidget { ), ], ), - body: Form( - key: _formKey, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 25, vertical: 20), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Workspace Name', - style: AppTextStyles.heading4.copyWith( - color: AppColors.blackColor, fontSize: 18), - ), - const SizedBox(height: 15), - Flexible( - child: BorderTextField( - hint: "HNG i8", - controller: _orgNameController, - textCapitalization: TextCapitalization.words, - validator: (val) => model.validateNotEmptyField(val!), - ), - ), - const SizedBox(height: 15), - Text( - 'Your workspace name is displayed in menus and headings. It will usually be (or include) the name of your company.', - style: AppTextStyles.bodyRegular - .copyWith(fontSize: 15, color: AppColors.greyColor), - ), - ], - ), - ), - const Divider(color: AppColors.greyColor, thickness: 1), - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 25, vertical: 20), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Workspace URL', - style: AppTextStyles.heading3.copyWith( - color: AppColors.blackColor, fontSize: 18), - ), - const SizedBox(height: 15), - Row( - crossAxisAlignment: CrossAxisAlignment.center, + body: Stack( + fit: StackFit.expand, + children: [ + Form( + key: _formKey, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 25, vertical: 20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + 'Workspace Name', + style: AppTextStyles.heading4.copyWith( + color: AppColors.blackColor, fontSize: 18), + ), + const SizedBox(height: 15), Flexible( child: BorderTextField( - hint: "hng_i8", - controller: _orgUrlController, - textCapitalization: TextCapitalization.none, - validator: model.vaidateOrgUrl, - textAlign: TextAlign.end, + hint: "HNG i8", + controller: _orgNameController, + textCapitalization: TextCapitalization.words, + validator: (val) => + model.validateNotEmptyField(val!), ), ), - const SizedBox(width: 10), + const SizedBox(height: 15), Text( - '.zuri.com', - style: AppTextStyles.bodyRegular - .copyWith(fontSize: 15), + OrgNameDesc, + style: AppTextStyles.bodyRegular.copyWith( + fontSize: 15, color: AppColors.greyColor), ), ], ), - const SizedBox(height: 15), - Text( - 'Your workspace URL can only contain lowercase letters, numbers and dashes (and must start with a letter or number).', - style: AppTextStyles.bodyRegular - .copyWith(fontSize: 15, color: AppColors.greyColor), + ), + const Divider(color: AppColors.greyColor, thickness: 1), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 25, vertical: 20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Workspace URL', + style: AppTextStyles.heading3.copyWith( + color: AppColors.blackColor, fontSize: 18), + ), + const SizedBox(height: 15), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Flexible( + child: BorderTextField( + hint: "hng_i8", + controller: _orgUrlController, + textCapitalization: TextCapitalization.none, + validator: model.vaidateOrgUrl, + textAlign: TextAlign.end, + ), + ), + const SizedBox(width: 10), + Text( + '.zurichat.com', + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 15), + ), + ], + ), + const SizedBox(height: 15), + Text( + OrgUrlDesc, + style: AppTextStyles.bodyRegular.copyWith( + fontSize: 15, color: AppColors.greyColor), + ), + ], ), - ], - ), + ), + ], + ), + ), + Visibility( + visible: model.isBusy, + child: Container( + alignment: Alignment.center, + height: 100, + child: const ZuriLoader(isTransparent: true), ), - ], - ), + ), + ], ), ); }, diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart index 8a2663eae..f6f7334f8 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:zurichat/models/organization_model.dart'; import 'package:zurichat/ui/shared/colors.dart'; import 'package:zurichat/ui/shared/styles.dart'; @@ -48,13 +49,13 @@ class OrganizationSettingsView extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'Edit Workspace Icon', + EditOrgIcon, style: AppTextStyles.heading4 .copyWith(color: AppColors.blackColor), ), const SizedBox(height: 10), Text( - 'Workspace icon is used in the desktop and mobile apps where it\'s useful in helping to quickly identify this workspace.', + EditOrgIconDesc, style: AppTextStyles.bodyRegular.copyWith( fontSize: 15, color: AppColors.greyColor), ), @@ -71,7 +72,7 @@ class OrganizationSettingsView extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'Edit Workspace Name & URL', + EditOrgNameUrl, style: AppTextStyles.heading4 .copyWith(color: AppColors.blackColor), ), diff --git a/lib/ui/view/organization/organization_view/organization_view.dart b/lib/ui/view/organization/organization_view/organization_view.dart index e5bb731c1..cfb3cad28 100644 --- a/lib/ui/view/organization/organization_view/organization_view.dart +++ b/lib/ui/view/organization/organization_view/organization_view.dart @@ -131,8 +131,7 @@ class OrganizationTile extends ViewModelWidget { @override Widget build(BuildContext context, OrganizationViewModel viewModel) { return ListTile( - onTap: () => viewModel.onTap( - org.id, org.name, org.organizationUrl, org.userIdInOrg), + onTap: () => viewModel.onTap(org), leading: Container( height: MediaQuery.of(context).size.height * 0.06, width: MediaQuery.of(context).size.height * 0.06, @@ -147,15 +146,15 @@ class OrganizationTile extends ViewModelWidget { height: MediaQuery.of(context).size.height * 0.05, width: MediaQuery.of(context).size.height * 0.05, decoration: BoxDecoration( - border: Border.all( - color: AppColors.whiteColor, - width: 2, - style: BorderStyle.solid, - ), + // border: Border.all( + // color: AppColors.whiteColor, + // width: 2, + // style: BorderStyle.solid, + // ), color: AppColors.whiteColor, borderRadius: BorderRadius.circular(5), ), - clipBehavior: Clip.antiAlias, + clipBehavior: Clip.hardEdge, //TODO : Add the org image here child: org.logoUrl != null && org.logoUrl!.isNotEmpty ? CachedNetworkImage( @@ -163,7 +162,7 @@ class OrganizationTile extends ViewModelWidget { fit: BoxFit.cover, ) : Image.asset( - 'assets/logo/new_zuri_logo.png', + NewZuriLogo, fit: BoxFit.cover, ), ), diff --git a/lib/ui/view/organization/organization_view/organization_viewmodel.dart b/lib/ui/view/organization/organization_view/organization_viewmodel.dart index 0d57c1a0c..59f62fcfc 100644 --- a/lib/ui/view/organization/organization_view/organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_view/organization_viewmodel.dart @@ -84,24 +84,25 @@ class OrganizationViewModel extends BaseViewModel { organizations.retainWhere((e) => ids.any((id) => id == e.id)); } - Future onTap( - String? id, String? name, String? url, String? memberId) async { + Future onTap(OrganizationModel? org) async { try { - if (id == currentOrgId) { + if (org!.id == currentOrgId) { navigation.replaceWith(Routes.navBarView); return; } await checkSnackBarConnectivity(); - await storageService.setString(StorageKeys.currentOrgId, id!); - await storageService.setString(StorageKeys.idInOrganization, memberId!); + await storageService.setString(StorageKeys.currentOrgId, org.id!); + await storageService.setString( + StorageKeys.idInOrganization, org.userIdInOrg!); snackbar.showCustomSnackBar( duration: const Duration(seconds: 3), variant: SnackbarType.success, - message: 'You have entered $name', + message: 'You have entered ${org.name}', ); - storageService.setString(StorageKeys.currentOrgName, name!); - storageService.setString(StorageKeys.currentOrgUrl, url!); + storageService.setString(StorageKeys.currentOrgName, org.name!); + storageService.setString(StorageKeys.currentOrgUrl, org.organizationUrl!); + storageService.setString(StorageKeys.currentOrgLogo, org.logoUrl!); navigation.replaceWith(Routes.navBarView); } catch (e) { diff --git a/lib/utilities/storage_keys.dart b/lib/utilities/storage_keys.dart index 9883def9f..7abc85f8b 100644 --- a/lib/utilities/storage_keys.dart +++ b/lib/utilities/storage_keys.dart @@ -10,6 +10,7 @@ class StorageKeys { static const registeredNotverifiedOTP = 'user_otp_verified'; static const currentOrgName = 'current_org_name'; static const currentOrgUrl = 'current_org_url'; + static const currentOrgLogo = 'current_org_logo'; static const currentMemberID = 'member_Id'; static const displayName = 'display_name'; static const firstName = 'first_name'; diff --git a/pubspec.lock b/pubspec.lock index b3350407c..cbc8677a9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -554,7 +554,7 @@ packages: source: hosted version: "3.0.1" http_parser: - dependency: transitive + dependency: "direct main" description: name: http_parser url: "https://pub.dartlang.org" diff --git a/pubspec.yaml b/pubspec.yaml index 28ada1879..a4a7522ec 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,17 +12,18 @@ dependencies: cached_network_image: ^3.1.0 centrifuge: ^0.6.0 connectivity_plus: ^1.1.0 + connectivity_plus_web: null cupertino_icons: ^1.0.2 dio: ^4.0.0 emoji_picker_flutter: ^1.0.7 flutter: sdk: flutter - flutter_localizations: - sdk: flutter flutter_appavailability: ^0.0.21 flutter_chips_input: ^1.10.0 flutter_hooks: ^0.17.0 flutter_keyboard_visibility: ^5.0.3 + flutter_localizations: + sdk: flutter flutter_parsed_text: ^2.2.1 flutter_screenutil: ^5.0.0+2 flutter_slidable: ^0.6.0 @@ -33,6 +34,7 @@ dependencies: google_fonts: ^2.1.0 grouped_list: ^4.1.0 hexcolor: ^2.0.5 + http_parser: ^4.0.0 image_picker: ^0.8.4+1 intl: ^0.17.0 introduction_screen: ^2.1.0 @@ -51,7 +53,6 @@ dependencies: stacked_themes: ^0.3.6 url_launcher: ^6.0.9 velocity_x: ^3.3.0 - connectivity_plus_web: webview_flutter: ^2.0.13 dev_dependencies: @@ -83,7 +84,6 @@ flutter: - assets/icons/emojiHands/ - assets/icons/svg_icons/ - assets/language/ - fonts: - family: ZapIcon From 0d5f5423a30b084afb8b87d95342044d5d88b728 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Thu, 14 Oct 2021 16:45:29 +0100 Subject: [PATCH 12/20] Reverted package name change --- lib/app/app.dart | 60 ++-- lib/app/app.router.dart | 1 - lib/general_widgets/custom_channel.dart | 2 +- lib/general_widgets/custom_user.dart | 2 +- lib/general_widgets/custom_user_channel.dart | 2 +- lib/general_widgets/menu_item_tile.dart | 2 +- lib/general_widgets/no_connection_widget.dart | 8 +- lib/main.dart | 8 +- .../base/jump_to_request/jump_to_api.dart | 2 +- lib/package/base/server-request/api/api.dart | 8 +- .../server-request/api/dio_interceptors.dart | 2 +- .../base/server-request/api/zuri_api.dart | 26 +- .../channels/channels_api_service.dart | 8 +- .../server-request/dms/dms_api_service.dart | 4 +- .../organization_api_service.dart | 6 +- lib/services/centrifuge_service.dart | 10 +- lib/services/current_user_profile.dart | 14 +- lib/services/local_storage_services.dart | 2 +- lib/services/media_service.dart | 10 +- lib/services/notification_service.dart | 6 +- lib/services/user_service.dart | 2 +- lib/ui/nav_pages/dm_page/dm_page.dart | 10 +- .../nav_pages/dm_page/dm_page_viewmodel.dart | 4 +- .../dm_page/dm_search_find_page.dart | 4 +- .../dm_page/widgets/dmmessage_unread.dart | 2 +- .../drafted_message_page.dart | 10 +- .../drafted_message_page_viewmodel.dart | 2 +- .../widgets/app/data.dart | 2 +- .../nav_pages/home_page/home_item_model.dart | 4 +- lib/ui/nav_pages/home_page/home_page.dart | 20 +- .../home_page/home_page_viewmodel.dart | 40 +-- .../widgets/custom_channel_list_tile.dart | 4 +- .../widgets/custom_dm_list_tile.dart | 2 +- .../custom_homepage_section_title.dart | 2 +- .../widgets/custom_plugin_list_tile.dart | 4 +- .../home_page/widgets/home_expanded.dart | 10 +- .../home_page/widgets/home_list_items.dart | 4 +- .../home_page/widgets/zuri_logo.dart | 4 +- .../plugin_page/add_plugin_view.dart | 12 +- .../plugin_page/edit_plugin_view.dart | 8 +- .../plugin_page/plugin_intro_page.dart | 12 +- .../plugin_page/plugin_page_view.dart | 18 +- .../plugin_page/plugin_viewmodel.dart | 8 +- .../nav_pages/plugin_page/plugins_view.dart | 14 +- .../plugin_page/widgets/custom_appbar.dart | 4 +- .../you_page/widgets/profile_page_head.dart | 2 +- .../you_page/widgets/status_form.dart | 2 +- lib/ui/nav_pages/you_page/you_page.dart | 8 +- .../you_page/you_page_viewmodel.dart | 18 +- .../custom_user_bottom_sheet_view.dart | 6 +- .../custom_user_bottom_sheet_viewmodel.dart | 14 +- .../widgets/custom_button.dart | 6 +- .../widgets/custom_profile_tile.dart | 2 +- .../widgets/profile_head.dart | 6 +- .../emoji_picker_bottomsheet_view.dart | 2 +- .../custom_user_bottom_sheet_view.dart | 2 +- .../custom_user_bottom_sheet_viewmodel.dart | 4 +- .../sign_out_bottom_sheet_view.dart | 8 +- .../sign_out_botton_sheet_viewmodel.dart | 18 +- .../widgets/work_space_display_info_view.dart | 4 +- .../thread_options_bottomsheet_view.dart | 2 +- .../bottom_sheets/zuri_chat_bottomsheet.dart | 10 +- lib/ui/shared/dialogs.dart | 2 +- .../dialogs/delete_draft_alert_dialog.dart | 4 +- lib/ui/shared/dialogs/delete_message.dart | 2 +- .../remind_me_dialog/remind_me_dialog.dart | 6 +- .../remind_me_dialog_viewmodel.dart | 4 +- .../dialogs/schedule_channel_dialog.dart | 4 +- lib/ui/shared/dialogs/schedule_dialog.dart | 4 +- .../dialogs/select_language_dialog.dart | 2 +- .../shared/dialogs/select_theme_dialog.dart | 2 +- .../shared/dialogs/send_feedback_dialog.dart | 4 +- lib/ui/shared/dialogs/sign_out_dialog.dart | 4 +- lib/ui/shared/dialogs/skin_tone_dialog.dart | 2 +- lib/ui/shared/search_bar.dart | 2 +- lib/ui/shared/setup_bottom_sheet_ui.dart | 6 +- lib/ui/shared/setup_dialog_ui.dart | 12 +- lib/ui/shared/shared.dart | 8 +- .../text_parser/text_parser_viewmodel.dart | 2 +- .../thread_card/thread_card_view.dart | 10 +- .../thread_card/thread_card_viewmodel.dart | 8 +- .../thread_card/widgets/audio_message.dart | 2 +- .../thread_card/widgets/emojis_list.dart | 2 +- .../thread_card/widgets/media_files.dart | 2 +- .../widgets/post_files_display.dart | 10 +- .../thread_card/widgets/post_replies.dart | 4 +- .../thread_card/widgets/quoted_replies.dart | 4 +- .../thread_card/widgets/snapshot_links.dart | 8 +- .../widgets/thread_card_channel_main.dart | 16 +- .../widgets/thread_card_detail.dart | 8 +- .../thread_card/widgets/thread_card_main.dart | 2 +- .../thread_card/widgets/thread_card_post.dart | 4 +- lib/ui/shared/text_field.dart | 2 +- lib/ui/shared/text_styles.dart | 2 +- lib/ui/shared/zuri_appbar.dart | 6 +- lib/ui/shared/zuri_loader.dart | 7 +- lib/ui/view/add_people/add_people_view.dart | 4 +- lib/ui/view/advanced/advanced_view.dart | 6 +- .../add_people/channel_add_people_view.dart | 8 +- .../channel_add_people_viewmodel.dart | 14 +- .../channel_info/channel_info_view.dart | 10 +- .../channel_info/channel_info_view_model.dart | 18 +- .../channel_info/widgets/custom_app_bar.dart | 6 +- .../channel_info/widgets/edit_button.dart | 2 +- .../channel_info/widgets/first_section.dart | 6 +- .../channel_info/widgets/fourth_section.dart | 6 +- .../channel_info/widgets/new_row_tile.dart | 2 +- .../channel_info/widgets/second_section.dart | 4 +- .../channel_info/widgets/seventh_section.dart | 2 +- .../channel_info/widgets/sixth_section.dart | 8 +- .../channel_info/widgets/third_section.dart | 12 +- .../channel/channel_list/channels_view.dart | 6 +- .../channel_list/channels_viewmodel.dart | 18 +- .../channel_members/channel_members_list.dart | 14 +- .../channel_members_list_model.dart | 4 +- .../channel_notification_view.dart | 8 +- .../channel_notification_viewmodel.dart | 2 +- .../channel_search/channel_search_view.dart | 2 +- .../channel_search/widgets/app_bar_main.dart | 2 +- .../channel_search/widgets/search_result.dart | 2 +- .../widgets/textfield_style.dart | 2 +- .../channel_view/channel_page_view.dart | 12 +- .../channel_view/channel_page_viewmodel.dart | 30 +- .../channel_view/widgets/channel_chat.dart | 10 +- .../channel_view/widgets/channel_intro.dart | 6 +- .../channel_view/widgets/check_user.dart | 8 +- .../channel_view/widgets/message_tile.dart | 4 +- .../edit_channel/edit_channel_view.dart | 4 +- .../edit_channel/edit_channel_view_model.dart | 10 +- .../widgets/edit_channel_appbar.dart | 4 +- .../widgets/edit_channel_headers.dart | 4 +- .../widgets/edit_channel_text_field.dart | 2 +- .../view/channel/new_channel/new_channel.dart | 4 +- .../new_channel/new_channel_viewmodel.dart | 8 +- .../pinned_messages/pinned_messages_view.dart | 6 +- .../pinned_messages_viewmodel.dart | 10 +- .../widgets/channel_browser_container.dart | 4 +- lib/ui/view/clear_after/clear_after_view.dart | 4 +- .../clear_after/clear_after_viewmodel.dart | 4 +- .../clear_after/widget/date_and_time.dart | 2 +- .../clear_notification_view.dart | 6 +- .../clear_notification_viewmodel.dart | 2 +- .../create_channel_view.dart | 4 +- .../create_channel_viewmodel.dart | 2 +- .../widgets/custom_text_field.dart | 2 +- .../view/direct_message/direct_message.dart | 4 +- .../direct_message_text_field_hook.dart | 2 +- .../direct_message_viewmodel.dart | 2 +- lib/ui/view/dm_chat_view/dm_jump_to_view.dart | 10 +- .../dm_chat_view/dm_jump_to_viewmodel.dart | 4 +- lib/ui/view/dm_search/dm_search_view.dart | 8 +- .../view/dm_search/dm_search_viewmodel.dart | 2 +- lib/ui/view/dm_search/dm_search_widgets.dart | 2 +- lib/ui/view/dm_user/dm_user_view.dart | 10 +- lib/ui/view/dm_user/dm_user_viewmodel.dart | 14 +- .../dm_user/dummy_data/models/message.dart | 2 +- .../view/dm_user/dummy_data/models/user.dart | 2 +- .../dm_user/widgets/custom_start_message.dart | 4 +- lib/ui/view/dm_user/widgets/message_view.dart | 2 +- .../dm_user/widgets/online_indicator.dart | 2 +- .../do_not_disturb/do_not_disturb_view.dart | 2 +- .../do_not_disturb_viewmodel.dart | 2 +- lib/ui/view/draft/app/data.dart | 2 +- .../view/draft/app/drafted_item_widget.dart | 2 +- lib/ui/view/draft/draft_view.dart | 8 +- lib/ui/view/draft/draft_viewmodel.dart | 20 +- lib/ui/view/draft/drafts.dart | 8 +- .../view/edit_profile/edit_profile_view.dart | 10 +- .../edit_profile/edit_profile_viewmodel.dart | 16 +- .../widget/edit_profile_body.dart | 4 +- .../expandable_textfield_screen.dart | 4 +- ...expandable_textfield_screen_viewmodel.dart | 4 +- .../feed_back_dialog.dart | 2 +- lib/ui/view/file_search/file_search_view.dart | 2 +- .../view/file_search/widgets/search_bar.dart | 2 +- .../forgot_password_email_view.dart | 8 +- .../forgot_password_email_viewmodel.dart | 20 +- .../forgot_password_newview.dart | 8 +- .../forgot_password_newviewmodel.dart | 20 +- .../forgot_password_otpview.dart | 8 +- .../forgot_password_otpviewmodel.dart | 18 +- .../language_and_region_view.dart | 6 +- .../language_and_region_viewmodel.dart | 2 +- lib/ui/view/login/login_view.dart | 6 +- lib/ui/view/login/login_viewmodel.dart | 12 +- lib/ui/view/nav_bar/nav_bar_view.dart | 4 +- .../notifications/notifications_view.dart | 10 +- .../notifications_viewmodel.dart | 2 +- lib/ui/view/onboarding/onboading_view.dart | 2 +- .../add_organization_view.dart | 12 +- .../create_organization/company.dart | 2 +- .../create_organization.dart | 4 +- .../create_organization_viewmodel.dart | 6 +- .../create_organization/invite.dart | 2 +- .../create_organization/project.dart | 2 +- .../email_confirmation_view.dart | 2 +- .../email_confirmation_viewmodel.dart | 4 +- .../admin_permissions/create_invite_link.dart | 8 +- .../admin_permissions/invite_via_email.dart | 8 +- .../invitation_sent.dart | 12 +- .../invite_via_contact/import_contact.dart | 6 +- .../invite_via_email/invite_via_email.dart | 10 +- .../invite_via_email/invite_viewmodel.dart | 16 +- .../organization/new_email/new_email.dart | 2 +- .../different_email_organization_view.dart | 6 +- ...ifferent_email_organization_viewmodel.dart | 10 +- .../organization_icon.dart | 16 +- .../organization_name_url.dart | 16 +- .../organization_settings_view.dart | 10 +- .../organization_settings_view_model.dart | 18 +- .../organization_url_view.dart | 4 +- .../organization_view/organization_view.dart | 6 +- .../organization_viewmodel.dart | 10 +- .../select_email/select_email_view.dart | 2 +- .../select_email/select_email_viewmodel.dart | 2 +- lib/ui/view/otp/otp_view.dart | 4 +- lib/ui/view/otp/otp_viewmodel.dart | 4 +- .../view/password_recovery/new_password.dart | 4 +- .../view/password_recovery/recovery_view.dart | 4 +- .../password_recovery/recovery_viewmodel.dart | 2 +- .../popup_notification.dart | 4 +- lib/ui/view/preference/preference_view.dart | 6 +- .../view/preference/preference_viewmodel.dart | 6 +- .../profile_page/profile_page_viewmodel.dart | 2 +- lib/ui/view/saved_items/saved_items_view.dart | 6 +- .../saved_items/saved_items_viewmodel.dart | 12 +- .../widgets/saved_item_background.dart | 4 +- lib/ui/view/set_status/set_status_view.dart | 4 +- lib/ui/view/sign_up/sign_up_view.dart | 4 +- lib/ui/view/sign_up/sign_up_viewmodel.dart | 6 +- lib/ui/view/splashscreen/splashscreen.dart | 2 +- .../splashscreen/splashscreen_viewmodel.dart | 2 +- lib/ui/view/start_dm/start_dm_view.dart | 6 +- lib/ui/view/start_dm/start_dm_viewmodel.dart | 4 +- .../start_dm/widgets/custom_chip_input.dart | 2 +- .../terms_and_conditions_view_model.dart | 2 +- .../threads/all_threads/threads_view.dart | 4 +- .../all_threads/widgets/thread_card.dart | 2 +- lib/ui/view/threads/test_data.dart | 4 +- .../thread_detail/thread_detail_view.dart | 10 +- .../thread_detail_viewmodel.dart | 14 +- lib/ui/view/user_search/user_search.dart | 2 +- .../user_search/user_search_not_found.dart | 2 +- lib/ui/view/user_search/user_search_view.dart | 2 +- .../user_search/user_search_viewmodel.dart | 6 +- .../widget/custom_dm_list_tile.dart | 2 +- lib/ui/view/webview_page/web_view_model.dart | 2 +- lib/ui/view/webview_page/webview_page.dart | 6 +- .../localization/app_localization.dart | 4 +- lib/utilities/utilities.dart | 2 +- pubspec.yaml | 2 +- test/helpers/test_helpers.dart | 34 +- test/helpers/test_helpers.mocks.dart | 339 +++++++++--------- test/services/bottom_sheet_service_test.dart | 4 +- test/services/dialog_service_test.dart | 4 +- .../services/local_storage_services_test.dart | 4 +- test/services/navigation_service_test.dart | 4 +- test/services/user_service_test.dart | 4 +- .../add_people_viewmodel_test.dart | 2 +- test/view_models/advanced_viewmodel_test.dart | 4 +- .../channel_add_people_viewmodel_test.dart | 6 +- .../channel_info_view_model_test.dart | 4 +- .../channel_members_list_model_test.dart | 2 +- .../channel_notification_viewmodel_test.dart | 2 +- test/view_models/channels_viewmodel_test.dart | 6 +- .../dm_jump_to_viewmodel_test.dart | 2 +- test/view_models/dm_user_viewmodel_test.dart | 2 +- .../forgot_password_email_viewmodel_test.dart | 2 +- .../forgot_password_new_viewmodel_test.dart | 4 +- .../forgot_password_otp_viewmodel_test.dart | 2 +- test/view_models/login_viewmodel_test.dart | 2 +- .../notifications_viewmodel_test.dart | 2 +- test/view_models/otp_viewmodel_test.dart | 4 +- test/view_models/plugin_viewmodel_test.dart | 4 +- test/view_models/you_page_viewmodel_test.dart | 4 +- 275 files changed, 1040 insertions(+), 1031 deletions(-) diff --git a/lib/app/app.dart b/lib/app/app.dart index 6b1d61a6b..87b74dd89 100644 --- a/lib/app/app.dart +++ b/lib/app/app.dart @@ -1,33 +1,33 @@ -import 'package:zurichat/services/centrifuge_service.dart'; -import 'package:zurichat/services/media_service.dart'; -import 'package:zurichat/services/notification_service.dart'; -import 'package:zurichat/ui/nav_pages/dm_page/dm_search_find_page.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_intro_page.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_page_view.dart'; -import 'package:zurichat/ui/view/direct_message/direct_message.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invitation_sent.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart'; -import 'package:zurichat/ui/view/organization/organization_settings/organization_icon.dart'; -import 'package:zurichat/ui/view/organization/organization_settings/organization_name_url.dart'; -import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view.dart'; -import 'package:zurichat/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart'; -import 'package:zurichat/ui/view/threads/all_threads/threads_view.dart'; -import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart'; -import 'package:zurichat/ui/view/user_search/user_search_view.dart'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; -import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/ui/view/channel/edit_channel/edit_channel_view.dart'; -import 'package:zurichat/ui/view/threads/thread_detail/thread_detail_view.dart'; -import 'package:zurichat/ui/view/organization/organization_url/organization_url_view.dart'; -import 'package:zurichat/ui/view/channel/add_people/channel_add_people_view.dart'; -import 'package:zurichat/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart'; -import 'package:zurichat/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart'; -import 'package:zurichat/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart'; -import 'package:zurichat/ui/view/webview_page/webview_page.dart'; +import 'package:hng/services/centrifuge_service.dart'; +import 'package:hng/services/media_service.dart'; +import 'package:hng/services/notification_service.dart'; +import 'package:hng/ui/nav_pages/dm_page/dm_search_find_page.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_intro_page.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_page_view.dart'; +import 'package:hng/ui/view/direct_message/direct_message.dart'; +import 'package:hng/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart'; +import 'package:hng/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart'; +import 'package:hng/ui/view/organization/invite_to_organization/invitation_sent.dart'; +import 'package:hng/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart'; +import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart'; +import 'package:hng/ui/view/organization/organization_settings/organization_icon.dart'; +import 'package:hng/ui/view/organization/organization_settings/organization_name_url.dart'; +import 'package:hng/ui/view/organization/organization_settings/organization_settings_view.dart'; +import 'package:hng/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart'; +import 'package:hng/ui/view/threads/all_threads/threads_view.dart'; +import 'package:hng/package/base/jump_to_request/jump_to_api.dart'; +import 'package:hng/ui/view/user_search/user_search_view.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/ui/view/channel/edit_channel/edit_channel_view.dart'; +import 'package:hng/ui/view/threads/thread_detail/thread_detail_view.dart'; +import 'package:hng/ui/view/organization/organization_url/organization_url_view.dart'; +import 'package:hng/ui/view/channel/add_people/channel_add_people_view.dart'; +import 'package:hng/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart'; +import 'package:hng/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart'; +import 'package:hng/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart'; +import 'package:hng/ui/view/webview_page/webview_page.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/app/app.router.dart b/lib/app/app.router.dart index 3873e03e5..be1b56f62 100644 --- a/lib/app/app.router.dart +++ b/lib/app/app.router.dart @@ -6,7 +6,6 @@ // ignore_for_file: public_member_api_docs -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/general_widgets/custom_channel.dart b/lib/general_widgets/custom_channel.dart index 6a943ea0c..c600a8eda 100644 --- a/lib/general_widgets/custom_channel.dart +++ b/lib/general_widgets/custom_channel.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:zurichat/ui/shared/styles.dart'; +import 'package:hng/ui/shared/styles.dart'; class CustomChannel extends StatelessWidget { final String? text; diff --git a/lib/general_widgets/custom_user.dart b/lib/general_widgets/custom_user.dart index 15e7cebd3..3cefd3dab 100644 --- a/lib/general_widgets/custom_user.dart +++ b/lib/general_widgets/custom_user.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; class CustomUser extends StatelessWidget { const CustomUser({Key? key, this.image, this.text}) : super(key: key); diff --git a/lib/general_widgets/custom_user_channel.dart b/lib/general_widgets/custom_user_channel.dart index e2399033a..3e7d1b422 100644 --- a/lib/general_widgets/custom_user_channel.dart +++ b/lib/general_widgets/custom_user_channel.dart @@ -1,6 +1,6 @@ // import 'package:flutter/material.dart'; // import 'package:flutter_screenutil/flutter_screenutil.dart'; -// import 'package:zurichat/ui/shared/styles.dart'; +// import 'package:hng/ui/shared/styles.dart'; // // class CustomUserChannel extends StatelessWidget { // final String? image; diff --git a/lib/general_widgets/menu_item_tile.dart b/lib/general_widgets/menu_item_tile.dart index 73e29c4bf..5275c940d 100644 --- a/lib/general_widgets/menu_item_tile.dart +++ b/lib/general_widgets/menu_item_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:hng/ui/shared/text_styles.dart'; import '../ui/shared/colors.dart'; diff --git a/lib/general_widgets/no_connection_widget.dart b/lib/general_widgets/no_connection_widget.dart index a63738605..726b84a55 100644 --- a/lib/general_widgets/no_connection_widget.dart +++ b/lib/general_widgets/no_connection_widget.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/services/connectivity_service.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/services/connectivity_service.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; class NoConnectionWidget extends StatelessWidget { const NoConnectionWidget( diff --git a/lib/main.dart b/lib/main.dart index 3cb16d007..20ceda69b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/services/notification_service.dart'; -import 'package:zurichat/ui/shared/setup_bottom_sheet_ui.dart'; -import 'package:zurichat/ui/shared/setup_dialog_ui.dart'; -import 'package:zurichat/utilities/internalization/local_setup.dart'; +import 'package:hng/services/notification_service.dart'; +import 'package:hng/ui/shared/setup_bottom_sheet_ui.dart'; +import 'package:hng/ui/shared/setup_dialog_ui.dart'; +import 'package:hng/utilities/internalization/local_setup.dart'; import 'package:intl/intl.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/package/base/jump_to_request/jump_to_api.dart b/lib/package/base/jump_to_request/jump_to_api.dart index 27d92b601..0f3c581aa 100644 --- a/lib/package/base/jump_to_request/jump_to_api.dart +++ b/lib/package/base/jump_to_request/jump_to_api.dart @@ -1,5 +1,5 @@ import 'package:dio/dio.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; import '../../../app/app.locator.dart'; import '../../../app/app.logger.dart'; diff --git a/lib/package/base/server-request/api/api.dart b/lib/package/base/server-request/api/api.dart index 5aaf4ceb5..1d4956090 100644 --- a/lib/package/base/server-request/api/api.dart +++ b/lib/package/base/server-request/api/api.dart @@ -2,10 +2,10 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/models/api_response.dart'; -import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/models/user_search_model.dart'; -import 'package:zurichat/utilities/failures.dart'; +import 'package:hng/models/api_response.dart'; +import 'package:hng/models/organization_model.dart'; +import 'package:hng/models/user_search_model.dart'; +import 'package:hng/utilities/failures.dart'; abstract class Api { /// THIS IS THE API ABSTRACT CLASS FOR ZURI CHAT MOBILE diff --git a/lib/package/base/server-request/api/dio_interceptors.dart b/lib/package/base/server-request/api/dio_interceptors.dart index 311dd5b6a..6e6addb00 100644 --- a/lib/package/base/server-request/api/dio_interceptors.dart +++ b/lib/package/base/server-request/api/dio_interceptors.dart @@ -1,5 +1,5 @@ import 'package:dio/dio.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; class DioInterceptor implements Interceptor { final log = getLogger("DioInterceptor"); diff --git a/lib/package/base/server-request/api/zuri_api.dart b/lib/package/base/server-request/api/zuri_api.dart index 798e1909b..00addf83c 100644 --- a/lib/package/base/server-request/api/zuri_api.dart +++ b/lib/package/base/server-request/api/zuri_api.dart @@ -6,19 +6,19 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:http_parser/http_parser.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/api_response.dart'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/models/channels_search_model.dart'; -import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/models/user_search_model.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/utilities/api_utils.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/failures.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/api_response.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/models/channels_search_model.dart'; +import 'package:hng/models/organization_model.dart'; +import 'package:hng/models/user_search_model.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/utilities/api_utils.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/failures.dart'; import 'package:stacked_services/stacked_services.dart' hide FormData, MultipartFile; diff --git a/lib/package/base/server-request/channels/channels_api_service.dart b/lib/package/base/server-request/channels/channels_api_service.dart index 3a1271b1e..d3c285de9 100644 --- a/lib/package/base/server-request/channels/channels_api_service.dart +++ b/lib/package/base/server-request/channels/channels_api_service.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/models/pinned_message_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/models/pinned_message_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; import '../../../../app/app.locator.dart'; import '../../../../app/app.logger.dart'; diff --git a/lib/package/base/server-request/dms/dms_api_service.dart b/lib/package/base/server-request/dms/dms_api_service.dart index c5a00ba25..abc85f3d6 100644 --- a/lib/package/base/server-request/dms/dms_api_service.dart +++ b/lib/package/base/server-request/dms/dms_api_service.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/utilities/storage_keys.dart'; import '../../../../app/app.locator.dart'; import '../../../../app/app.logger.dart'; diff --git a/lib/package/base/server-request/organization_request/organization_api_service.dart b/lib/package/base/server-request/organization_request/organization_api_service.dart index 93d3fe239..c122dca3d 100644 --- a/lib/package/base/server-request/organization_request/organization_api_service.dart +++ b/lib/package/base/server-request/organization_request/organization_api_service.dart @@ -1,6 +1,6 @@ -import 'package:zurichat/models/organization_member_model.dart'; -import 'package:zurichat/models/user_search_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/models/organization_member_model.dart'; +import 'package:hng/models/user_search_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; import '../../../../app/app.locator.dart'; import '../../../../app/app.logger.dart'; import '../../../../models/organization_model.dart'; diff --git a/lib/services/centrifuge_service.dart b/lib/services/centrifuge_service.dart index ddf852bc0..75413cb74 100644 --- a/lib/services/centrifuge_service.dart +++ b/lib/services/centrifuge_service.dart @@ -3,12 +3,12 @@ import 'dart:convert'; import 'package:centrifuge/centrifuge.dart' as centrifuge; import 'package:centrifuge/centrifuge.dart'; -import 'package:zurichat/app/app.locator.dart'; +import 'package:hng/app/app.locator.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; class CentrifugeService with ReactiveServiceMixin { diff --git a/lib/services/current_user_profile.dart b/lib/services/current_user_profile.dart index dc1412c52..0e4a84034 100644 --- a/lib/services/current_user_profile.dart +++ b/lib/services/current_user_profile.dart @@ -1,10 +1,10 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/models/profile_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/models/profile_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked_services/stacked_services.dart'; import 'local_storage_services.dart'; diff --git a/lib/services/local_storage_services.dart b/lib/services/local_storage_services.dart index 082865723..94294bbcd 100644 --- a/lib/services/local_storage_services.dart +++ b/lib/services/local_storage_services.dart @@ -1,5 +1,5 @@ import 'package:shared_preferences/shared_preferences.dart'; -import 'package:zurichat/utilities/constants.dart'; +import 'package:hng/utilities/constants.dart'; class SharedPreferenceLocalStorage { static SharedPreferenceLocalStorage? _instance; diff --git a/lib/services/media_service.dart b/lib/services/media_service.dart index bcb2b5dd4..1a7dda1f7 100644 --- a/lib/services/media_service.dart +++ b/lib/services/media_service.dart @@ -1,10 +1,10 @@ import 'dart:io'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/services/user_service.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/services/user_service.dart'; import 'package:image_picker/image_picker.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/ui/shared/shared.dart'; class MediaService { final ImagePicker _picker = ImagePicker(); diff --git a/lib/services/notification_service.dart b/lib/services/notification_service.dart index 203e75d03..5c299d35c 100644 --- a/lib/services/notification_service.dart +++ b/lib/services/notification_service.dart @@ -3,9 +3,9 @@ import 'dart:math'; import 'package:awesome_notifications/awesome_notifications.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/ui/shared/colors.dart'; import 'package:stacked_services/stacked_services.dart'; class NotificationService { diff --git a/lib/services/user_service.dart b/lib/services/user_service.dart index 2e8b11d69..c87b47ab2 100644 --- a/lib/services/user_service.dart +++ b/lib/services/user_service.dart @@ -1,7 +1,7 @@ //On login or signup the user service is used to save all the user details import 'dart:convert'; -import 'package:zurichat/models/user_model.dart'; +import 'package:hng/models/user_model.dart'; import '../app/app.locator.dart'; import '../models/organization_model.dart'; diff --git a/lib/ui/nav_pages/dm_page/dm_page.dart b/lib/ui/nav_pages/dm_page/dm_page.dart index 71eb54e4c..a597de731 100644 --- a/lib/ui/nav_pages/dm_page/dm_page.dart +++ b/lib/ui/nav_pages/dm_page/dm_page.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/text_styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/text_styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import '../../shared/search_bar.dart'; diff --git a/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart b/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart index 4311f900e..2ac891924 100644 --- a/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart +++ b/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; +import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; +import 'package:hng/services/local_storage_services.dart'; import '../../../app/app.locator.dart'; import '../../../app/app.router.dart'; diff --git a/lib/ui/nav_pages/dm_page/dm_search_find_page.dart b/lib/ui/nav_pages/dm_page/dm_search_find_page.dart index 68da33edd..cf60381e5 100644 --- a/lib/ui/nav_pages/dm_page/dm_search_find_page.dart +++ b/lib/ui/nav_pages/dm_page/dm_search_find_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_chips_input/flutter_chips_input.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart b/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart index 42a1d3c73..5e4fa8e2d 100644 --- a/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart +++ b/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart index 0a2322fc7..3c9e225fd 100644 --- a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart +++ b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/nav_pages/drafted_messages_page/widgets/app/data.dart'; -import 'package:zurichat/ui/nav_pages/drafted_messages_page/widgets/app/drafted_item_widget.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/nav_pages/drafted_messages_page/widgets/app/data.dart'; +import 'package:hng/ui/nav_pages/drafted_messages_page/widgets/app/drafted_item_widget.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'drafted_message_page_viewmodel.dart'; diff --git a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart index f04eaa3b8..4d014b5fe 100644 --- a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart +++ b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/app/app.locator.dart'; +import 'package:hng/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart b/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart index 78bbf2d34..5201d0386 100644 --- a/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart +++ b/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; class DraftedItem { final String? username, message, time; diff --git a/lib/ui/nav_pages/home_page/home_item_model.dart b/lib/ui/nav_pages/home_page/home_item_model.dart index 1419313e8..686bde40f 100644 --- a/lib/ui/nav_pages/home_page/home_item_model.dart +++ b/lib/ui/nav_pages/home_page/home_item_model.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/utilities/enums.dart'; class HomeItemModel { final log = getLogger('HomeItemModel'); diff --git a/lib/ui/nav_pages/home_page/home_page.dart b/lib/ui/nav_pages/home_page/home_page.dart index 746e93f3f..5a1c31813 100644 --- a/lib/ui/nav_pages/home_page/home_page.dart +++ b/lib/ui/nav_pages/home_page/home_page.dart @@ -1,16 +1,16 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/general_widgets/easy_container.dart'; -import 'package:zurichat/ui/nav_pages/home_page/home_page_viewmodel.dart'; -import 'package:zurichat/ui/nav_pages/home_page/widgets/home_expanded.dart'; -import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/text_styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/general_widgets/easy_container.dart'; +import 'package:hng/ui/nav_pages/home_page/home_page_viewmodel.dart'; +import 'package:hng/ui/nav_pages/home_page/widgets/home_expanded.dart'; +import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/text_styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; class HomePage extends StatelessWidget { diff --git a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart index 557ae65f8..81a76fdb0 100644 --- a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart +++ b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart @@ -1,24 +1,24 @@ import 'dart:async'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/models/user_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; -import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; -import 'package:zurichat/services/centrifuge_service.dart'; -import 'package:zurichat/services/connectivity_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/services/notification_service.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/ui/nav_pages/home_page/home_item_model.dart'; -import 'package:zurichat/ui/view/dm_chat_view/dm_jump_to_view.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/models/user_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; +import 'package:hng/services/centrifuge_service.dart'; +import 'package:hng/services/connectivity_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/services/notification_service.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/ui/nav_pages/home_page/home_item_model.dart'; +import 'package:hng/ui/view/dm_chat_view/dm_jump_to_view.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart b/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart index cf32dbd76..a5a8ea7b2 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; class CustomChannelListTile extends StatelessWidget { final String channelName; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart b/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart index f4630dd99..bc0aafb03 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart b/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart index f9a47302f..0acf1ad15 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/ui/shared/shared.dart'; class CustomHomePageSectionTitle extends StatelessWidget { final String? title; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart b/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart index 674da8b11..157ed4a98 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; class CustomPluginListTile extends StatelessWidget { final String? assetName; diff --git a/lib/ui/nav_pages/home_page/widgets/home_expanded.dart b/lib/ui/nav_pages/home_page/widgets/home_expanded.dart index 94feb3381..092c0f595 100644 --- a/lib/ui/nav_pages/home_page/widgets/home_expanded.dart +++ b/lib/ui/nav_pages/home_page/widgets/home_expanded.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/text_styles.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/text_styles.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/enums.dart'; import '../home_item_model.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/home_list_items.dart b/lib/ui/nav_pages/home_page/widgets/home_list_items.dart index 9c9bfb07e..8b89e2414 100644 --- a/lib/ui/nav_pages/home_page/widgets/home_list_items.dart +++ b/lib/ui/nav_pages/home_page/widgets/home_list_items.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart b/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart index 876cfcb44..ae9e95a53 100644 --- a/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart +++ b/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; import '../../../../utilities/constants.dart'; diff --git a/lib/ui/nav_pages/plugin_page/add_plugin_view.dart b/lib/ui/nav_pages/plugin_page/add_plugin_view.dart index e13623997..6b71bddb5 100644 --- a/lib/ui/nav_pages/plugin_page/add_plugin_view.dart +++ b/lib/ui/nav_pages/plugin_page/add_plugin_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; class AddPluginView extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart b/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart index 6c362ba14..a22697c0a 100644 --- a/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart +++ b/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart @@ -1,10 +1,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_appbar.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_appbar.dart'; +import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; +import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; import 'package:stacked/stacked.dart'; class EditPluginView extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart b/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart index 53622aace..c7b71aaee 100644 --- a/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart +++ b/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:zurichat/ui/shared/long_button.dart'; -import 'package:zurichat/ui/shared/text_styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:hng/ui/shared/long_button.dart'; +import 'package:hng/ui/shared/text_styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; class PluginPageIntro extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/plugin_page_view.dart b/lib/ui/nav_pages/plugin_page/plugin_page_view.dart index 9ffb1c4cc..c4e03f34d 100644 --- a/lib/ui/nav_pages/plugin_page/plugin_page_view.dart +++ b/lib/ui/nav_pages/plugin_page/plugin_page_view.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/general_widgets/menu_item_tile.dart'; -import 'package:zurichat/models/plugin_model.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/long_button.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/general_widgets/menu_item_tile.dart'; +import 'package:hng/models/plugin_model.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/long_button.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; class PluginPage extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart b/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart index 38dd12a46..b6a899e11 100644 --- a/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart +++ b/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart @@ -1,7 +1,7 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/models/plugin_model.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/widgets/icons.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/models/plugin_model.dart'; +import 'package:hng/ui/nav_pages/plugin_page/widgets/icons.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/nav_pages/plugin_page/plugins_view.dart b/lib/ui/nav_pages/plugin_page/plugins_view.dart index b49d94b52..aaa00c975 100644 --- a/lib/ui/nav_pages/plugin_page/plugins_view.dart +++ b/lib/ui/nav_pages/plugin_page/plugins_view.dart @@ -1,13 +1,13 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; -import 'package:zurichat/ui/shared/styles.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; +import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:hng/ui/shared/styles.dart'; import 'package:stacked/stacked.dart'; import '../../shared/colors.dart'; diff --git a/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart b/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart index a7d60bca7..b84113511 100644 --- a/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart +++ b/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:hng/ui/shared/colors.dart'; class CustomAppBars extends StatelessWidget implements PreferredSizeWidget { final String appbarTitle; diff --git a/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart b/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart index a4c2beb0d..5591acd39 100644 --- a/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart +++ b/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/ui/shared/shared.dart'; import '../../../../general_widgets/custom_text.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/nav_pages/you_page/widgets/status_form.dart b/lib/ui/nav_pages/you_page/widgets/status_form.dart index bc8d7d394..de4c8b4b5 100644 --- a/lib/ui/nav_pages/you_page/widgets/status_form.dart +++ b/lib/ui/nav_pages/you_page/widgets/status_form.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/ui/shared/colors.dart'; class StatusForm extends StatelessWidget { const StatusForm({Key? key, this.onPressed}) : super(key: key); diff --git a/lib/ui/nav_pages/you_page/you_page.dart b/lib/ui/nav_pages/you_page/you_page.dart index 9483b1777..da6eb8f82 100644 --- a/lib/ui/nav_pages/you_page/you_page.dart +++ b/lib/ui/nav_pages/you_page/you_page.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/text_styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/text_styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart index a79cc3535..a46f0f7e3 100644 --- a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart +++ b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart @@ -1,12 +1,12 @@ -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/connectivity_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/connectivity_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart index bc9d92f83..e654341c5 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/general_widgets/custom_text.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/general_widgets/custom_text.dart'; +import 'package:hng/ui/shared/colors.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart index 282a1eeeb..91c6fb340 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart @@ -1,10 +1,10 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/models/user_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/utilities/constants.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/models/user_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart index 01a745221..6b768ec41 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/utilities/enums.dart'; class CustomButton extends StatelessWidget { const CustomButton( diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_profile_tile.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_profile_tile.dart index fb9aef049..4a7ae83dc 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_profile_tile.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_profile_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/general_widgets/custom_text.dart'; +import 'package:hng/general_widgets/custom_text.dart'; class CustomProfileTile extends StatelessWidget { const CustomProfileTile( diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart index 7eebcb6d3..93ea35fec 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/general_widgets/custom_text.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/general_widgets/custom_text.dart'; +import 'package:hng/ui/shared/colors.dart'; import 'package:stacked/stacked.dart'; import '../custom_user_bottom_sheet_viewmodel.dart'; diff --git a/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart b/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart index 1cafe2efc..81f1db511 100644 --- a/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart +++ b/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart @@ -1,6 +1,6 @@ import 'package:emoji_picker_flutter/emoji_picker_flutter.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/ui/shared/shared.dart'; import 'package:stacked_services/stacked_services.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart index ef0e92340..5aafb73e8 100644 --- a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart index 0a2f66705..9a94b8f45 100644 --- a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart index 8bb48d6aa..24b6d8e5d 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/general_widgets/custom_text.dart'; -import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart'; +import 'package:hng/general_widgets/custom_text.dart'; +import 'package:hng/models/organization_model.dart'; +import 'package:hng/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart'; +import 'package:hng/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart index a8f6c1a89..1658cd91d 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart @@ -1,12 +1,12 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/connectivity_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/models/organization_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/connectivity_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart index 0bfbc24ec..844821439 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart @@ -1,7 +1,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/general_widgets/custom_text.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/general_widgets/custom_text.dart'; +import 'package:hng/ui/shared/colors.dart'; class WorkSpaceDisplayInfo extends StatelessWidget { final String? imageUrl; diff --git a/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart b/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart index b6c4e5181..5e914df3d 100644 --- a/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart +++ b/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_option_bottomsheet_viewmodel.dart'; +import 'package:hng/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_option_bottomsheet_viewmodel.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart b/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart index b8a8bee95..96c4e7541 100644 --- a/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart +++ b/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:stacked_services/stacked_services.dart'; import 'thread_options_bottomsheet/widget/recent_emojis.dart'; diff --git a/lib/ui/shared/dialogs.dart b/lib/ui/shared/dialogs.dart index 4a574bac5..3999392bb 100644 --- a/lib/ui/shared/dialogs.dart +++ b/lib/ui/shared/dialogs.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'shared.dart'; diff --git a/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart b/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart index 0374d945e..b0cbd5ba8 100644 --- a/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart +++ b/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; import 'package:stacked_services/stacked_services.dart'; class ShowAlertDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/delete_message.dart b/lib/ui/shared/dialogs/delete_message.dart index 336cde012..4d63c3b8c 100644 --- a/lib/ui/shared/dialogs/delete_message.dart +++ b/lib/ui/shared/dialogs/delete_message.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; class DeleteMessageDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart index b61550ff9..5e279f44d 100644 --- a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart +++ b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/general_widgets/custom_text.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart'; +import 'package:hng/general_widgets/custom_text.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart index 8dd165d33..cc421993d 100644 --- a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart +++ b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/services/notification_service.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/services/notification_service.dart'; import 'package:intl/intl.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/dialogs/schedule_channel_dialog.dart b/lib/ui/shared/dialogs/schedule_channel_dialog.dart index bfac8ee49..45fe8c159 100644 --- a/lib/ui/shared/dialogs/schedule_channel_dialog.dart +++ b/lib/ui/shared/dialogs/schedule_channel_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/view/channel/channel_view/channel_page_viewmodel.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/view/channel/channel_view/channel_page_viewmodel.dart'; import 'package:stacked_services/stacked_services.dart'; class ScheduleMessChannel extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/schedule_dialog.dart b/lib/ui/shared/dialogs/schedule_dialog.dart index 29dd89e80..5d4bcb8a3 100644 --- a/lib/ui/shared/dialogs/schedule_dialog.dart +++ b/lib/ui/shared/dialogs/schedule_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/view/dm_user/dm_user_viewmodel.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/view/dm_user/dm_user_viewmodel.dart'; import 'package:stacked_services/stacked_services.dart'; class ScheduleMess extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/select_language_dialog.dart b/lib/ui/shared/dialogs/select_language_dialog.dart index 82cb0cc7f..ade9f4773 100644 --- a/lib/ui/shared/dialogs/select_language_dialog.dart +++ b/lib/ui/shared/dialogs/select_language_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; import '../colors.dart'; diff --git a/lib/ui/shared/dialogs/select_theme_dialog.dart b/lib/ui/shared/dialogs/select_theme_dialog.dart index 3b996256e..b4bc25c08 100644 --- a/lib/ui/shared/dialogs/select_theme_dialog.dart +++ b/lib/ui/shared/dialogs/select_theme_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../general_widgets/custom_text.dart'; diff --git a/lib/ui/shared/dialogs/send_feedback_dialog.dart b/lib/ui/shared/dialogs/send_feedback_dialog.dart index a44a49684..9a4e54878 100644 --- a/lib/ui/shared/dialogs/send_feedback_dialog.dart +++ b/lib/ui/shared/dialogs/send_feedback_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; import 'package:stacked_services/stacked_services.dart'; class SendFeedbackDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/sign_out_dialog.dart b/lib/ui/shared/dialogs/sign_out_dialog.dart index 2892a99b7..4832b225f 100644 --- a/lib/ui/shared/dialogs/sign_out_dialog.dart +++ b/lib/ui/shared/dialogs/sign_out_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/general_widgets/custom_text.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/general_widgets/custom_text.dart'; +import 'package:hng/ui/shared/colors.dart'; import 'package:stacked_services/stacked_services.dart'; class SignOutDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/skin_tone_dialog.dart b/lib/ui/shared/dialogs/skin_tone_dialog.dart index 4b47d3d5b..5d0aaf2aa 100644 --- a/lib/ui/shared/dialogs/skin_tone_dialog.dart +++ b/lib/ui/shared/dialogs/skin_tone_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; class SkinToneDialog extends StatelessWidget { diff --git a/lib/ui/shared/search_bar.dart b/lib/ui/shared/search_bar.dart index 6a7a8b27c..d6ffc77c9 100644 --- a/lib/ui/shared/search_bar.dart +++ b/lib/ui/shared/search_bar.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import '../../general_widgets/easy_container.dart'; import '../../utilities/constants.dart'; diff --git a/lib/ui/shared/setup_bottom_sheet_ui.dart b/lib/ui/shared/setup_bottom_sheet_ui.dart index afb8230cb..354b7715f 100644 --- a/lib/ui/shared/setup_bottom_sheet_ui.dart +++ b/lib/ui/shared/setup_bottom_sheet_ui.dart @@ -1,6 +1,6 @@ -import 'package:zurichat/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart'; +import 'package:hng/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart'; +import 'package:hng/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart'; +import 'package:hng/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart'; import '../../app/app.locator.dart'; import '../../utilities/enums.dart'; diff --git a/lib/ui/shared/setup_dialog_ui.dart b/lib/ui/shared/setup_dialog_ui.dart index 2c1871f9a..42029af78 100644 --- a/lib/ui/shared/setup_dialog_ui.dart +++ b/lib/ui/shared/setup_dialog_ui.dart @@ -1,10 +1,10 @@ import 'package:flutter/widgets.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart'; -import 'package:zurichat/ui/shared/dialogs/delete_draft_alert_dialog.dart'; -import 'package:zurichat/ui/shared/dialogs/schedule_dialog.dart'; -import 'package:zurichat/ui/shared/dialogs/sign_out_dialog.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart'; +import 'package:hng/ui/shared/dialogs/delete_draft_alert_dialog.dart'; +import 'package:hng/ui/shared/dialogs/schedule_dialog.dart'; +import 'package:hng/ui/shared/dialogs/sign_out_dialog.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:stacked_services/stacked_services.dart'; import 'dialogs/image_source_dialog.dart'; import 'dialogs/schedule_channel_dialog.dart'; diff --git a/lib/ui/shared/shared.dart b/lib/ui/shared/shared.dart index 728c2f722..628d89e4d 100644 --- a/lib/ui/shared/shared.dart +++ b/lib/ui/shared/shared.dart @@ -1,4 +1,4 @@ -export 'package:zurichat/ui/shared/colors.dart'; -export 'package:zurichat/utilities/constants.dart'; -export 'package:zurichat/ui/shared/styles.dart'; -export 'package:zurichat/ui/shared/ui_helpers.dart'; +export 'package:hng/ui/shared/colors.dart'; +export 'package:hng/utilities/constants.dart'; +export 'package:hng/ui/shared/styles.dart'; +export 'package:hng/ui/shared/ui_helpers.dart'; diff --git a/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart b/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart index 3e3418ba6..8d373f172 100644 --- a/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart +++ b/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart @@ -1,5 +1,5 @@ import 'package:flutter_parsed_text/flutter_parsed_text.dart'; -import 'package:zurichat/utilities/utilities.dart'; +import 'package:hng/utilities/utilities.dart'; import 'package:stacked/stacked.dart'; import '../../shared.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart b/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart index eed553c6b..bde968365 100644 --- a/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart +++ b/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart'; -import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart'; -import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart'; +import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart'; +import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'thread_card_viewmodel.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart b/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart index c4e527ab9..ff70c6112 100644 --- a/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart +++ b/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart @@ -1,8 +1,8 @@ import 'dart:convert'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -10,7 +10,7 @@ import '../../../../app/app.locator.dart'; import '../../../../app/app.router.dart'; import '../../../../models/user_post.dart'; import '../../../../utilities/enums.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; class ThreadCardViewModel extends BaseViewModel { final _navigationService = locator(); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart index 5af1215d8..0c409b0a8 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; +import 'package:hng/models/user_post.dart'; class AudioMessage extends StatelessWidget { const AudioMessage({Key? key, required this.postAudioFiles}) diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart index 6b77f2245..28d0a4521 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; +import 'package:hng/models/user_post.dart'; import 'package:stacked/stacked.dart'; import '../thread_card_viewmodel.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart index ef1f57f3e..a288735ad 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart @@ -1,6 +1,6 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; +import 'package:hng/models/user_post.dart'; class MediaFiles extends StatelessWidget { const MediaFiles({Key? key, required this.postMediaFiles}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart index 42935a862..748070b36 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/utilities.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/utilities.dart'; class PostFilesDisplay extends StatelessWidget { const PostFilesDisplay({Key? key, required this.postFiles}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart index 782d0b9fe..d6c2c1196 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart @@ -1,7 +1,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; import 'package:stacked/stacked.dart'; class PostReplies extends ViewModelWidget { diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart index d18fbe7e0..fa9d52c4a 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart @@ -1,7 +1,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/ui/shared/shared.dart'; class QuotedReplies extends StatelessWidget { const QuotedReplies({ diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart index c4a35bef0..f96161c48 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart @@ -1,9 +1,9 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/utilities/utilities.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/utilities/utilities.dart'; class SnapshotLinks extends StatelessWidget { const SnapshotLinks({Key? key, required this.postSnapshotLinks}) diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart index b5f7a20a3..f406ba7db 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/general_widgets/custom_text.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; -import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart'; -import 'package:zurichat/ui/shared/styles.dart'; +import 'package:hng/general_widgets/custom_text.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; +import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart'; +import 'package:hng/ui/shared/styles.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; @@ -16,7 +16,7 @@ import 'post_files_display.dart'; import 'post_replies.dart'; import 'quoted_replies.dart'; import 'snapshot_links.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; class ThreadChannelMain extends ViewModelWidget { ThreadChannelMain(this.userPost, {Key? key}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart index aeed9cf0d..61554ca11 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:zurichat/ui/shared/styles.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:hng/ui/shared/styles.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; @@ -10,7 +10,7 @@ import '../../../colors.dart'; import '../../text_parser/text_parser_view.dart'; import '../thread_card_viewmodel.dart'; import 'emojis_list.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; class ThreadCardDetail extends ViewModelWidget { ThreadCardDetail(this.userPost, {Key? key}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart index fe47e0a6f..bfd4ba3c8 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; //Shows the original message with the number of replies import '../../../../../general_widgets/custom_text.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart index ce944778c..422f6a5fa 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; @@ -9,7 +9,7 @@ import '../../../shared.dart'; import '../../../styles.dart'; import '../../text_parser/text_parser_view.dart'; import '../thread_card_viewmodel.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; class ThreadCardPost extends ViewModelWidget { ThreadCardPost(this.userThreadPost, {Key? key}) : super(key: key); diff --git a/lib/ui/shared/text_field.dart b/lib/ui/shared/text_field.dart index f13101801..3f38b319b 100644 --- a/lib/ui/shared/text_field.dart +++ b/lib/ui/shared/text_field.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/ui/shared/colors.dart'; ///This is the text field with border ///Should accept only hint with no labels diff --git a/lib/ui/shared/text_styles.dart b/lib/ui/shared/text_styles.dart index 8a8de9295..7d014b645 100644 --- a/lib/ui/shared/text_styles.dart +++ b/lib/ui/shared/text_styles.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/ui/shared/colors.dart'; class ZuriTextStyle { static const double _smallSize = 13; diff --git a/lib/ui/shared/zuri_appbar.dart b/lib/ui/shared/zuri_appbar.dart index 43a76465e..d180c7f35 100644 --- a/lib/ui/shared/zuri_appbar.dart +++ b/lib/ui/shared/zuri_appbar.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/styles.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/styles.dart'; // ignore: must_be_immutable class ZuriAppBar extends StatelessWidget implements PreferredSizeWidget { diff --git a/lib/ui/shared/zuri_loader.dart b/lib/ui/shared/zuri_loader.dart index c8bed276e..5cd4a7cc3 100644 --- a/lib/ui/shared/zuri_loader.dart +++ b/lib/ui/shared/zuri_loader.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; class ZuriLoader extends StatefulWidget { final bool isTransparent; @@ -29,7 +29,8 @@ class _ZuriLoaderState extends State with TickerProviderStateMixin { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: widget.isTransparent ? Colors.transparent : AppColors.whiteColor, + backgroundColor: + widget.isTransparent ? Colors.transparent : AppColors.whiteColor, body: Center( child: RotationTransition( turns: _animation, diff --git a/lib/ui/view/add_people/add_people_view.dart b/lib/ui/view/add_people/add_people_view.dart index 2b9f78f51..fd3365d85 100644 --- a/lib/ui/view/add_people/add_people_view.dart +++ b/lib/ui/view/add_people/add_people_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/advanced/advanced_view.dart b/lib/ui/view/advanced/advanced_view.dart index f516c783a..5dec4d55b 100644 --- a/lib/ui/view/advanced/advanced_view.dart +++ b/lib/ui/view/advanced/advanced_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/view/channel/add_people/channel_add_people_view.dart b/lib/ui/view/channel/add_people/channel_add_people_view.dart index 8bdb3c237..50b310ba6 100644 --- a/lib/ui/view/channel/add_people/channel_add_people_view.dart +++ b/lib/ui/view/channel/add_people/channel_add_people_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart b/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart index 40b115e15..33ef4a562 100644 --- a/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart +++ b/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart @@ -1,10 +1,10 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/models/user_search_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/models/user_search_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_info/channel_info_view.dart b/lib/ui/view/channel/channel_info/channel_info_view.dart index e457e425b..4b6eed400 100644 --- a/lib/ui/view/channel/channel_info/channel_info_view.dart +++ b/lib/ui/view/channel/channel_info/channel_info_view.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/ui/shared/colors.dart'; import '../../../shared/shared.dart'; import 'channel_info_view_model.dart'; import 'widgets/first_section.dart'; diff --git a/lib/ui/view/channel/channel_info/channel_info_view_model.dart b/lib/ui/view/channel/channel_info/channel_info_view_model.dart index 973a2f4e0..99f798100 100644 --- a/lib/ui/view/channel/channel_info/channel_info_view_model.dart +++ b/lib/ui/view/channel/channel_info/channel_info_view_model.dart @@ -1,12 +1,12 @@ -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/ui/view/channel/channel_members/channel_members_list.dart'; -import 'package:zurichat/utilities/constants.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/ui/view/channel/channel_members/channel_members_list.dart'; +import 'package:hng/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../../app/app.locator.dart'; diff --git a/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart b/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart index 13555756d..e24c91c37 100644 --- a/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart +++ b/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; Widget customAppBar(model) { return AppBar( diff --git a/lib/ui/view/channel/channel_info/widgets/edit_button.dart b/lib/ui/view/channel/channel_info/widgets/edit_button.dart index 4bddf3347..4ee89c86e 100644 --- a/lib/ui/view/channel/channel_info/widgets/edit_button.dart +++ b/lib/ui/view/channel/channel_info/widgets/edit_button.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import '../../../../shared/styles.dart'; import '../channel_info_view_model.dart'; diff --git a/lib/ui/view/channel/channel_info/widgets/first_section.dart b/lib/ui/view/channel/channel_info/widgets/first_section.dart index edea4047f..16cb92970 100644 --- a/lib/ui/view/channel/channel_info/widgets/first_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/first_section.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; import '../../../../shared/colors.dart'; class FirstSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/fourth_section.dart b/lib/ui/view/channel/channel_info/widgets/fourth_section.dart index 063cf6d04..035fa98ce 100644 --- a/lib/ui/view/channel/channel_info/widgets/fourth_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/fourth_section.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; -import 'package:zurichat/ui/view/channel/channel_info/widgets/new_row_tile.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:hng/ui/view/channel/channel_info/widgets/new_row_tile.dart'; import '../../../../shared/colors.dart'; class FourthSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart b/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart index ea52bfe3e..0d26ded38 100644 --- a/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart +++ b/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/ui/shared/shared.dart'; class NewRowTile extends StatelessWidget { const NewRowTile({ diff --git a/lib/ui/view/channel/channel_info/widgets/second_section.dart b/lib/ui/view/channel/channel_info/widgets/second_section.dart index 86a96ccca..0e15b375c 100644 --- a/lib/ui/view/channel/channel_info/widgets/second_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/second_section.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; import '../../../../shared/colors.dart'; class SecondSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/seventh_section.dart b/lib/ui/view/channel/channel_info/widgets/seventh_section.dart index 941233eca..6982a8cd2 100644 --- a/lib/ui/view/channel/channel_info/widgets/seventh_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/seventh_section.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/channel_info/widgets/sixth_section.dart b/lib/ui/view/channel/channel_info/widgets/sixth_section.dart index 41b381566..7dd26781a 100644 --- a/lib/ui/view/channel/channel_info/widgets/sixth_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/sixth_section.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; import 'package:stacked/stacked.dart'; class SixthSection extends ViewModelWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/third_section.dart b/lib/ui/view/channel/channel_info/widgets/third_section.dart index 116ab7278..cd000bb19 100644 --- a/lib/ui/view/channel/channel_info/widgets/third_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/third_section.dart @@ -1,12 +1,12 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; -import 'package:zurichat/ui/view/channel/channel_info/widgets/new_row_tile.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:hng/ui/view/channel/channel_info/widgets/new_row_tile.dart'; import '../../../../shared/colors.dart'; class ThirdSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_list/channels_view.dart b/lib/ui/view/channel/channel_list/channels_view.dart index 4407a883b..5f72e8c93 100644 --- a/lib/ui/view/channel/channel_list/channels_view.dart +++ b/lib/ui/view/channel/channel_list/channels_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:grouped_list/grouped_list.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/channel_list/channels_viewmodel.dart b/lib/ui/view/channel/channel_list/channels_viewmodel.dart index 048906b3d..1f09715f7 100644 --- a/lib/ui/view/channel/channel_list/channels_viewmodel.dart +++ b/lib/ui/view/channel/channel_list/channels_viewmodel.dart @@ -1,12 +1,12 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; -import 'package:zurichat/services/connectivity_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/services/connectivity_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_members/channel_members_list.dart b/lib/ui/view/channel/channel_members/channel_members_list.dart index 94c7a5398..cd6847e2a 100644 --- a/lib/ui/view/channel/channel_members/channel_members_list.dart +++ b/lib/ui/view/channel/channel_members/channel_members_list.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import '../../../shared/colors.dart'; import 'package:stacked/stacked.dart'; import '../shared_widgets.dart'; diff --git a/lib/ui/view/channel/channel_members/channel_members_list_model.dart b/lib/ui/view/channel/channel_members/channel_members_list_model.dart index f5503c5ae..5f217f0cc 100644 --- a/lib/ui/view/channel/channel_members/channel_members_list_model.dart +++ b/lib/ui/view/channel/channel_members/channel_members_list_model.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/models/static_user_model.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/models/static_user_model.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_notification/channel_notification_view.dart b/lib/ui/view/channel/channel_notification/channel_notification_view.dart index ae9191887..c3b8b3389 100644 --- a/lib/ui/view/channel/channel_notification/channel_notification_view.dart +++ b/lib/ui/view/channel/channel_notification/channel_notification_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'channel_notification_viewmodel.dart'; diff --git a/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart b/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart index 92b988572..f7b51d1d6 100644 --- a/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart +++ b/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; class ChannelNotificationViewModel extends BaseViewModel { diff --git a/lib/ui/view/channel/channel_search/channel_search_view.dart b/lib/ui/view/channel/channel_search/channel_search_view.dart index 48a56bb1e..65939b4d0 100644 --- a/lib/ui/view/channel/channel_search/channel_search_view.dart +++ b/lib/ui/view/channel/channel_search/channel_search_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'channel_search_view_model.dart'; diff --git a/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart b/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart index 2784ca539..628bf7cbc 100644 --- a/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart +++ b/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'textfield_style.dart'; diff --git a/lib/ui/view/channel/channel_search/widgets/search_result.dart b/lib/ui/view/channel/channel_search/widgets/search_result.dart index 32946533d..1a31751bb 100644 --- a/lib/ui/view/channel/channel_search/widgets/search_result.dart +++ b/lib/ui/view/channel/channel_search/widgets/search_result.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import '../../../../shared/shared.dart'; import '../../channel_info/widgets/textstyles.dart'; diff --git a/lib/ui/view/channel/channel_search/widgets/textfield_style.dart b/lib/ui/view/channel/channel_search/widgets/textfield_style.dart index 4ba79fdda..0f2391ee9 100644 --- a/lib/ui/view/channel/channel_search/widgets/textfield_style.dart +++ b/lib/ui/view/channel/channel_search/widgets/textfield_style.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/ui/shared/colors.dart'; InputDecoration textFormFields(String hintText) { return InputDecoration( diff --git a/lib/ui/view/channel/channel_view/channel_page_view.dart b/lib/ui/view/channel/channel_view/channel_page_view.dart index ef6d507e5..f96ca3c85 100644 --- a/lib/ui/view/channel/channel_view/channel_page_view.dart +++ b/lib/ui/view/channel/channel_view/channel_page_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/general_widgets/no_connection_widget.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/channel/channel_view/widgets/channel_intro.dart'; -import 'package:zurichat/ui/view/expandable_textfield/expandable_textfield_screen.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/general_widgets/no_connection_widget.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/view/channel/channel_view/widgets/channel_intro.dart'; +import 'package:hng/ui/view/expandable_textfield/expandable_textfield_screen.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart b/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart index 9910d07d4..50db50575 100644 --- a/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart +++ b/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart @@ -2,21 +2,21 @@ import 'dart:async'; import 'dart:convert'; import 'package:flutter/widgets.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/models/channel_model.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; -import 'package:zurichat/services/centrifuge_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/services/notification_service.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/models/channel_model.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/services/centrifuge_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/services/notification_service.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:simple_moment/simple_moment.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_view/widgets/channel_chat.dart b/lib/ui/view/channel/channel_view/widgets/channel_chat.dart index 4409e4624..125fcfde4 100644 --- a/lib/ui/view/channel/channel_view/widgets/channel_chat.dart +++ b/lib/ui/view/channel/channel_view/widgets/channel_chat.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/smart_widgets/thread_card/thread_card_view.dart'; -import 'package:zurichat/ui/view/channel/channel_view/channel_page_viewmodel.dart'; -import 'package:zurichat/utilities/utilities.dart'; +import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/smart_widgets/thread_card/thread_card_view.dart'; +import 'package:hng/ui/view/channel/channel_view/channel_page_viewmodel.dart'; +import 'package:hng/utilities/utilities.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/channel/channel_view/widgets/channel_intro.dart b/lib/ui/view/channel/channel_view/widgets/channel_intro.dart index 341ea2508..d724c1e14 100644 --- a/lib/ui/view/channel/channel_view/widgets/channel_intro.dart +++ b/lib/ui/view/channel/channel_view/widgets/channel_intro.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; import 'package:stacked/stacked.dart'; import '../channel_page_viewmodel.dart'; diff --git a/lib/ui/view/channel/channel_view/widgets/check_user.dart b/lib/ui/view/channel/channel_view/widgets/check_user.dart index 94952ac23..2af2a7d24 100644 --- a/lib/ui/view/channel/channel_view/widgets/check_user.dart +++ b/lib/ui/view/channel/channel_view/widgets/check_user.dart @@ -2,10 +2,10 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/view/channel/channel_info/widgets/textstyles.dart'; -import 'package:zurichat/ui/view/channel/channel_view/channel_page_viewmodel.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/view/channel/channel_info/widgets/textstyles.dart'; +import 'package:hng/ui/view/channel/channel_view/channel_page_viewmodel.dart'; import 'package:stacked/stacked.dart'; class CheckUser extends ViewModelWidget { diff --git a/lib/ui/view/channel/channel_view/widgets/message_tile.dart b/lib/ui/view/channel/channel_view/widgets/message_tile.dart index c2b1332ca..e50e7828f 100644 --- a/lib/ui/view/channel/channel_view/widgets/message_tile.dart +++ b/lib/ui/view/channel/channel_view/widgets/message_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; class MessageTile extends StatelessWidget { final String message, avatar, name, time; diff --git a/lib/ui/view/channel/edit_channel/edit_channel_view.dart b/lib/ui/view/channel/edit_channel/edit_channel_view.dart index 8c01bfa03..fd0c20f1a 100644 --- a/lib/ui/view/channel/edit_channel/edit_channel_view.dart +++ b/lib/ui/view/channel/edit_channel/edit_channel_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart b/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart index eceb3c372..7aca58a77 100644 --- a/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart +++ b/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart @@ -1,8 +1,8 @@ -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; -// import 'package:zurichat/utilities/utilities.dart'; -// import 'package:zurichat/utilities/utilities.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/utilities/storage_keys.dart'; +// import 'package:hng/utilities/utilities.dart'; +// import 'package:hng/utilities/utilities.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart b/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart index 11a092ba0..069522d1d 100644 --- a/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart +++ b/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; import '../edit_channel_view_model.dart'; class CustomAppBars extends StatelessWidget implements PreferredSizeWidget { diff --git a/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart b/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart index ea95a5316..964273102 100644 --- a/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart +++ b/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; class TextHeader extends StatelessWidget { final String headerText; diff --git a/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart b/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart index e74ea1158..8a822badc 100644 --- a/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart +++ b/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/ui/shared/colors.dart'; class TextBox extends StatelessWidget { final String hint; diff --git a/lib/ui/view/channel/new_channel/new_channel.dart b/lib/ui/view/channel/new_channel/new_channel.dart index e7c9ebcba..b391d70d4 100644 --- a/lib/ui/view/channel/new_channel/new_channel.dart +++ b/lib/ui/view/channel/new_channel/new_channel.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart b/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart index 46bc86439..c93c20806 100644 --- a/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart +++ b/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart @@ -1,8 +1,8 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; import 'package:stacked/stacked.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../../utilities/mixins/validators_mixin.dart'; import 'new_channel.form.dart'; diff --git a/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart b/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart index 66c2b36b8..984151303 100644 --- a/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart +++ b/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart b/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart index a5f2ffd3d..001ca832f 100644 --- a/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart +++ b/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart @@ -1,8 +1,8 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/models/pinned_message_model.dart'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/models/pinned_message_model.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/widgets/channel_browser_container.dart b/lib/ui/view/channel/widgets/channel_browser_container.dart index 47a5a4333..4ec71cea4 100644 --- a/lib/ui/view/channel/widgets/channel_browser_container.dart +++ b/lib/ui/view/channel/widgets/channel_browser_container.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/view/channel/channel_list/channels_viewmodel.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/view/channel/channel_list/channels_viewmodel.dart'; import 'package:stacked/stacked.dart'; class ChannelBrowserContainer extends ViewModelWidget { diff --git a/lib/ui/view/clear_after/clear_after_view.dart b/lib/ui/view/clear_after/clear_after_view.dart index f214c78b7..c58c99c19 100644 --- a/lib/ui/view/clear_after/clear_after_view.dart +++ b/lib/ui/view/clear_after/clear_after_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import '../../../general_widgets/custom_text.dart'; import '../../shared/shared.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/clear_after/clear_after_viewmodel.dart b/lib/ui/view/clear_after/clear_after_viewmodel.dart index 7687e545d..44eaac794 100644 --- a/lib/ui/view/clear_after/clear_after_viewmodel.dart +++ b/lib/ui/view/clear_after/clear_after_viewmodel.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/clear_after/widget/date_and_time.dart b/lib/ui/view/clear_after/widget/date_and_time.dart index 998b10225..4d357819d 100644 --- a/lib/ui/view/clear_after/widget/date_and_time.dart +++ b/lib/ui/view/clear_after/widget/date_and_time.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; class DateAndTime extends StatefulWidget { const DateAndTime({Key? key}) : super(key: key); diff --git a/lib/ui/view/clear_notification/clear_notification_view.dart b/lib/ui/view/clear_notification/clear_notification_view.dart index 96fd2b1dd..8a3fbd972 100644 --- a/lib/ui/view/clear_notification/clear_notification_view.dart +++ b/lib/ui/view/clear_notification/clear_notification_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'clear_notification_viewmodel.dart'; diff --git a/lib/ui/view/clear_notification/clear_notification_viewmodel.dart b/lib/ui/view/clear_notification/clear_notification_viewmodel.dart index 3d8e0d09b..18cf7df65 100644 --- a/lib/ui/view/clear_notification/clear_notification_viewmodel.dart +++ b/lib/ui/view/clear_notification/clear_notification_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/app/app.locator.dart'; +import 'package:hng/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/create_channel_view/create_channel_view.dart b/lib/ui/view/create_channel_view/create_channel_view.dart index 7836d17e7..1b166fe85 100644 --- a/lib/ui/view/create_channel_view/create_channel_view.dart +++ b/lib/ui/view/create_channel_view/create_channel_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/create_channel_view/create_channel_viewmodel.dart b/lib/ui/view/create_channel_view/create_channel_viewmodel.dart index a1a7ea326..9f2299424 100644 --- a/lib/ui/view/create_channel_view/create_channel_viewmodel.dart +++ b/lib/ui/view/create_channel_view/create_channel_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/app/app.locator.dart'; +import 'package:hng/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/create_channel_view/widgets/custom_text_field.dart b/lib/ui/view/create_channel_view/widgets/custom_text_field.dart index 6189eaee6..925c18bf0 100644 --- a/lib/ui/view/create_channel_view/widgets/custom_text_field.dart +++ b/lib/ui/view/create_channel_view/widgets/custom_text_field.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/ui/shared/colors.dart'; class CustomTextField extends StatelessWidget { const CustomTextField({Key? key}) : super(key: key); diff --git a/lib/ui/view/direct_message/direct_message.dart b/lib/ui/view/direct_message/direct_message.dart index c84838641..53880a42a 100644 --- a/lib/ui/view/direct_message/direct_message.dart +++ b/lib/ui/view/direct_message/direct_message.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:stacked/stacked_annotations.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import '../../../utilities/constants.dart'; import 'package:intl/intl.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/direct_message/direct_message_text_field_hook.dart b/lib/ui/view/direct_message/direct_message_text_field_hook.dart index 9b2b82a5e..93ecb5d0a 100644 --- a/lib/ui/view/direct_message/direct_message_text_field_hook.dart +++ b/lib/ui/view/direct_message/direct_message_text_field_hook.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; import 'direct_message_viewmodel.dart'; diff --git a/lib/ui/view/direct_message/direct_message_viewmodel.dart b/lib/ui/view/direct_message/direct_message_viewmodel.dart index c20fdc250..f49564198 100644 --- a/lib/ui/view/direct_message/direct_message_viewmodel.dart +++ b/lib/ui/view/direct_message/direct_message_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/app/app.locator.dart'; +import 'package:hng/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/dm_chat_view/dm_jump_to_view.dart b/lib/ui/view/dm_chat_view/dm_jump_to_view.dart index 9c7a553d2..9818a3a3b 100644 --- a/lib/ui/view/dm_chat_view/dm_jump_to_view.dart +++ b/lib/ui/view/dm_chat_view/dm_jump_to_view.dart @@ -2,11 +2,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/general_widgets/custom_channel.dart'; -import 'package:zurichat/general_widgets/custom_user.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/general_widgets/custom_channel.dart'; +import 'package:hng/general_widgets/custom_user.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked/stacked.dart'; import 'dm_jump_to_view.form.dart'; diff --git a/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart b/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart index 21b232495..66452982d 100644 --- a/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart +++ b/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../app/app.locator.dart'; diff --git a/lib/ui/view/dm_search/dm_search_view.dart b/lib/ui/view/dm_search/dm_search_view.dart index 283610009..818222c2f 100644 --- a/lib/ui/view/dm_search/dm_search_view.dart +++ b/lib/ui/view/dm_search/dm_search_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/dm_search/dm_search_widgets.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/view/dm_search/dm_search_widgets.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import 'dm_search_viewmodel.dart'; diff --git a/lib/ui/view/dm_search/dm_search_viewmodel.dart b/lib/ui/view/dm_search/dm_search_viewmodel.dart index 5ea478e4a..5ae48f8b7 100644 --- a/lib/ui/view/dm_search/dm_search_viewmodel.dart +++ b/lib/ui/view/dm_search/dm_search_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/app/app.locator.dart'; +import 'package:hng/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/dm_search/dm_search_widgets.dart b/lib/ui/view/dm_search/dm_search_widgets.dart index bb0a30e6b..58212dbca 100644 --- a/lib/ui/view/dm_search/dm_search_widgets.dart +++ b/lib/ui/view/dm_search/dm_search_widgets.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; class Users { String? userName; diff --git a/lib/ui/view/dm_user/dm_user_view.dart b/lib/ui/view/dm_user/dm_user_view.dart index 1972964ca..e999e2bfa 100644 --- a/lib/ui/view/dm_user/dm_user_view.dart +++ b/lib/ui/view/dm_user/dm_user_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:grouped_list/grouped_list.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/dm_user/widgets/custom_start_message.dart'; -import 'package:zurichat/ui/view/dm_user/widgets/group_separator.dart'; -import 'package:zurichat/ui/view/expandable_textfield/expandable_textfield_screen.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/view/dm_user/widgets/custom_start_message.dart'; +import 'package:hng/ui/view/dm_user/widgets/group_separator.dart'; +import 'package:hng/ui/view/expandable_textfield/expandable_textfield_screen.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import '../../shared/colors.dart'; diff --git a/lib/ui/view/dm_user/dm_user_viewmodel.dart b/lib/ui/view/dm_user/dm_user_viewmodel.dart index 71dc18a8c..e34070dd9 100644 --- a/lib/ui/view/dm_user/dm_user_viewmodel.dart +++ b/lib/ui/view/dm_user/dm_user_viewmodel.dart @@ -1,15 +1,15 @@ import 'dart:convert'; import 'dart:math'; import 'package:flutter/cupertino.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/ui/view/dm_user/dummy_data/models/message.dart'; -import 'package:zurichat/ui/view/dm_user/dummy_data/models/user.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/ui/view/dm_user/dummy_data/models/message.dart'; +import 'package:hng/ui/view/dm_user/dummy_data/models/user.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; class DmUserViewModel extends FormViewModel { final navigationService = locator(); diff --git a/lib/ui/view/dm_user/dummy_data/models/message.dart b/lib/ui/view/dm_user/dummy_data/models/message.dart index 453d4a67f..41944adcc 100644 --- a/lib/ui/view/dm_user/dummy_data/models/message.dart +++ b/lib/ui/view/dm_user/dummy_data/models/message.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:intl/intl.dart'; import 'user.dart'; diff --git a/lib/ui/view/dm_user/dummy_data/models/user.dart b/lib/ui/view/dm_user/dummy_data/models/user.dart index 48a8f6776..6df3ba7ad 100644 --- a/lib/ui/view/dm_user/dummy_data/models/user.dart +++ b/lib/ui/view/dm_user/dummy_data/models/user.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; class User { String name; diff --git a/lib/ui/view/dm_user/widgets/custom_start_message.dart b/lib/ui/view/dm_user/widgets/custom_start_message.dart index 263d51ebd..6c829fd74 100644 --- a/lib/ui/view/dm_user/widgets/custom_start_message.dart +++ b/lib/ui/view/dm_user/widgets/custom_start_message.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; class StartMessage extends StatelessWidget { final String? userName; diff --git a/lib/ui/view/dm_user/widgets/message_view.dart b/lib/ui/view/dm_user/widgets/message_view.dart index 879fbd960..d6f3e2015 100644 --- a/lib/ui/view/dm_user/widgets/message_view.dart +++ b/lib/ui/view/dm_user/widgets/message_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:intl/intl.dart'; import '../dummy_data/models/message.dart'; diff --git a/lib/ui/view/dm_user/widgets/online_indicator.dart b/lib/ui/view/dm_user/widgets/online_indicator.dart index d89d92ed2..1c081a603 100644 --- a/lib/ui/view/dm_user/widgets/online_indicator.dart +++ b/lib/ui/view/dm_user/widgets/online_indicator.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/ui/shared/colors.dart'; class OnlineIndicator extends StatelessWidget { const OnlineIndicator(int i, {Key? key}) : super(key: key); diff --git a/lib/ui/view/do_not_disturb/do_not_disturb_view.dart b/lib/ui/view/do_not_disturb/do_not_disturb_view.dart index b536c58e5..846ba0861 100644 --- a/lib/ui/view/do_not_disturb/do_not_disturb_view.dart +++ b/lib/ui/view/do_not_disturb/do_not_disturb_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/custom_text.dart'; diff --git a/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart b/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart index ae43baa7f..3fcb4e266 100644 --- a/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart +++ b/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/draft/app/data.dart b/lib/ui/view/draft/app/data.dart index 18b726cd0..51e0d1ad9 100644 --- a/lib/ui/view/draft/app/data.dart +++ b/lib/ui/view/draft/app/data.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; class DraftedItem { final String? username, message, time; diff --git a/lib/ui/view/draft/app/drafted_item_widget.dart b/lib/ui/view/draft/app/drafted_item_widget.dart index 125b0bf3c..3587d0be3 100644 --- a/lib/ui/view/draft/app/drafted_item_widget.dart +++ b/lib/ui/view/draft/app/drafted_item_widget.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/styles.dart'; +import 'package:hng/ui/shared/styles.dart'; class DraftedItemWidget extends StatelessWidget { const DraftedItemWidget({ diff --git a/lib/ui/view/draft/draft_view.dart b/lib/ui/view/draft/draft_view.dart index bb1766138..ea24979e8 100644 --- a/lib/ui/view/draft/draft_view.dart +++ b/lib/ui/view/draft/draft_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/draft/drafts.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/view/draft/drafts.dart'; import 'package:stacked/stacked.dart'; import 'draft_viewmodel.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; diff --git a/lib/ui/view/draft/draft_viewmodel.dart b/lib/ui/view/draft/draft_viewmodel.dart index 7c0430add..3240b30c4 100644 --- a/lib/ui/view/draft/draft_viewmodel.dart +++ b/lib/ui/view/draft/draft_viewmodel.dart @@ -1,16 +1,16 @@ import 'dart:convert'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/models/draft_data_holder_model.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/services/connectivity_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/models/draft_data_holder_model.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/services/connectivity_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/storage_keys.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; class DraftViewModel extends BaseViewModel { final _navigationService = locator(); diff --git a/lib/ui/view/draft/drafts.dart b/lib/ui/view/draft/drafts.dart index f93880a13..f2d7768f5 100644 --- a/lib/ui/view/draft/drafts.dart +++ b/lib/ui/view/draft/drafts.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/view/draft/draft_viewmodel.dart'; -import 'package:zurichat/ui/view/threads/test_data.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/view/draft/draft_viewmodel.dart'; +import 'package:hng/ui/view/threads/test_data.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:intl/intl.dart'; diff --git a/lib/ui/view/edit_profile/edit_profile_view.dart b/lib/ui/view/edit_profile/edit_profile_view.dart index f516685d8..4674a4977 100644 --- a/lib/ui/view/edit_profile/edit_profile_view.dart +++ b/lib/ui/view/edit_profile/edit_profile_view.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/user_model.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/user_model.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart index 7bfc40b90..4dde9ac03 100644 --- a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart +++ b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart @@ -1,11 +1,11 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/user_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/user_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/mixins/validators_mixin.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/edit_profile/widget/edit_profile_body.dart b/lib/ui/view/edit_profile/widget/edit_profile_body.dart index d270a367e..67cc07e1c 100644 --- a/lib/ui/view/edit_profile/widget/edit_profile_body.dart +++ b/lib/ui/view/edit_profile/widget/edit_profile_body.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; import 'package:stacked/stacked.dart'; import '../edit_profile_viewmodel.dart'; diff --git a/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart b/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart index 3bae36956..5971dc6d7 100644 --- a/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart +++ b/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/view/channel/channel_view/widgets/check_user.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/view/channel/channel_view/widgets/check_user.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart b/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart index 3fa2255d2..7ce2241d9 100644 --- a/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart +++ b/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart b/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart index 42974e59d..45f8183da 100644 --- a/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart +++ b/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import '../../../general_widgets/app_alert_dialog.dart'; diff --git a/lib/ui/view/file_search/file_search_view.dart b/lib/ui/view/file_search/file_search_view.dart index 8d4d3e46b..9e544a29c 100644 --- a/lib/ui/view/file_search/file_search_view.dart +++ b/lib/ui/view/file_search/file_search_view.dart @@ -1,7 +1,7 @@ // ignore_for_file: prefer_typing_uninitialized_variables import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/file_search/widgets/search_bar.dart b/lib/ui/view/file_search/widgets/search_bar.dart index fc3c137a9..1dbe6bffc 100644 --- a/lib/ui/view/file_search/widgets/search_bar.dart +++ b/lib/ui/view/file_search/widgets/search_bar.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart index 6a8234499..1dbf09f74 100644 --- a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart +++ b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart index 677ca9be5..e450b4f5e 100644 --- a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart +++ b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart @@ -1,13 +1,13 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.form.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/mixins/validators_mixin.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.form.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/mixins/validators_mixin.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart index febba0f21..efd1d007d 100644 --- a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart +++ b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart index ef5fb1e2d..c15f868d4 100644 --- a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart +++ b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart @@ -1,13 +1,13 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/mixins/validators_mixin.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/mixins/validators_mixin.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart index 2a1f9e428..71cc4d7d3 100644 --- a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart +++ b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart index 6a7f06a0a..25525c83e 100644 --- a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart +++ b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart @@ -1,14 +1,14 @@ import 'dart:async'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/view/otp/otp_view.form.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/view/otp/otp_view.form.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/language_and_region/language_and_region_view.dart b/lib/ui/view/language_and_region/language_and_region_view.dart index 068ce00fc..630ff2e3f 100644 --- a/lib/ui/view/language_and_region/language_and_region_view.dart +++ b/lib/ui/view/language_and_region/language_and_region_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/view/language_and_region/language_and_region_viewmodel.dart b/lib/ui/view/language_and_region/language_and_region_viewmodel.dart index 4489cc472..d1335d65b 100644 --- a/lib/ui/view/language_and_region/language_and_region_viewmodel.dart +++ b/lib/ui/view/language_and_region/language_and_region_viewmodel.dart @@ -1,6 +1,6 @@ // ignore_for_file: avoid_print -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/login/login_view.dart b/lib/ui/view/login/login_view.dart index 93a6de41e..7fd10e704 100644 --- a/lib/ui/view/login/login_view.dart +++ b/lib/ui/view/login/login_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/ui_helpers.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/ui_helpers.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/login/login_viewmodel.dart b/lib/ui/view/login/login_viewmodel.dart index 0a0df359e..fac85cab9 100644 --- a/lib/ui/view/login/login_viewmodel.dart +++ b/lib/ui/view/login/login_viewmodel.dart @@ -1,9 +1,9 @@ -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/user_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/utilities/constants.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/user_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/nav_bar/nav_bar_view.dart b/lib/ui/view/nav_bar/nav_bar_view.dart index 93406d917..5fd587bca 100644 --- a/lib/ui/view/nav_bar/nav_bar_view.dart +++ b/lib/ui/view/nav_bar/nav_bar_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_intro_page.dart'; -import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_intro_page.dart'; +import 'package:hng/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/svg_icon.dart'; diff --git a/lib/ui/view/notifications/notifications_view.dart b/lib/ui/view/notifications/notifications_view.dart index 7c3e3c656..8640d190f 100644 --- a/lib/ui/view/notifications/notifications_view.dart +++ b/lib/ui/view/notifications/notifications_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/general_widgets/menu_item_tile.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/general_widgets/menu_item_tile.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'notifications_viewmodel.dart'; diff --git a/lib/ui/view/notifications/notifications_viewmodel.dart b/lib/ui/view/notifications/notifications_viewmodel.dart index a4d54fe94..ae2eb6968 100644 --- a/lib/ui/view/notifications/notifications_viewmodel.dart +++ b/lib/ui/view/notifications/notifications_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/app/app.locator.dart'; +import 'package:hng/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/onboarding/onboading_view.dart b/lib/ui/view/onboarding/onboading_view.dart index db3b1d5ea..15f3ba81f 100644 --- a/lib/ui/view/onboarding/onboading_view.dart +++ b/lib/ui/view/onboarding/onboading_view.dart @@ -2,7 +2,7 @@ import 'dart:core'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:page_view_dot_indicator/page_view_dot_indicator.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/organization/add_organization/add_organization_view.dart b/lib/ui/view/organization/add_organization/add_organization_view.dart index 11111ac72..3b235877b 100644 --- a/lib/ui/view/organization/add_organization/add_organization_view.dart +++ b/lib/ui/view/organization/add_organization/add_organization_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'add_organization_viewmodel.dart'; diff --git a/lib/ui/view/organization/create_organization/company.dart b/lib/ui/view/organization/create_organization/company.dart index 6eec5323c..a6d12dc8e 100644 --- a/lib/ui/view/organization/create_organization/company.dart +++ b/lib/ui/view/organization/create_organization/company.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import '../../../shared/colors.dart'; import '../../../shared/long_button.dart'; import '../../../shared/text_field.dart'; diff --git a/lib/ui/view/organization/create_organization/create_organization.dart b/lib/ui/view/organization/create_organization/create_organization.dart index f400a1f62..7d10e1f09 100644 --- a/lib/ui/view/organization/create_organization/create_organization.dart +++ b/lib/ui/view/organization/create_organization/create_organization.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'create_organization_viewmodel.dart'; import 'company.dart'; diff --git a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart index c61440465..5d87f135c 100644 --- a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart +++ b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/create_organization/invite.dart b/lib/ui/view/organization/create_organization/invite.dart index 6b4ad821d..d79eaaa99 100644 --- a/lib/ui/view/organization/create_organization/invite.dart +++ b/lib/ui/view/organization/create_organization/invite.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/organization/create_organization/project.dart b/lib/ui/view/organization/create_organization/project.dart index 83720f3dc..f803ee4c9 100644 --- a/lib/ui/view/organization/create_organization/project.dart +++ b/lib/ui/view/organization/create_organization/project.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; diff --git a/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart b/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart index 9b3346e70..a24ffd1b8 100644 --- a/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart +++ b/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'email_confirmation_viewmodel.dart'; diff --git a/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart b/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart index d147a7ca1..5bc4c95ea 100644 --- a/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart +++ b/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart @@ -2,8 +2,8 @@ import 'dart:io'; // ignore: import_of_legacy_library_into_null_safe import 'package:flutter_appavailability/flutter_appavailability.dart'; -import 'package:zurichat/app/app.logger.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/app/app.logger.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart b/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart index 26b6dde87..fc8355121 100644 --- a/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart +++ b/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; class CreateInviteLink extends StatelessWidget { diff --git a/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart b/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart index 8af56479a..745af64e5 100644 --- a/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart +++ b/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; import 'package:stacked/stacked.dart'; class InviteViaEmailAdmin extends StatelessWidget { diff --git a/lib/ui/view/organization/invite_to_organization/invitation_sent.dart b/lib/ui/view/organization/invite_to_organization/invitation_sent.dart index b9c05db48..ef504b62b 100644 --- a/lib/ui/view/organization/invite_to_organization/invitation_sent.dart +++ b/lib/ui/view/organization/invite_to_organization/invitation_sent.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/long_button.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/ui_helpers.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/long_button.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/ui_helpers.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; -import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; +import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; class InvitationSent extends StatelessWidget { const InvitationSent({Key? key}) : super(key: key); diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart b/lib/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart index f3a2b3c2a..71c645584 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../invite_via_email/invite_viewmodel.dart'; diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart index a0fa6a603..69094195d 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/ui_helpers.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/ui_helpers.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'invite_via_email.form.dart'; import 'invite_viewmodel.dart'; diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart index 80dd96b6c..24543d5ea 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart @@ -1,13 +1,13 @@ import 'package:dio/dio.dart'; import 'package:stacked/stacked.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/mixins/validators_mixin.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/mixins/validators_mixin.dart'; +import 'package:hng/utilities/storage_keys.dart'; import '../../../../../../app/app.logger.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/new_email/new_email.dart b/lib/ui/view/organization/new_email/new_email.dart index d073c74f0..b406f081f 100644 --- a/lib/ui/view/organization/new_email/new_email.dart +++ b/lib/ui/view/organization/new_email/new_email.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; diff --git a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart index 49826f79b..b81bac999 100644 --- a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart +++ b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/text_field.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/text_field.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart b/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart index 94657c1bf..c65aa341b 100644 --- a/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart @@ -1,8 +1,8 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/mixins/validators_mixin.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/organization_settings/organization_icon.dart b/lib/ui/view/organization/organization_settings/organization_icon.dart index eea8d525a..8b21c06d4 100644 --- a/lib/ui/view/organization/organization_settings/organization_icon.dart +++ b/lib/ui/view/organization/organization_settings/organization_icon.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/long_button.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; -import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view_model.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/organization_model.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/long_button.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:hng/ui/view/organization/organization_settings/organization_settings_view_model.dart'; class OrganizationLogo extends StatelessWidget { final OrganizationModel org; diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart index 2f2cb1502..d60be1921 100644 --- a/lib/ui/view/organization/organization_settings/organization_name_url.dart +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -1,14 +1,14 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:stacked/stacked.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/text_field.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; -import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view_model.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/organization_model.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/text_field.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:hng/ui/view/organization/organization_settings/organization_settings_view_model.dart'; class OrganizationNameUrl extends HookWidget { final OrganizationModel org; diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart index f6f7334f8..99dda331a 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/organization_model.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'organization_settings_view_model.dart'; diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart index 949246256..79bb3c626 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart @@ -2,15 +2,15 @@ import 'dart:io'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/media_service.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/utilities/enums.dart'; -import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/models/organization_model.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/media_service.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/utilities/enums.dart'; +import 'package:hng/utilities/mixins/validators_mixin.dart'; import '../../../../app/app.logger.dart'; class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { diff --git a/lib/ui/view/organization/organization_url/organization_url_view.dart b/lib/ui/view/organization/organization_url/organization_url_view.dart index 1d7fde11e..ae69b8044 100644 --- a/lib/ui/view/organization/organization_url/organization_url_view.dart +++ b/lib/ui/view/organization/organization_url/organization_url_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import '../../../shared/shared.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/organization/organization_view/organization_view.dart b/lib/ui/view/organization/organization_view/organization_view.dart index cfb3cad28..c2518e75b 100644 --- a/lib/ui/view/organization/organization_view/organization_view.dart +++ b/lib/ui/view/organization/organization_view/organization_view.dart @@ -1,8 +1,8 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/models/organization_model.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import '../../../../models/organization_model.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/organization/organization_view/organization_viewmodel.dart b/lib/ui/view/organization/organization_view/organization_viewmodel.dart index 59f62fcfc..602131a34 100644 --- a/lib/ui/view/organization/organization_view/organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_view/organization_viewmodel.dart @@ -1,10 +1,10 @@ import 'dart:convert'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/utilities/constants.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/select_email/select_email_view.dart b/lib/ui/view/organization/select_email/select_email_view.dart index 9f149bc24..95421e507 100644 --- a/lib/ui/view/organization/select_email/select_email_view.dart +++ b/lib/ui/view/organization/select_email/select_email_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../../utilities/enums.dart'; diff --git a/lib/ui/view/organization/select_email/select_email_viewmodel.dart b/lib/ui/view/organization/select_email/select_email_viewmodel.dart index e49e91430..b0f193bd1 100644 --- a/lib/ui/view/organization/select_email/select_email_viewmodel.dart +++ b/lib/ui/view/organization/select_email/select_email_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/otp/otp_view.dart b/lib/ui/view/otp/otp_view.dart index bc4304a0d..30d62ff76 100644 --- a/lib/ui/view/otp/otp_view.dart +++ b/lib/ui/view/otp/otp_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/otp/otp_viewmodel.dart b/lib/ui/view/otp/otp_viewmodel.dart index b1448298f..ef8c3808a 100644 --- a/lib/ui/view/otp/otp_viewmodel.dart +++ b/lib/ui/view/otp/otp_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/password_recovery/new_password.dart b/lib/ui/view/password_recovery/new_password.dart index 9fafdab81..7febd3c53 100644 --- a/lib/ui/view/password_recovery/new_password.dart +++ b/lib/ui/view/password_recovery/new_password.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/general_widgets/custom_textfield.dart'; -import 'package:zurichat/ui/view/password_recovery/recovery_viewmodel.dart'; +import 'package:hng/general_widgets/custom_textfield.dart'; +import 'package:hng/ui/view/password_recovery/recovery_viewmodel.dart'; import 'package:stacked/stacked.dart'; class NewPassView extends StatelessWidget { diff --git a/lib/ui/view/password_recovery/recovery_view.dart b/lib/ui/view/password_recovery/recovery_view.dart index 47bd3d341..3392d6deb 100644 --- a/lib/ui/view/password_recovery/recovery_view.dart +++ b/lib/ui/view/password_recovery/recovery_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; -import 'package:zurichat/general_widgets/custom_textfield.dart'; -import 'package:zurichat/ui/view/password_recovery/recovery_viewmodel.dart'; +import 'package:hng/general_widgets/custom_textfield.dart'; +import 'package:hng/ui/view/password_recovery/recovery_viewmodel.dart'; class ForgotPassView extends StatelessWidget { const ForgotPassView({Key? key}) : super(key: key); diff --git a/lib/ui/view/password_recovery/recovery_viewmodel.dart b/lib/ui/view/password_recovery/recovery_viewmodel.dart index ac446f54e..642aba1e3 100644 --- a/lib/ui/view/password_recovery/recovery_viewmodel.dart +++ b/lib/ui/view/password_recovery/recovery_viewmodel.dart @@ -1,4 +1,4 @@ -// import 'package:zurichat/app/app.router.dart'; +// import 'package:hng/app/app.router.dart'; import 'package:stacked/stacked.dart'; // import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/popup_notification/popup_notification.dart b/lib/ui/view/popup_notification/popup_notification.dart index 9aa08dac7..1112dcdeb 100644 --- a/lib/ui/view/popup_notification/popup_notification.dart +++ b/lib/ui/view/popup_notification/popup_notification.dart @@ -1,8 +1,8 @@ // import 'dart:ui'; import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/view/popup_notification/popup_notification_viewmodel.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/view/popup_notification/popup_notification_viewmodel.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/preference/preference_view.dart b/lib/ui/view/preference/preference_view.dart index b0ffee54d..9fa937af0 100644 --- a/lib/ui/view/preference/preference_view.dart +++ b/lib/ui/view/preference/preference_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/view/preference/preference_viewmodel.dart b/lib/ui/view/preference/preference_viewmodel.dart index b86448e52..cc8ced05a 100644 --- a/lib/ui/view/preference/preference_viewmodel.dart +++ b/lib/ui/view/preference/preference_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import 'package:stacked_themes/stacked_themes.dart'; diff --git a/lib/ui/view/profile_page/profile_page_viewmodel.dart b/lib/ui/view/profile_page/profile_page_viewmodel.dart index e45266868..c3365f83c 100644 --- a/lib/ui/view/profile_page/profile_page_viewmodel.dart +++ b/lib/ui/view/profile_page/profile_page_viewmodel.dart @@ -3,7 +3,7 @@ this is the view model i created to run my test, the dev in charge can delete if he sees fit */ -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; // import 'package:image_gallery_saver/image_gallery_saver.dart'; // import 'package:permission_handler/permission_handler.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/saved_items/saved_items_view.dart b/lib/ui/view/saved_items/saved_items_view.dart index d4bd5be3a..2fe91cd30 100644 --- a/lib/ui/view/saved_items/saved_items_view.dart +++ b/lib/ui/view/saved_items/saved_items_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/colors.dart'; -import 'package:zurichat/ui/shared/styles.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/colors.dart'; +import 'package:hng/ui/shared/styles.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'saved_items_viewmodel.dart'; import 'widgets/saved_item_background.dart'; diff --git a/lib/ui/view/saved_items/saved_items_viewmodel.dart b/lib/ui/view/saved_items/saved_items_viewmodel.dart index 4ba85708c..1c635ee7d 100644 --- a/lib/ui/view/saved_items/saved_items_viewmodel.dart +++ b/lib/ui/view/saved_items/saved_items_viewmodel.dart @@ -1,13 +1,13 @@ import 'dart:convert'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/models/saved_item_model.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/models/saved_item_model.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; class SavedItemsViewModel extends BaseViewModel { final _navigationService = locator(); diff --git a/lib/ui/view/saved_items/widgets/saved_item_background.dart b/lib/ui/view/saved_items/widgets/saved_item_background.dart index f4e268839..dac5f1cc4 100644 --- a/lib/ui/view/saved_items/widgets/saved_item_background.dart +++ b/lib/ui/view/saved_items/widgets/saved_item_background.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/general_widgets/custom_text.dart'; -import 'package:zurichat/ui/shared/colors.dart'; +import 'package:hng/general_widgets/custom_text.dart'; +import 'package:hng/ui/shared/colors.dart'; class SavedItemBackground extends StatelessWidget { const SavedItemBackground({ diff --git a/lib/ui/view/set_status/set_status_view.dart b/lib/ui/view/set_status/set_status_view.dart index ebb56ba1a..25c5f9a9e 100644 --- a/lib/ui/view/set_status/set_status_view.dart +++ b/lib/ui/view/set_status/set_status_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/sign_up/sign_up_view.dart b/lib/ui/view/sign_up/sign_up_view.dart index 10d5881a5..3512cc77d 100644 --- a/lib/ui/view/sign_up/sign_up_view.dart +++ b/lib/ui/view/sign_up/sign_up_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/sign_up/sign_up_viewmodel.dart b/lib/ui/view/sign_up/sign_up_viewmodel.dart index 951d01a4d..8b4cf1ef4 100644 --- a/lib/ui/view/sign_up/sign_up_viewmodel.dart +++ b/lib/ui/view/sign_up/sign_up_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/utilities/constants.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../app/app.locator.dart'; diff --git a/lib/ui/view/splashscreen/splashscreen.dart b/lib/ui/view/splashscreen/splashscreen.dart index 809e97955..c44ee663f 100644 --- a/lib/ui/view/splashscreen/splashscreen.dart +++ b/lib/ui/view/splashscreen/splashscreen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'splashscreen_viewmodel.dart'; diff --git a/lib/ui/view/splashscreen/splashscreen_viewmodel.dart b/lib/ui/view/splashscreen/splashscreen_viewmodel.dart index f9556cecd..2fc4dfd39 100644 --- a/lib/ui/view/splashscreen/splashscreen_viewmodel.dart +++ b/lib/ui/view/splashscreen/splashscreen_viewmodel.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/start_dm/start_dm_view.dart b/lib/ui/view/start_dm/start_dm_view.dart index d0a09a2cf..20a20831e 100644 --- a/lib/ui/view/start_dm/start_dm_view.dart +++ b/lib/ui/view/start_dm/start_dm_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_chips_input/flutter_chips_input.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/start_dm/start_dm_viewmodel.dart b/lib/ui/view/start_dm/start_dm_viewmodel.dart index 632b9900b..16cb9ff9e 100644 --- a/lib/ui/view/start_dm/start_dm_viewmodel.dart +++ b/lib/ui/view/start_dm/start_dm_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/utilities/constants.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/start_dm/widgets/custom_chip_input.dart b/lib/ui/view/start_dm/widgets/custom_chip_input.dart index 08fd55f9e..36dcb8e31 100644 --- a/lib/ui/view/start_dm/widgets/custom_chip_input.dart +++ b/lib/ui/view/start_dm/widgets/custom_chip_input.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_chips_input/flutter_chips_input.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import '../../../../models/start_dm_models.dart'; import '../../../../utilities/utilities.dart'; diff --git a/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart b/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart index 11d9bf828..06271f8be 100644 --- a/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart +++ b/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/app/app.locator.dart'; +import 'package:hng/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/threads/all_threads/threads_view.dart b/lib/ui/view/threads/all_threads/threads_view.dart index 32a064686..442bf72e0 100644 --- a/lib/ui/view/threads/all_threads/threads_view.dart +++ b/lib/ui/view/threads/all_threads/threads_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/threads/all_threads/widgets/thread_card.dart b/lib/ui/view/threads/all_threads/widgets/thread_card.dart index 4c05e0c58..7a1153a61 100644 --- a/lib/ui/view/threads/all_threads/widgets/thread_card.dart +++ b/lib/ui/view/threads/all_threads/widgets/thread_card.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; //The screen shown in homepage -> Threads diff --git a/lib/ui/view/threads/test_data.dart b/lib/ui/view/threads/test_data.dart index cfcda3c18..498a2b1f9 100644 --- a/lib/ui/view/threads/test_data.dart +++ b/lib/ui/view/threads/test_data.dart @@ -1,5 +1,5 @@ -import 'package:zurichat/models/user_post.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/models/user_post.dart'; +import 'package:hng/utilities/enums.dart'; List thread1 = [ UserThreadPost( diff --git a/lib/ui/view/threads/thread_detail/thread_detail_view.dart b/lib/ui/view/threads/thread_detail/thread_detail_view.dart index ba979f1b5..dc23dbb6a 100644 --- a/lib/ui/view/threads/thread_detail/thread_detail_view.dart +++ b/lib/ui/view/threads/thread_detail/thread_detail_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; @@ -14,7 +14,7 @@ import '../../../shared/smart_widgets/thread_card/thread_card_view.dart'; import '../../../shared/styles.dart'; import '../../dm_user/icons/zap_icon.dart'; import 'thread_detail_viewmodel.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; import 'thread_detail_view.form.dart'; @FormView(fields: [FormTextField(name: 'message')]) diff --git a/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart b/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart index 0ce273a7c..55f0ac410 100644 --- a/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart +++ b/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart @@ -1,15 +1,15 @@ import 'dart:convert'; -import 'package:zurichat/constants/app_strings.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/utilities/constants.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/constants/app_strings.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/utilities/constants.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:intl/intl.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; import '../../../../app/app.locator.dart'; import '../../../../models/user_post.dart'; import '../../../../package/base/server-request/api/zuri_api.dart'; diff --git a/lib/ui/view/user_search/user_search.dart b/lib/ui/view/user_search/user_search.dart index 8addcd8fc..a2339829b 100644 --- a/lib/ui/view/user_search/user_search.dart +++ b/lib/ui/view/user_search/user_search.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../utilities/constants.dart'; diff --git a/lib/ui/view/user_search/user_search_not_found.dart b/lib/ui/view/user_search/user_search_not_found.dart index ad0254e68..c8a476723 100644 --- a/lib/ui/view/user_search/user_search_not_found.dart +++ b/lib/ui/view/user_search/user_search_not_found.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:zurichat/constants/app_strings.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import '../../shared/colors.dart'; diff --git a/lib/ui/view/user_search/user_search_view.dart b/lib/ui/view/user_search/user_search_view.dart index 87b3dfc02..4b9688396 100644 --- a/lib/ui/view/user_search/user_search_view.dart +++ b/lib/ui/view/user_search/user_search_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../nav_pages/home_page/widgets/custom_channel_list_tile.dart'; diff --git a/lib/ui/view/user_search/user_search_viewmodel.dart b/lib/ui/view/user_search/user_search_viewmodel.dart index c888bc59d..4e93517c8 100644 --- a/lib/ui/view/user_search/user_search_viewmodel.dart +++ b/lib/ui/view/user_search/user_search_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/user_search/widget/custom_dm_list_tile.dart b/lib/ui/view/user_search/widget/custom_dm_list_tile.dart index b79820afd..12ab4f99b 100644 --- a/lib/ui/view/user_search/widget/custom_dm_list_tile.dart +++ b/lib/ui/view/user_search/widget/custom_dm_list_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/view/user_search/user_search_viewmodel.dart'; +import 'package:hng/ui/view/user_search/user_search_viewmodel.dart'; import 'package:stacked/stacked.dart'; class CustomDMListTile extends ViewModelWidget { diff --git a/lib/ui/view/webview_page/web_view_model.dart b/lib/ui/view/webview_page/web_view_model.dart index a853a708e..217e8b574 100644 --- a/lib/ui/view/webview_page/web_view_model.dart +++ b/lib/ui/view/webview_page/web_view_model.dart @@ -1,4 +1,4 @@ -import 'package:zurichat/app/app.locator.dart'; +import 'package:hng/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/webview_page/webview_page.dart b/lib/ui/view/webview_page/webview_page.dart index c98af6877..d20928e4c 100644 --- a/lib/ui/view/webview_page/webview_page.dart +++ b/lib/ui/view/webview_page/webview_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:zurichat/ui/shared/shared.dart'; -import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:hng/ui/shared/shared.dart'; +import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:hng/ui/shared/zuri_loader.dart'; import 'package:webview_flutter/webview_flutter.dart'; import 'package:stacked/stacked.dart'; import 'web_view_model.dart'; diff --git a/lib/utilities/internalization/localization/app_localization.dart b/lib/utilities/internalization/localization/app_localization.dart index 69a15dc6c..3284c9860 100644 --- a/lib/utilities/internalization/localization/app_localization.dart +++ b/lib/utilities/internalization/localization/app_localization.dart @@ -3,8 +3,8 @@ import 'dart:convert'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:zurichat/constants/local_keys.dart'; -import 'package:zurichat/utilities/internalization/local_setup.dart'; +import 'package:hng/constants/local_keys.dart'; +import 'package:hng/utilities/internalization/local_setup.dart'; class AppLocalization { ///TODO: Remove late diff --git a/lib/utilities/utilities.dart b/lib/utilities/utilities.dart index d8c107f03..1396b76cc 100644 --- a/lib/utilities/utilities.dart +++ b/lib/utilities/utilities.dart @@ -1,6 +1,6 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/widgets.dart'; -import 'package:zurichat/app/app.logger.dart'; +import 'package:hng/app/app.logger.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index a4a7522ec..08f9b7e3e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: zurichat +name: hng description: A new Flutter project. publish_to: "none" version: 1.0.0+1 diff --git a/test/helpers/test_helpers.dart b/test/helpers/test_helpers.dart index a1d9ca9be..ef4a42dd3 100644 --- a/test/helpers/test_helpers.dart +++ b/test/helpers/test_helpers.dart @@ -1,18 +1,18 @@ -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/models/channels_search_model.dart'; -import 'package:zurichat/models/user_search_model.dart'; -import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart'; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; -import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; -import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart'; -import 'package:zurichat/services/centrifuge_service.dart'; -import 'package:zurichat/services/connectivity_service.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/services/media_service.dart'; -import 'package:zurichat/services/user_service.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/models/channels_search_model.dart'; +import 'package:hng/models/user_search_model.dart'; +import 'package:hng/package/base/jump_to_request/jump_to_api.dart'; +import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; +import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart'; +import 'package:hng/services/centrifuge_service.dart'; +import 'package:hng/services/connectivity_service.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/services/media_service.dart'; +import 'package:hng/services/user_service.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -191,7 +191,8 @@ MockMediaService getAndRegisterMediaServiceMock() { final service = MockMediaService(); Future response = Future.value("Image Address"); - when(service.uploadImage(fileMock, orgId_string)).thenAnswer((_) async => response); + when(service.uploadImage(fileMock, orgId_string)) + .thenAnswer((_) async => response); locator.registerSingleton(service); return service; @@ -239,4 +240,3 @@ void _removeRegistrationIfExists() { locator.unregister(); } } - diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index f67b03d73..d715b85ac 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -1,42 +1,42 @@ // Mocks generated by Mockito 5.0.15 from annotations -// in zurichat/test/helpers/test_helpers.dart. +// in hng/test/helpers/test_helpers.dart. // Do not manually edit this file. import 'dart:async' as _i2; -import 'dart:io' as _i25; -import 'dart:ui' as _i14; +import 'dart:io' as _i24; +import 'dart:ui' as _i15; -import 'package:centrifuge/centrifuge.dart' as _i21; +import 'package:centrifuge/centrifuge.dart' as _i22; import 'package:dio/dio.dart' as _i3; -import 'package:flutter/material.dart' as _i11; -import 'package:mockito/mockito.dart' as _i1; -import 'package:stacked_services/stacked_services.dart' as _i10; -import 'package:stacked_themes/src/theme_manager.dart' as _i13; -import 'package:stacked_themes/src/theme_service.dart' as _i12; -import 'package:zurichat/models/api_response.dart' as _i23; -import 'package:zurichat/models/channel_members.dart' as _i19; -import 'package:zurichat/models/channel_model.dart' as _i18; -import 'package:zurichat/models/channels_search_model.dart' as _i29; -import 'package:zurichat/models/organization_member_model.dart' as _i6; -import 'package:zurichat/models/organization_model.dart' as _i5; -import 'package:zurichat/models/pinned_message_model.dart' as _i17; -import 'package:zurichat/models/user_model.dart' as _i8; -import 'package:zurichat/models/user_search_model.dart' as _i24; -import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart' as _i28; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart' as _i22; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart' +import 'package:flutter/material.dart' as _i12; +import 'package:hng/models/api_response.dart' as _i23; +import 'package:hng/models/channel_members.dart' as _i20; +import 'package:hng/models/channel_model.dart' as _i19; +import 'package:hng/models/channels_search_model.dart' as _i29; +import 'package:hng/models/organization_member_model.dart' as _i7; +import 'package:hng/models/organization_model.dart' as _i6; +import 'package:hng/models/pinned_message_model.dart' as _i18; +import 'package:hng/models/user_model.dart' as _i9; +import 'package:hng/models/user_search_model.dart' as _i25; +import 'package:hng/package/base/jump_to_request/jump_to_api.dart' as _i28; +import 'package:hng/package/base/server-request/api/zuri_api.dart' as _i5; +import 'package:hng/package/base/server-request/channels/channels_api_service.dart' + as _i17; +import 'package:hng/package/base/server-request/dms/dms_api_service.dart' as _i16; -import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart' - as _i15; -import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart' +import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart' as _i31; -import 'package:zurichat/services/centrifuge_service.dart' as _i20; -import 'package:zurichat/services/connectivity_service.dart' as _i26; -import 'package:zurichat/services/local_storage_services.dart' as _i9; -import 'package:zurichat/services/media_service.dart' as _i30; -import 'package:zurichat/services/user_service.dart' as _i7; -import 'package:zurichat/utilities/enums.dart' as _i27; -import 'package:zurichat/utilities/failures.dart' as _i4; +import 'package:hng/services/centrifuge_service.dart' as _i21; +import 'package:hng/services/connectivity_service.dart' as _i26; +import 'package:hng/services/local_storage_services.dart' as _i10; +import 'package:hng/services/media_service.dart' as _i30; +import 'package:hng/services/user_service.dart' as _i8; +import 'package:hng/utilities/enums.dart' as _i27; +import 'package:hng/utilities/failures.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:stacked_services/stacked_services.dart' as _i11; +import 'package:stacked_themes/src/theme_manager.dart' as _i14; +import 'package:stacked_themes/src/theme_service.dart' as _i13; // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters @@ -56,18 +56,20 @@ class _FakeDio_2 extends _i1.Fake implements _i3.Dio {} class _FakeFailure_3 extends _i1.Fake implements _i4.Failure {} -class _FakeOrganizationModel_4 extends _i1.Fake - implements _i5.OrganizationModel {} +class _FakeZuriApi_4 extends _i1.Fake implements _i5.ZuriApi {} + +class _FakeOrganizationModel_5 extends _i1.Fake + implements _i6.OrganizationModel {} -class _FakeOrganizationMemberModelList_5 extends _i1.Fake - implements _i6.OrganizationMemberModelList {} +class _FakeOrganizationMemberModelList_6 extends _i1.Fake + implements _i7.OrganizationMemberModelList {} /// A class which mocks [UserService]. /// /// See the documentation for Mockito's code generation for more information. -class MockUserService extends _i1.Mock implements _i7.UserService { +class MockUserService extends _i1.Mock implements _i8.UserService { @override - set organizationModel(_i5.OrganizationModel? _organizationModel) => super + set organizationModel(_i6.OrganizationModel? _organizationModel) => super .noSuchMethod(Invocation.setter(#organizationModel, _organizationModel), returnValueForMissingStub: null); @override @@ -79,6 +81,10 @@ class MockUserService extends _i1.Mock implements _i7.UserService { (super.noSuchMethod(Invocation.getter(#currentOrgName), returnValue: '') as String); @override + String get currentOrgLogo => + (super.noSuchMethod(Invocation.getter(#currentOrgLogo), returnValue: '') + as String); + @override String get currentOrgUrl => (super.noSuchMethod(Invocation.getter(#currentOrgUrl), returnValue: '') as String); @@ -99,7 +105,7 @@ class MockUserService extends _i1.Mock implements _i7.UserService { (super.noSuchMethod(Invocation.getter(#userEmail), returnValue: '') as String); @override - void setUserDetails(_i8.UserModel? user) => + void setUserDetails(_i9.UserModel? user) => super.noSuchMethod(Invocation.method(#setUserDetails, [user]), returnValueForMissingStub: null); @override @@ -125,7 +131,7 @@ class MockUserService extends _i1.Mock implements _i7.UserService { /// /// See the documentation for Mockito's code generation for more information. class MockSharedPreferenceLocalStorage extends _i1.Mock - implements _i9.SharedPreferenceLocalStorage { + implements _i10.SharedPreferenceLocalStorage { @override _i2.Future setBool(String? key, bool? value) => (super.noSuchMethod(Invocation.method(#setBool, [key, value]), @@ -177,7 +183,7 @@ class MockSharedPreferenceLocalStorage extends _i1.Mock /// A class which mocks [NavigationService]. /// /// See the documentation for Mockito's code generation for more information. -class MockNavigationService extends _i1.Mock implements _i10.NavigationService { +class MockNavigationService extends _i1.Mock implements _i11.NavigationService { @override String get previousRoute => (super.noSuchMethod(Invocation.getter(#previousRoute), returnValue: '') @@ -187,9 +193,9 @@ class MockNavigationService extends _i1.Mock implements _i10.NavigationService { (super.noSuchMethod(Invocation.getter(#currentRoute), returnValue: '') as String); @override - _i11.GlobalKey<_i11.NavigatorState>? nestedNavigationKey(int? index) => + _i12.GlobalKey<_i12.NavigatorState>? nestedNavigationKey(int? index) => (super.noSuchMethod(Invocation.method(#nestedNavigationKey, [index])) - as _i11.GlobalKey<_i11.NavigatorState>?); + as _i12.GlobalKey<_i12.NavigatorState>?); @override void config( {bool? enableLog, @@ -209,17 +215,17 @@ class MockNavigationService extends _i1.Mock implements _i10.NavigationService { }), returnValueForMissingStub: null); @override - _i2.Future? navigateWithTransition(_i11.Widget? page, + _i2.Future? navigateWithTransition(_i12.Widget? page, {bool? opaque, String? transition = r'', Duration? duration, bool? popGesture, int? id, - _i11.Curve? curve, - _i10.Bindings? binding, + _i12.Curve? curve, + _i11.Bindings? binding, bool? fullscreenDialog = false, bool? preventDuplicates = true, - _i10.Transition? transitionClass}) => + _i11.Transition? transitionClass}) => (super.noSuchMethod(Invocation.method(#navigateWithTransition, [ page ], { @@ -235,17 +241,17 @@ class MockNavigationService extends _i1.Mock implements _i10.NavigationService { #transitionClass: transitionClass })) as _i2.Future?); @override - _i2.Future? replaceWithTransition(_i11.Widget? page, + _i2.Future? replaceWithTransition(_i12.Widget? page, {bool? opaque, String? transition = r'', Duration? duration, bool? popGesture, int? id, - _i11.Curve? curve, - _i10.Bindings? binding, + _i12.Curve? curve, + _i11.Bindings? binding, bool? fullscreenDialog = false, bool? preventDuplicates = true, - _i10.Transition? transitionClass}) => + _i11.Transition? transitionClass}) => (super.noSuchMethod(Invocation.method(#replaceWithTransition, [ page ], { @@ -265,7 +271,7 @@ class MockNavigationService extends _i1.Mock implements _i10.NavigationService { Invocation.method(#back, [], {#result: result, #id: id}), returnValue: false) as bool); @override - void popUntil(_i11.RoutePredicate? predicate) => + void popUntil(_i12.RoutePredicate? predicate) => super.noSuchMethod(Invocation.method(#popUntil, [predicate]), returnValueForMissingStub: null); @override @@ -287,17 +293,17 @@ class MockNavigationService extends _i1.Mock implements _i10.NavigationService { #parameters: parameters })) as _i2.Future?); @override - _i2.Future? navigateToView(_i11.Widget? view, + _i2.Future? navigateToView(_i12.Widget? view, {dynamic arguments, int? id, bool? opaque, - _i11.Curve? curve, - _i10.Bindings? binding, + _i12.Curve? curve, + _i11.Bindings? binding, Duration? duration, bool? fullscreenDialog = false, bool? popGesture, bool? preventDuplicates = true, - _i10.Transition? transition}) => + _i11.Transition? transition}) => (super.noSuchMethod(Invocation.method(#navigateToView, [ view ], { @@ -351,13 +357,13 @@ class MockNavigationService extends _i1.Mock implements _i10.NavigationService { #parameters: parameters })) as _i2.Future?); @override - _i2.Future? clearTillFirstAndShowView(_i11.Widget? view, + _i2.Future? clearTillFirstAndShowView(_i12.Widget? view, {dynamic arguments, int? id}) => (super.noSuchMethod(Invocation.method(#clearTillFirstAndShowView, [view], {#arguments: arguments, #id: id})) as _i2.Future?); @override _i2.Future? pushNamedAndRemoveUntil(String? routeName, - {_i11.RoutePredicate? predicate, dynamic arguments, int? id}) => + {_i12.RoutePredicate? predicate, dynamic arguments, int? id}) => (super.noSuchMethod(Invocation.method(#pushNamedAndRemoveUntil, [ routeName ], { @@ -372,14 +378,14 @@ class MockNavigationService extends _i1.Mock implements _i10.NavigationService { /// A class which mocks [SnackbarService]. /// /// See the documentation for Mockito's code generation for more information. -class MockSnackbarService extends _i1.Mock implements _i10.SnackbarService { +class MockSnackbarService extends _i1.Mock implements _i11.SnackbarService { @override - void registerSnackbarConfig(_i10.SnackbarConfig? config) => + void registerSnackbarConfig(_i11.SnackbarConfig? config) => super.noSuchMethod(Invocation.method(#registerSnackbarConfig, [config]), returnValueForMissingStub: null); @override void registerCustomSnackbarconfig( - {dynamic customData, _i10.SnackbarConfig? config}) => + {dynamic customData, _i11.SnackbarConfig? config}) => super.noSuchMethod( Invocation.method(#registerCustomSnackbarconfig, [], {#customData: customData, #config: config}), @@ -387,7 +393,7 @@ class MockSnackbarService extends _i1.Mock implements _i10.SnackbarService { @override void registerCustomMainButtonBuilder( {dynamic variant, - _i11.Widget Function(String?, Function?)? builder}) => + _i12.Widget Function(String?, Function?)? builder}) => super.noSuchMethod( Invocation.method(#registerCustomMainButtonBuilder, [], {#variant: variant, #builder: builder}), @@ -395,8 +401,8 @@ class MockSnackbarService extends _i1.Mock implements _i10.SnackbarService { @override void registerCustomSnackbarConfig( {dynamic variant, - _i10.SnackbarConfig? config, - _i10.SnackbarConfig Function()? configBuilder}) => + _i11.SnackbarConfig? config, + _i11.SnackbarConfig Function()? configBuilder}) => super.noSuchMethod( Invocation.method(#registerCustomSnackbarConfig, [], { #variant: variant, @@ -449,7 +455,7 @@ class MockSnackbarService extends _i1.Mock implements _i10.SnackbarService { /// A class which mocks [ThemeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockThemeService extends _i1.Mock implements _i12.ThemeService { +class MockThemeService extends _i1.Mock implements _i13.ThemeService { @override int get themeCount => (super.noSuchMethod(Invocation.getter(#themeCount), returnValue: 0) @@ -459,11 +465,11 @@ class MockThemeService extends _i1.Mock implements _i12.ThemeService { (super.noSuchMethod(Invocation.getter(#isDarkMode), returnValue: false) as bool); @override - _i12.ThemeManagerMode get selectedThemeMode => + _i13.ThemeManagerMode get selectedThemeMode => (super.noSuchMethod(Invocation.getter(#selectedThemeMode), - returnValue: _i12.ThemeManagerMode.light) as _i12.ThemeManagerMode); + returnValue: _i13.ThemeManagerMode.light) as _i13.ThemeManagerMode); @override - void setThemeManager(_i13.ThemeManager? manager) => + void setThemeManager(_i14.ThemeManager? manager) => super.noSuchMethod(Invocation.method(#setThemeManager, [manager]), returnValueForMissingStub: null); @override @@ -475,7 +481,7 @@ class MockThemeService extends _i1.Mock implements _i12.ThemeService { super.noSuchMethod(Invocation.method(#toggleDarkLightTheme, []), returnValueForMissingStub: null); @override - void setThemeMode(_i12.ThemeManagerMode? themeManagerMode) => + void setThemeMode(_i13.ThemeManagerMode? themeManagerMode) => super.noSuchMethod(Invocation.method(#setThemeMode, [themeManagerMode]), returnValueForMissingStub: null); @override @@ -485,33 +491,33 @@ class MockThemeService extends _i1.Mock implements _i12.ThemeService { /// A class which mocks [DialogService]. /// /// See the documentation for Mockito's code generation for more information. -class MockDialogService extends _i1.Mock implements _i10.DialogService { +class MockDialogService extends _i1.Mock implements _i11.DialogService { @override void registerCustomDialogBuilders( - Map? builders) => + Map? builders) => super.noSuchMethod( Invocation.method(#registerCustomDialogBuilders, [builders]), returnValueForMissingStub: null); @override void registerCustomDialogBuilder( {dynamic variant, - _i11.Widget Function(_i11.BuildContext, _i10.DialogRequest, - dynamic Function(_i10.DialogResponse))? + _i12.Widget Function(_i12.BuildContext, _i11.DialogRequest, + dynamic Function(_i11.DialogResponse))? builder}) => super.noSuchMethod( Invocation.method(#registerCustomDialogBuilder, [], {#variant: variant, #builder: builder}), returnValueForMissingStub: null); @override - _i2.Future<_i10.DialogResponse?> showDialog( + _i2.Future<_i11.DialogResponse?> showDialog( {String? title, String? description, String? cancelTitle, - _i14.Color? cancelTitleColor, + _i15.Color? cancelTitleColor, String? buttonTitle = r'Ok', - _i14.Color? buttonTitleColor, + _i15.Color? buttonTitleColor, bool? barrierDismissible = false, - _i10.DialogPlatform? dialogPlatform}) => + _i11.DialogPlatform? dialogPlatform}) => (super.noSuchMethod( Invocation.method(#showDialog, [], { #title: title, @@ -523,10 +529,10 @@ class MockDialogService extends _i1.Mock implements _i10.DialogService { #barrierDismissible: barrierDismissible, #dialogPlatform: dialogPlatform }), - returnValue: Future<_i10.DialogResponse?>.value()) - as _i2.Future<_i10.DialogResponse?>); + returnValue: Future<_i11.DialogResponse?>.value()) + as _i2.Future<_i11.DialogResponse?>); @override - _i2.Future<_i10.DialogResponse?> showCustomDialog( + _i2.Future<_i11.DialogResponse?> showCustomDialog( {dynamic variant, String? title, String? description, @@ -539,7 +545,7 @@ class MockDialogService extends _i1.Mock implements _i10.DialogService { bool? showIconInAdditionalButton = false, String? additionalButtonTitle, bool? takesInput = false, - _i14.Color? barrierColor = const _i14.Color(2315255808), + _i15.Color? barrierColor = const _i15.Color(2315255808), bool? barrierDismissible = false, String? barrierLabel = r'', dynamic customData, @@ -564,16 +570,16 @@ class MockDialogService extends _i1.Mock implements _i10.DialogService { #customData: customData, #data: data }), - returnValue: Future<_i10.DialogResponse?>.value()) - as _i2.Future<_i10.DialogResponse?>); + returnValue: Future<_i11.DialogResponse?>.value()) + as _i2.Future<_i11.DialogResponse?>); @override - _i2.Future<_i10.DialogResponse?> showConfirmationDialog( + _i2.Future<_i11.DialogResponse?> showConfirmationDialog( {String? title, String? description, String? cancelTitle = r'Cancel', String? confirmationTitle = r'Ok', bool? barrierDismissible = false, - _i10.DialogPlatform? dialogPlatform}) => + _i11.DialogPlatform? dialogPlatform}) => (super.noSuchMethod( Invocation.method(#showConfirmationDialog, [], { #title: title, @@ -583,10 +589,10 @@ class MockDialogService extends _i1.Mock implements _i10.DialogService { #barrierDismissible: barrierDismissible, #dialogPlatform: dialogPlatform }), - returnValue: Future<_i10.DialogResponse?>.value()) - as _i2.Future<_i10.DialogResponse?>); + returnValue: Future<_i11.DialogResponse?>.value()) + as _i2.Future<_i11.DialogResponse?>); @override - void completeDialog(_i10.DialogResponse? response) => + void completeDialog(_i11.DialogResponse? response) => super.noSuchMethod(Invocation.method(#completeDialog, [response]), returnValueForMissingStub: null); @override @@ -597,13 +603,13 @@ class MockDialogService extends _i1.Mock implements _i10.DialogService { /// /// See the documentation for Mockito's code generation for more information. class MockBottomSheetService extends _i1.Mock - implements _i10.BottomSheetService { + implements _i11.BottomSheetService { @override - void setCustomSheetBuilders(Map? builders) => + void setCustomSheetBuilders(Map? builders) => super.noSuchMethod(Invocation.method(#setCustomSheetBuilders, [builders]), returnValueForMissingStub: null); @override - _i2.Future<_i10.SheetResponse?> showBottomSheet( + _i2.Future<_i11.SheetResponse?> showBottomSheet( {String? title, String? description, String? confirmButtonTitle = r'Ok', @@ -627,10 +633,10 @@ class MockBottomSheetService extends _i1.Mock #enterBottomSheetDuration: enterBottomSheetDuration, #ignoreSafeArea: ignoreSafeArea }), - returnValue: Future<_i10.SheetResponse?>.value()) - as _i2.Future<_i10.SheetResponse?>); + returnValue: Future<_i11.SheetResponse?>.value()) + as _i2.Future<_i11.SheetResponse?>); @override - _i2.Future<_i10.SheetResponse?> showCustomSheet( + _i2.Future<_i11.SheetResponse?> showCustomSheet( {dynamic variant, String? title, String? description, @@ -643,7 +649,7 @@ class MockBottomSheetService extends _i1.Mock bool? showIconInAdditionalButton = false, String? additionalButtonTitle, bool? takesInput = false, - _i14.Color? barrierColor = const _i14.Color(2315255808), + _i15.Color? barrierColor = const _i15.Color(2315255808), bool? barrierDismissible = true, bool? isScrollControlled = false, String? barrierLabel = r'', @@ -678,10 +684,10 @@ class MockBottomSheetService extends _i1.Mock #enterBottomSheetDuration: enterBottomSheetDuration, #ignoreSafeArea: ignoreSafeArea }), - returnValue: Future<_i10.SheetResponse?>.value()) - as _i2.Future<_i10.SheetResponse?>); + returnValue: Future<_i11.SheetResponse?>.value()) + as _i2.Future<_i11.SheetResponse?>); @override - void completeSheet(_i10.SheetResponse? response) => + void completeSheet(_i11.SheetResponse? response) => super.noSuchMethod(Invocation.method(#completeSheet, [response]), returnValueForMissingStub: null); @override @@ -691,7 +697,7 @@ class MockBottomSheetService extends _i1.Mock /// A class which mocks [DMApiService]. /// /// See the documentation for Mockito's code generation for more information. -class MockDMApiService extends _i1.Mock implements _i15.DMApiService { +class MockDMApiService extends _i1.Mock implements _i16.DMApiService { @override _i2.Future getActiveDms() => (super.noSuchMethod(Invocation.method(#getActiveDms, []), @@ -708,7 +714,7 @@ class MockDMApiService extends _i1.Mock implements _i15.DMApiService { /// /// See the documentation for Mockito's code generation for more information. class MockChannelsApiService extends _i1.Mock - implements _i16.ChannelsApiService { + implements _i17.ChannelsApiService { @override _i2.StreamController get controller => (super.noSuchMethod(Invocation.getter(#controller), @@ -741,12 +747,12 @@ class MockChannelsApiService extends _i1.Mock returnValue: Future>.value([])) as _i2.Future>); @override - _i2.Future> getChannelPinnedMessages( + _i2.Future> getChannelPinnedMessages( String? channelId) => (super.noSuchMethod( Invocation.method(#getChannelPinnedMessages, [channelId]), - returnValue: Future>.value( - <_i17.PinnedMessage>[])) as _i2.Future>); + returnValue: Future>.value( + <_i18.PinnedMessage>[])) as _i2.Future>); @override _i2.Future changeChannelMessagePinnedState( String? channelId, String? messageId, String? userId, bool? pinned) => @@ -761,11 +767,11 @@ class MockChannelsApiService extends _i1.Mock Invocation.method(#sendChannelMessages, [channelId, userId, message]), returnValue: Future.value()) as _i2.Future); @override - _i2.Future> fetchChannel() => + _i2.Future> fetchChannel() => (super.noSuchMethod(Invocation.method(#fetchChannel, []), returnValue: - Future>.value(<_i18.ChannelModel>[])) - as _i2.Future>); + Future>.value(<_i19.ChannelModel>[])) + as _i2.Future>); @override _i2.Future createChannels( {String? name, @@ -787,10 +793,10 @@ class MockChannelsApiService extends _i1.Mock (super.noSuchMethod(Invocation.method(#deleteChannel, [orgId, channelId]), returnValue: Future.value(false)) as _i2.Future); @override - _i2.Future?> getChannelMembers(dynamic id) => + _i2.Future?> getChannelMembers(dynamic id) => (super.noSuchMethod(Invocation.method(#getChannelMembers, [id]), - returnValue: Future?>.value()) - as _i2.Future?>); + returnValue: Future?>.value()) + as _i2.Future?>); @override _i2.Future? dispose() => (super.noSuchMethod( Invocation.method(#dispose, []), @@ -802,7 +808,7 @@ class MockChannelsApiService extends _i1.Mock /// A class which mocks [CentrifugeService]. /// /// See the documentation for Mockito's code generation for more information. -class MockCentrifugeService extends _i1.Mock implements _i20.CentrifugeService { +class MockCentrifugeService extends _i1.Mock implements _i21.CentrifugeService { @override _i2.StreamController get messageStreamController => (super.noSuchMethod(Invocation.getter(#messageStreamController), @@ -815,12 +821,12 @@ class MockCentrifugeService extends _i1.Mock implements _i20.CentrifugeService { Invocation.setter(#messageStreamController, _messageStreamController), returnValueForMissingStub: null); @override - Map get subList => + Map get subList => (super.noSuchMethod(Invocation.getter(#subList), - returnValue: {}) - as Map); + returnValue: {}) + as Map); @override - set subList(Map? _subList) => + set subList(Map? _subList) => super.noSuchMethod(Invocation.setter(#subList, _subList), returnValueForMissingStub: null); @override @@ -884,7 +890,7 @@ class MockCentrifugeService extends _i1.Mock implements _i20.CentrifugeService { /// A class which mocks [ZuriApi]. /// /// See the documentation for Mockito's code generation for more information. -class MockZuriApi extends _i1.Mock implements _i22.ZuriApi { +class MockZuriApi extends _i1.Mock implements _i5.ZuriApi { @override _i3.Dio get dio => (super.noSuchMethod(Invocation.getter(#dio), returnValue: _FakeDio_2()) @@ -959,20 +965,20 @@ class MockZuriApi extends _i1.Mock implements _i22.ZuriApi { }), returnValue: Future.value()) as _i2.Future); @override - _i2.Future> fetchListOfOrganizations( + _i2.Future> fetchListOfOrganizations( dynamic token) => (super.noSuchMethod(Invocation.method(#fetchListOfOrganizations, [token]), - returnValue: Future>.value( - <_i5.OrganizationModel>[])) - as _i2.Future>); + returnValue: Future>.value( + <_i6.OrganizationModel>[])) + as _i2.Future>); @override - _i2.Future> getJoinedOrganizations( + _i2.Future> getJoinedOrganizations( dynamic token, String? email) => (super.noSuchMethod( Invocation.method(#getJoinedOrganizations, [token, email]), - returnValue: Future>.value( - <_i5.OrganizationModel>[])) - as _i2.Future>); + returnValue: Future>.value( + <_i6.OrganizationModel>[])) + as _i2.Future>); @override _i2.Future fetchOrganizationInfo(String? id, dynamic token) => (super .noSuchMethod(Invocation.method(#fetchOrganizationInfo, [id, token]), @@ -1004,9 +1010,9 @@ class MockZuriApi extends _i1.Mock implements _i22.ZuriApi { returnValue: Future.value()) as _i2.Future); @override _i2.Future updateOrgLogo( - String? orgId, String? url, dynamic token) => + String? orgId, _i24.File? image, dynamic token) => (super.noSuchMethod( - Invocation.method(#updateOrgLogo, [orgId, url, token]), + Invocation.method(#updateOrgLogo, [orgId, image, token]), returnValue: Future.value()) as _i2.Future); @override _i2.Future addMemberToChannel( @@ -1023,13 +1029,13 @@ class MockZuriApi extends _i1.Mock implements _i22.ZuriApi { Invocation.method(#addMemberToOrganization, [orgId, email, token]), returnValue: Future.value()) as _i2.Future); @override - _i2.Future> fetchMembersInOrganization( + _i2.Future> fetchMembersInOrganization( String? orgId, dynamic token) => (super.noSuchMethod( Invocation.method(#fetchMembersInOrganization, [orgId, token]), returnValue: - Future>.value(<_i24.UserSearch>[])) - as _i2.Future>); + Future>.value(<_i25.UserSearch>[])) + as _i2.Future>); @override _i2.Future getChannelSocketId( String? channelId, String? orgId, dynamic token) => @@ -1085,12 +1091,12 @@ class MockZuriApi extends _i1.Mock implements _i22.ZuriApi { [channelMessageId, content, files, orgId, userId, channelId]), returnValue: Future.value(false)) as _i2.Future); @override - _i2.Future> fetchChannel( + _i2.Future> fetchChannel( String? orgId, dynamic token) => (super.noSuchMethod(Invocation.method(#fetchChannel, [orgId, token]), returnValue: - Future>.value(<_i18.ChannelModel>[])) - as _i2.Future>); + Future>.value(<_i19.ChannelModel>[])) + as _i2.Future>); @override _i2.Future createChannels( {String? name, @@ -1123,9 +1129,9 @@ class MockZuriApi extends _i1.Mock implements _i22.ZuriApi { super.noSuchMethod(Invocation.method( #inviteToOrganizationWithNormalMail, [organizationId, body, token])); @override - List<_i11.ThemeData> getThemes() => + List<_i12.ThemeData> getThemes() => (super.noSuchMethod(Invocation.method(#getThemes, []), - returnValue: <_i11.ThemeData>[]) as List<_i11.ThemeData>); + returnValue: <_i12.ThemeData>[]) as List<_i12.ThemeData>); @override void sendGetRequest(dynamic endpoint) => super.noSuchMethod(Invocation.method(#sendGetRequest, [endpoint]), @@ -1164,7 +1170,7 @@ class MockZuriApi extends _i1.Mock implements _i22.ZuriApi { (super.noSuchMethod(Invocation.method(#handleApiError, [e]), returnValue: _FakeFailure_3()) as _i4.Failure); @override - _i2.Future uploadImage(_i25.File? image, + _i2.Future uploadImage(_i24.File? image, {String? token, String? pluginId}) => (super.noSuchMethod( Invocation.method( @@ -1281,15 +1287,15 @@ class MockJumpToApi extends _i1.Mock implements _i28.JumpToApi { <_i29.ChannelsSearch>[])) as _i2.Future>); @override - _i2.Future> fetchListOfMembers() => (super.noSuchMethod( + _i2.Future> fetchListOfMembers() => (super.noSuchMethod( Invocation.method(#fetchListOfMembers, []), - returnValue: Future>.value(<_i24.UserSearch>[])) - as _i2.Future>); + returnValue: Future>.value(<_i25.UserSearch>[])) + as _i2.Future>); @override - _i2.Future> fetchList() => + _i2.Future> fetchList() => (super.noSuchMethod(Invocation.method(#fetchList, []), - returnValue: Future>.value(<_i24.NewUser>[])) - as _i2.Future>); + returnValue: Future>.value(<_i25.NewUser>[])) + as _i2.Future>); @override String toString() => super.toString(); } @@ -1299,11 +1305,14 @@ class MockJumpToApi extends _i1.Mock implements _i28.JumpToApi { /// See the documentation for Mockito's code generation for more information. class MockMediaService extends _i1.Mock implements _i30.MediaService { @override - _i2.Future<_i25.File?> getImage({bool? fromGallery}) => (super.noSuchMethod( + _i5.ZuriApi get zuriApi => (super.noSuchMethod(Invocation.getter(#zuriApi), + returnValue: _FakeZuriApi_4()) as _i5.ZuriApi); + @override + _i2.Future<_i24.File?> getImage({bool? fromGallery}) => (super.noSuchMethod( Invocation.method(#getImage, [], {#fromGallery: fromGallery}), - returnValue: Future<_i25.File?>.value()) as _i2.Future<_i25.File?>); + returnValue: Future<_i24.File?>.value()) as _i2.Future<_i24.File?>); @override - _i2.Future uploadImage(_i25.File? file, String? pluginId) => + _i2.Future uploadImage(_i24.File? file, String? pluginId) => (super.noSuchMethod(Invocation.method(#uploadImage, [file, pluginId]), returnValue: Future.value()) as _i2.Future); @override @@ -1316,29 +1325,29 @@ class MockMediaService extends _i1.Mock implements _i30.MediaService { class MockOrganizationApiService extends _i1.Mock implements _i31.OrganizationApiService { @override - _i2.Future> fetchListOfOrganizations() => + _i2.Future> fetchListOfOrganizations() => (super.noSuchMethod(Invocation.method(#fetchListOfOrganizations, []), - returnValue: Future>.value( - <_i5.OrganizationModel>[])) - as _i2.Future>); + returnValue: Future>.value( + <_i6.OrganizationModel>[])) + as _i2.Future>); @override - _i2.Future> getJoinedOrganizations() => + _i2.Future> getJoinedOrganizations() => (super.noSuchMethod(Invocation.method(#getJoinedOrganizations, []), - returnValue: Future>.value( - <_i5.OrganizationModel>[])) - as _i2.Future>); + returnValue: Future>.value( + <_i6.OrganizationModel>[])) + as _i2.Future>); @override - _i2.Future<_i5.OrganizationModel> fetchOrganizationInfo(String? id) => + _i2.Future<_i6.OrganizationModel> fetchOrganizationInfo(String? id) => (super.noSuchMethod(Invocation.method(#fetchOrganizationInfo, [id]), - returnValue: Future<_i5.OrganizationModel>.value( - _FakeOrganizationModel_4())) - as _i2.Future<_i5.OrganizationModel>); + returnValue: Future<_i6.OrganizationModel>.value( + _FakeOrganizationModel_5())) + as _i2.Future<_i6.OrganizationModel>); @override - _i2.Future<_i5.OrganizationModel> fetchOrganizationByUrl(String? url) => + _i2.Future<_i6.OrganizationModel> fetchOrganizationByUrl(String? url) => (super.noSuchMethod(Invocation.method(#fetchOrganizationByUrl, [url]), - returnValue: Future<_i5.OrganizationModel>.value( - _FakeOrganizationModel_4())) - as _i2.Future<_i5.OrganizationModel>); + returnValue: Future<_i6.OrganizationModel>.value( + _FakeOrganizationModel_5())) + as _i2.Future<_i6.OrganizationModel>); @override _i2.Future joinOrganization(String? orgId) => (super.noSuchMethod(Invocation.method(#joinOrganization, [orgId]), @@ -1369,20 +1378,20 @@ class MockOrganizationApiService extends _i1.Mock returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i2.Future); @override - _i2.Future> fetchMembersInOrganization(String? orgId) => + _i2.Future> fetchMembersInOrganization(String? orgId) => (super.noSuchMethod( Invocation.method(#fetchMembersInOrganization, [orgId]), returnValue: - Future>.value(<_i24.UserSearch>[])) - as _i2.Future>); + Future>.value(<_i25.UserSearch>[])) + as _i2.Future>); @override - _i2.Future<_i6.OrganizationMemberModelList> getOrganizationMemberList( + _i2.Future<_i7.OrganizationMemberModelList> getOrganizationMemberList( String? orgId) => (super.noSuchMethod( Invocation.method(#getOrganizationMemberList, [orgId]), - returnValue: Future<_i6.OrganizationMemberModelList>.value( - _FakeOrganizationMemberModelList_5())) - as _i2.Future<_i6.OrganizationMemberModelList>); + returnValue: Future<_i7.OrganizationMemberModelList>.value( + _FakeOrganizationMemberModelList_6())) + as _i2.Future<_i7.OrganizationMemberModelList>); @override String toString() => super.toString(); } diff --git a/test/services/bottom_sheet_service_test.dart b/test/services/bottom_sheet_service_test.dart index 3532db6f2..3178d9d18 100644 --- a/test/services/bottom_sheet_service_test.dart +++ b/test/services/bottom_sheet_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/services/dialog_service_test.dart b/test/services/dialog_service_test.dart index 884cc6371..44d90bcb9 100644 --- a/test/services/dialog_service_test.dart +++ b/test/services/dialog_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/services/local_storage_services_test.dart b/test/services/local_storage_services_test.dart index 869b2e7d9..0a4b2af5f 100644 --- a/test/services/local_storage_services_test.dart +++ b/test/services/local_storage_services_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/services/local_storage_services.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/services/local_storage_services.dart'; +import 'package:hng/utilities/storage_keys.dart'; void main() { group('LocalStorageServiceTest -', () { diff --git a/test/services/navigation_service_test.dart b/test/services/navigation_service_test.dart index 2854703c4..f6eb096d1 100644 --- a/test/services/navigation_service_test.dart +++ b/test/services/navigation_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/ui/view/login/login_viewmodel.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/ui/view/login/login_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/services/user_service_test.dart b/test/services/user_service_test.dart index 4fc22bbe6..804d7675f 100644 --- a/test/services/user_service_test.dart +++ b/test/services/user_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/app/app.locator.dart'; -import 'package:zurichat/services/user_service.dart'; +import 'package:hng/app/app.locator.dart'; +import 'package:hng/services/user_service.dart'; void main() { group('UserServiceTest -', () { diff --git a/test/view_models/add_people_viewmodel_test.dart b/test/view_models/add_people_viewmodel_test.dart index 45b1d7f74..32e113e26 100644 --- a/test/view_models/add_people_viewmodel_test.dart +++ b/test/view_models/add_people_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/add_people/add_people_viewmodel.dart'; +import 'package:hng/ui/view/add_people/add_people_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/advanced_viewmodel_test.dart b/test/view_models/advanced_viewmodel_test.dart index 0abbe40f1..4ffac81d2 100644 --- a/test/view_models/advanced_viewmodel_test.dart +++ b/test/view_models/advanced_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/advanced/advanced_viewmodel.dart'; -import 'package:zurichat/utilities/enums.dart'; +import 'package:hng/ui/view/advanced/advanced_viewmodel.dart'; +import 'package:hng/utilities/enums.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_add_people_viewmodel_test.dart b/test/view_models/channel_add_people_viewmodel_test.dart index 8a6976ce2..c3fe9c40e 100644 --- a/test/view_models/channel_add_people_viewmodel_test.dart +++ b/test/view_models/channel_add_people_viewmodel_test.dart @@ -1,7 +1,7 @@ -import 'package:zurichat/models/user_search_model.dart'; -import 'package:zurichat/ui/view/channel/add_people/channel_add_people_viewmodel.dart'; +import 'package:hng/models/user_search_model.dart'; +import 'package:hng/ui/view/channel/add_people/channel_add_people_viewmodel.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:hng/utilities/storage_keys.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_info_view_model_test.dart b/test/view_models/channel_info_view_model_test.dart index 3dcd7824b..33e64b117 100644 --- a/test/view_models/channel_info_view_model_test.dart +++ b/test/view_models/channel_info_view_model_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_members_list_model_test.dart b/test/view_models/channel_members_list_model_test.dart index ea05ae380..dbb747259 100644 --- a/test/view_models/channel_members_list_model_test.dart +++ b/test/view_models/channel_members_list_model_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/channel/channel_members/channel_members_list_model.dart'; +import 'package:hng/ui/view/channel/channel_members/channel_members_list_model.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_notification_viewmodel_test.dart b/test/view_models/channel_notification_viewmodel_test.dart index 0e23d3950..bc1030de7 100644 --- a/test/view_models/channel_notification_viewmodel_test.dart +++ b/test/view_models/channel_notification_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/channel/channel_notification/channel_notification_viewmodel.dart'; +import 'package:hng/ui/view/channel/channel_notification/channel_notification_viewmodel.dart'; import '../helpers/test_helpers.dart'; // This is a test setup diff --git a/test/view_models/channels_viewmodel_test.dart b/test/view_models/channels_viewmodel_test.dart index ea870b25a..1ae1c87a6 100644 --- a/test/view_models/channels_viewmodel_test.dart +++ b/test/view_models/channels_viewmodel_test.dart @@ -1,7 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/models/app_model.dart'; -import 'package:zurichat/models/channel_members.dart'; -import 'package:zurichat/ui/view/channel/channel_list/channels_viewmodel.dart'; +import 'package:hng/models/app_model.dart'; +import 'package:hng/models/channel_members.dart'; +import 'package:hng/ui/view/channel/channel_list/channels_viewmodel.dart'; import '../helpers/test_helpers.dart'; // This is a test setup diff --git a/test/view_models/dm_jump_to_viewmodel_test.dart b/test/view_models/dm_jump_to_viewmodel_test.dart index 5a2c21026..dc0d92bfd 100644 --- a/test/view_models/dm_jump_to_viewmodel_test.dart +++ b/test/view_models/dm_jump_to_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart'; +import 'package:hng/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart'; import '../helpers/test_helpers.dart'; void main() { diff --git a/test/view_models/dm_user_viewmodel_test.dart b/test/view_models/dm_user_viewmodel_test.dart index 31386d00c..f9ce091c9 100644 --- a/test/view_models/dm_user_viewmodel_test.dart +++ b/test/view_models/dm_user_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/dm_user/dm_user_viewmodel.dart'; +import 'package:hng/ui/view/dm_user/dm_user_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/forgot_password_email_viewmodel_test.dart b/test/view_models/forgot_password_email_viewmodel_test.dart index 065a050f5..5f4a7a3fd 100644 --- a/test/view_models/forgot_password_email_viewmodel_test.dart +++ b/test/view_models/forgot_password_email_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart'; +import 'package:hng/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/forgot_password_new_viewmodel_test.dart b/test/view_models/forgot_password_new_viewmodel_test.dart index 60dd6d18e..0e908b3b4 100644 --- a/test/view_models/forgot_password_new_viewmodel_test.dart +++ b/test/view_models/forgot_password_new_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/forgot_password_otp_viewmodel_test.dart b/test/view_models/forgot_password_otp_viewmodel_test.dart index 7e9425bb0..2634dde7e 100644 --- a/test/view_models/forgot_password_otp_viewmodel_test.dart +++ b/test/view_models/forgot_password_otp_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/app/app.router.dart'; +import 'package:hng/app/app.router.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/login_viewmodel_test.dart b/test/view_models/login_viewmodel_test.dart index 364374be2..00625c587 100644 --- a/test/view_models/login_viewmodel_test.dart +++ b/test/view_models/login_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/login/login_viewmodel.dart'; +import 'package:hng/ui/view/login/login_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/notifications_viewmodel_test.dart b/test/view_models/notifications_viewmodel_test.dart index f672e8496..5f880bc69 100644 --- a/test/view_models/notifications_viewmodel_test.dart +++ b/test/view_models/notifications_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/ui/view/notifications/notifications_viewmodel.dart'; +import 'package:hng/ui/view/notifications/notifications_viewmodel.dart'; import '../helpers/test_helpers.dart'; void main() { diff --git a/test/view_models/otp_viewmodel_test.dart b/test/view_models/otp_viewmodel_test.dart index 661b0b0b5..11473c561 100644 --- a/test/view_models/otp_viewmodel_test.dart +++ b/test/view_models/otp_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/ui/view/otp/otp_viewmodel.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/ui/view/otp/otp_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/plugin_viewmodel_test.dart b/test/view_models/plugin_viewmodel_test.dart index 0bd85eb16..fb106d766 100644 --- a/test/view_models/plugin_viewmodel_test.dart +++ b/test/view_models/plugin_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/app/app.router.dart'; -import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:hng/app/app.router.dart'; +import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/you_page_viewmodel_test.dart b/test/view_models/you_page_viewmodel_test.dart index 913166ca9..c54ab0835 100644 --- a/test/view_models/you_page_viewmodel_test.dart +++ b/test/view_models/you_page_viewmodel_test.dart @@ -1,8 +1,8 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:zurichat/app/app.router.dart'; +import 'package:hng/app/app.router.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; -import 'package:zurichat/ui/nav_pages/you_page/you_page_viewmodel.dart'; +import 'package:hng/ui/nav_pages/you_page/you_page_viewmodel.dart'; void main() { group('YouPageViewModelTest -', () { From c16b75df22c7cd83af68561dd8f12eb5da057002 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Thu, 14 Oct 2021 23:24:55 +0100 Subject: [PATCH 13/20] change resolved --- .../base/server-request/api/zuri_api.dart | 2 +- lib/ui/view/login/login_viewmodel.dart | 4 +- .../organization_name_url.dart | 228 +++++++++--------- .../organization_settings_view.dart | 1 + .../organization_view/organization_view.dart | 5 - .../password_recovery/recovery_viewmodel.dart | 2 - 6 files changed, 116 insertions(+), 126 deletions(-) diff --git a/lib/package/base/server-request/api/zuri_api.dart b/lib/package/base/server-request/api/zuri_api.dart index 0d7bfd9fb..97300f413 100644 --- a/lib/package/base/server-request/api/zuri_api.dart +++ b/lib/package/base/server-request/api/zuri_api.dart @@ -827,7 +827,7 @@ class ZuriApi implements Api { }); try { final res = await dio.post( - 'https://api.zuri.chat/upload/file/$pluginId', + '${coreBaseUrl}upload/file/$pluginId', options: Options( headers: {'Authorization': 'Bearer $token'}, ), diff --git a/lib/ui/view/login/login_viewmodel.dart b/lib/ui/view/login/login_viewmodel.dart index fac85cab9..cf63cd17c 100644 --- a/lib/ui/view/login/login_viewmodel.dart +++ b/lib/ui/view/login/login_viewmodel.dart @@ -99,8 +99,8 @@ class LoginViewModel extends FormViewModel { ); _storageService.clearData(StorageKeys.currentOrgId); // final userModel = UserModel.fromJson(response?.data['data']['user']); - final res = await zuriApi.get( - "https://api.zuri.chat/users/${response?.data['data']['user']['id']}"); + final res = await zuriApi + .get("${coreBaseUrl}users/${response?.data['data']['user']['id']}"); if (res?.statusCode == 200) { _snackbarService.showCustomSnackBar( message: profileUpdated, variant: SnackbarType.success); diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart index d60be1921..978eba180 100644 --- a/lib/ui/view/organization/organization_settings/organization_name_url.dart +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -1,150 +1,146 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:stacked/stacked.dart'; -import 'package:hng/constants/app_strings.dart'; import 'package:hng/models/organization_model.dart'; +import 'package:hng/ui/view/organization/organization_settings/organization_settings_view_model.dart'; +import 'package:hng/constants/app_strings.dart'; import 'package:hng/ui/shared/colors.dart'; import 'package:hng/ui/shared/styles.dart'; import 'package:hng/ui/shared/text_field.dart'; import 'package:hng/ui/shared/zuri_appbar.dart'; import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/ui/view/organization/organization_settings/organization_settings_view_model.dart'; +import 'package:stacked_hooks/stacked_hooks.dart'; -class OrganizationNameUrl extends HookWidget { +class OrganizationNameUrl + extends HookViewModelWidget { final OrganizationModel org; OrganizationNameUrl({Key? key, required this.org}) : super(key: key); final _formKey = GlobalKey(); @override - Widget build(BuildContext context) { + Widget buildViewModelWidget( + BuildContext context, OrganizationSettingsViewModel viewModel) { final _orgNameController = useTextEditingController(text: org.name); final _orgUrlController = useTextEditingController(text: org.organizationUrl?.split('.').first); - return ViewModelBuilder.reactive( - viewModelBuilder: () => OrganizationSettingsViewModel(), - onModelReady: (model) => model.init(org.name!, org.organizationUrl!), - builder: (context, model, child) { - return Scaffold( - appBar: ZuriAppBar( - whiteBackground: true, - title: 'Workspace Name & URL', - subtitle: '', - leading: Icons.chevron_left, - leadingPress: () => model.back(), - actions: [ - TextButton( - onPressed: () { - if (!_formKey.currentState!.validate()) return; - model.updateOrgNameAndUrl(org.id.toString(), - _orgNameController.text, _orgUrlController.text); - }, - child: Text( - Save, - style: AppTextStyles.bodyRegular.copyWith( - color: AppColors.zuriPrimaryColor, - ), - ), + return Scaffold( + appBar: ZuriAppBar( + whiteBackground: true, + title: 'Workspace Name & URL', + subtitle: '', + leading: Icons.chevron_left, + leadingPress: () => viewModel.back(), + actions: [ + TextButton( + onPressed: () { + if (!_formKey.currentState!.validate()) return; + viewModel.updateOrgNameAndUrl(org.id.toString(), + _orgNameController.text, _orgUrlController.text); + }, + child: Text( + Save, + style: AppTextStyles.bodyRegular.copyWith( + color: AppColors.zuriPrimaryColor, ), - ], + ), ), - body: Stack( - fit: StackFit.expand, - children: [ - Form( - key: _formKey, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 25, vertical: 20), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, + ], + ), + body: Stack( + fit: StackFit.expand, + children: [ + Form( + key: _formKey, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 25, vertical: 20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Workspace Name', + style: AppTextStyles.heading4.copyWith( + color: AppColors.blackColor, fontSize: 18), + ), + const SizedBox(height: 15), + Flexible( + child: BorderTextField( + hint: "HNG i8", + controller: _orgNameController, + textCapitalization: TextCapitalization.words, + validator: (val) => + viewModel.validateNotEmptyField(val!), + ), + ), + const SizedBox(height: 15), + Text( + OrgNameDesc, + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 15, color: AppColors.greyColor), + ), + ], + ), + ), + const Divider(color: AppColors.greyColor, thickness: 1), + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 25, vertical: 20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Workspace URL', + style: AppTextStyles.heading3.copyWith( + color: AppColors.blackColor, fontSize: 18), + ), + const SizedBox(height: 15), + Row( + crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text( - 'Workspace Name', - style: AppTextStyles.heading4.copyWith( - color: AppColors.blackColor, fontSize: 18), - ), - const SizedBox(height: 15), Flexible( child: BorderTextField( - hint: "HNG i8", - controller: _orgNameController, - textCapitalization: TextCapitalization.words, - validator: (val) => - model.validateNotEmptyField(val!), + hint: "hng_i8", + controller: _orgUrlController, + textCapitalization: TextCapitalization.none, + validator: viewModel.vaidateOrgUrl, + textAlign: TextAlign.end, ), ), - const SizedBox(height: 15), + const SizedBox(width: 10), Text( - OrgNameDesc, - style: AppTextStyles.bodyRegular.copyWith( - fontSize: 15, color: AppColors.greyColor), + '.zurichat.com', + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 15), ), ], ), - ), - const Divider(color: AppColors.greyColor, thickness: 1), - Padding( - padding: const EdgeInsets.symmetric( - horizontal: 25, vertical: 20), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Workspace URL', - style: AppTextStyles.heading3.copyWith( - color: AppColors.blackColor, fontSize: 18), - ), - const SizedBox(height: 15), - Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Flexible( - child: BorderTextField( - hint: "hng_i8", - controller: _orgUrlController, - textCapitalization: TextCapitalization.none, - validator: model.vaidateOrgUrl, - textAlign: TextAlign.end, - ), - ), - const SizedBox(width: 10), - Text( - '.zurichat.com', - style: AppTextStyles.bodyRegular - .copyWith(fontSize: 15), - ), - ], - ), - const SizedBox(height: 15), - Text( - OrgUrlDesc, - style: AppTextStyles.bodyRegular.copyWith( - fontSize: 15, color: AppColors.greyColor), - ), - ], + const SizedBox(height: 15), + Text( + OrgUrlDesc, + style: AppTextStyles.bodyRegular + .copyWith(fontSize: 15, color: AppColors.greyColor), ), - ), - ], - ), - ), - Visibility( - visible: model.isBusy, - child: Container( - alignment: Alignment.center, - height: 100, - child: const ZuriLoader(isTransparent: true), + ], + ), ), - ), - ], + ], + ), + ), + Visibility( + visible: viewModel.isBusy, + child: Container( + alignment: Alignment.center, + height: 100, + child: const ZuriLoader(isTransparent: true), + ), ), - ); - }, + ], + ), ); } } diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart index 99dda331a..43124781d 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -17,6 +17,7 @@ class OrganizationSettingsView extends StatelessWidget { Widget build(BuildContext context) { return ViewModelBuilder.reactive( viewModelBuilder: () => OrganizationSettingsViewModel(), + onModelReady: (model) => model.init(org.name!, org.organizationUrl!), builder: (context, model, child) { return Scaffold( appBar: ZuriAppBar( diff --git a/lib/ui/view/organization/organization_view/organization_view.dart b/lib/ui/view/organization/organization_view/organization_view.dart index 7f40b1379..dae1b62c3 100644 --- a/lib/ui/view/organization/organization_view/organization_view.dart +++ b/lib/ui/view/organization/organization_view/organization_view.dart @@ -148,11 +148,6 @@ class OrganizationTile extends ViewModelWidget { height: MediaQuery.of(context).size.height * 0.05, width: MediaQuery.of(context).size.height * 0.05, decoration: BoxDecoration( - // border: Border.all( - // color: AppColors.whiteColor, - // width: 2, - // style: BorderStyle.solid, - // ), color: AppColors.whiteColor, borderRadius: BorderRadius.circular(5), ), diff --git a/lib/ui/view/password_recovery/recovery_viewmodel.dart b/lib/ui/view/password_recovery/recovery_viewmodel.dart index 642aba1e3..97dccb9f2 100644 --- a/lib/ui/view/password_recovery/recovery_viewmodel.dart +++ b/lib/ui/view/password_recovery/recovery_viewmodel.dart @@ -1,5 +1,3 @@ -// import 'package:hng/app/app.router.dart'; import 'package:stacked/stacked.dart'; -// import 'package:stacked_services/stacked_services.dart'; class ForgotPassViewModel extends BaseViewModel {} From 55a225576d356a6543b1877fcd2c0b715f53bdbd Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Fri, 15 Oct 2021 20:13:05 +0100 Subject: [PATCH 14/20] Changes resolved 2 --- .vscode/settings.json | 2 +- lib/constants/app_strings.dart | 8 ++++++++ .../organization_settings/organization_icon.dart | 4 ++-- .../organization_settings/organization_name_url.dart | 8 ++++---- .../organization_settings_view.dart | 8 ++++---- pubspec.lock | 10 +++++----- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b556679cf..b45d0f183 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "dart.flutterSdkPath": "C:\\Users\\chris\\fvm\\versions\\2.2.2", + "dart.flutterSdkPath": "C:\\Users\\chris\\fvm\\versions\\stable", "yaml.customTags": [ "!upload scalar", "!remove scalar", diff --git a/lib/constants/app_strings.dart b/lib/constants/app_strings.dart index b7137fd4f..0cd5a5acc 100644 --- a/lib/constants/app_strings.dart +++ b/lib/constants/app_strings.dart @@ -397,6 +397,8 @@ const String EditOrgIcon = 'Edit Workspace Icon'; const String EditOrgIconDesc = 'Workspace icon is used in the desktop and mobile apps where it\'s useful in helping to quickly identify this workspace.'; const String EditOrgNameUrl = 'Edit Workspace Name & URL'; +const String EditOrgNameUrlDesc1 = 'Your workspace name is '; +const String EditOrgNameUrlDesc2 = ' and your URL is '; const String OrgIcon = 'Workspace Icon'; const String OrgIconGuide = 'Workspace Icon guideline'; const String OrgIconGuideDesc = @@ -405,6 +407,11 @@ const String OrgNameDesc = 'Your workspace name is displayed in menus and headings. It will usually be (or include) the name of your company.'; const String OrgUrlDesc = 'Your workspace URL can only contain lowercase letters, numbers and dashes (and must start with a letter or number).'; +const String OrgnameUrl = 'Workspace Name & URL'; +const String OrgName = 'Workspace Name'; +const String OrgUrl = 'Workspace URL'; +const String OrgSettings = 'Workspace Settings'; +const String UploadLogo = 'Upload Icon'; //Pinned Messages const String NoPinnedMessagesYet = 'No Pinned Messages Yet'; @@ -443,6 +450,7 @@ const String SendFeedback = 'Send Feedback'; //Images and Logos const String AddLogo = 'assets/logo/add_logo.png'; const String ZuriLogo = 'assets/logo/zuri_app_logo.png'; +const String ZuriWordLogo = 'assets/logo/zuri_word_and_logo.png'; const String NewZuriLogo = 'assets/logo/new_zuri_logo.png'; const String ZuriAppbarLogo = 'assets/logo/new_zuri_logo.png'; const String GoogleLogo = 'assets/logo/Google_logo.png'; diff --git a/lib/ui/view/organization/organization_settings/organization_icon.dart b/lib/ui/view/organization/organization_settings/organization_icon.dart index 8b21c06d4..7578ac467 100644 --- a/lib/ui/view/organization/organization_settings/organization_icon.dart +++ b/lib/ui/view/organization/organization_settings/organization_icon.dart @@ -55,7 +55,7 @@ class OrganizationLogo extends StatelessWidget { clipBehavior: Clip.hardEdge, child: model.tempImage == null && org.logoUrl!.isEmpty ? Image.asset( - 'assets/logo/zuri_word_and_logo.png', + ZuriWordLogo, fit: BoxFit.cover, ) : model.tempImage != null @@ -71,7 +71,7 @@ class OrganizationLogo extends StatelessWidget { const SizedBox(height: 20), LongButton( onPressed: () => model.selectImage(), - label: 'Upload Icon', + label: UploadLogo, width: 200, ), const SizedBox(height: 30), diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart index 978eba180..3eda1cf91 100644 --- a/lib/ui/view/organization/organization_settings/organization_name_url.dart +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -25,7 +25,7 @@ class OrganizationNameUrl return Scaffold( appBar: ZuriAppBar( whiteBackground: true, - title: 'Workspace Name & URL', + title: OrgnameUrl, subtitle: '', leading: Icons.chevron_left, leadingPress: () => viewModel.back(), @@ -62,14 +62,14 @@ class OrganizationNameUrl crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'Workspace Name', + OrgName, style: AppTextStyles.heading4.copyWith( color: AppColors.blackColor, fontSize: 18), ), const SizedBox(height: 15), Flexible( child: BorderTextField( - hint: "HNG i8", + hint: CompanyNameHint, controller: _orgNameController, textCapitalization: TextCapitalization.words, validator: (val) => @@ -94,7 +94,7 @@ class OrganizationNameUrl crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'Workspace URL', + OrgUrl, style: AppTextStyles.heading3.copyWith( color: AppColors.blackColor, fontSize: 18), ), diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart index 43124781d..aef28ed57 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -21,8 +21,8 @@ class OrganizationSettingsView extends StatelessWidget { builder: (context, model, child) { return Scaffold( appBar: ZuriAppBar( - title: 'Workspace Settings', - subtitle: 'zuri chat', + title: OrgSettings, + subtitle: org.name, whiteBackground: true, leading: Icons.chevron_left, leadingPress: () => model.back(), @@ -82,7 +82,7 @@ class OrganizationSettingsView extends StatelessWidget { TextSpan( children: [ TextSpan( - text: 'Your workspace name is ', + text: EditOrgNameUrlDesc1, style: AppTextStyles.bodyRegular.copyWith( fontSize: 15, color: AppColors.greyColor), ), @@ -94,7 +94,7 @@ class OrganizationSettingsView extends StatelessWidget { ), ), TextSpan( - text: ' and your URL is ', + text: EditOrgNameUrlDesc2, style: AppTextStyles.bodyRegular.copyWith( fontSize: 15, color: AppColors.greyColor), ), diff --git a/pubspec.lock b/pubspec.lock index 337301acd..ae88daa14 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -14,7 +14,7 @@ packages: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "1.7.1" + version: "1.7.2" archive: dependency: transitive description: @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.1" auto_size_text_pk: dependency: transitive description: @@ -154,7 +154,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" checked_yaml: dependency: transitive description: @@ -664,7 +664,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" mime: dependency: transitive description: @@ -1061,7 +1061,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" timing: dependency: transitive description: From 521066480b485b8bbe3fed9c97f264b0e6fde020 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Sat, 16 Oct 2021 11:33:20 +0100 Subject: [PATCH 15/20] Changed package name --- lib/app/app.dart | 68 ++--- lib/app/app.locator.dart | 2 +- lib/general_widgets/app_alert_dialog.dart | 2 +- lib/general_widgets/custom_channel.dart | 2 +- lib/general_widgets/custom_channel_stage.dart | 2 +- lib/general_widgets/custom_textfield.dart | 2 +- lib/general_widgets/custom_user.dart | 4 +- lib/general_widgets/custom_user_channel.dart | 2 +- lib/general_widgets/menu_item_tile.dart | 2 +- lib/general_widgets/no_connection_widget.dart | 8 +- lib/general_widgets/status_icon.dart | 4 +- lib/general_widgets/unread_count.dart | 4 +- lib/main.dart | 8 +- lib/main_app_view_model.dart | 4 +- .../base/jump_to_request/jump_to_api.dart | 2 +- lib/package/base/server-request/api/api.dart | 8 +- .../server-request/api/dio_interceptors.dart | 2 +- .../base/server-request/api/zuri_api.dart | 26 +- .../channels/channels_api_service.dart | 8 +- .../server-request/dms/dms_api_service.dart | 4 +- .../organization_api_service.dart | 6 +- lib/services/centrifuge_service.dart | 10 +- lib/services/current_user_profile.dart | 14 +- lib/services/deep_link_service.dart | 2 +- lib/services/local_storage_services.dart | 2 +- lib/services/localization_service.dart | 10 +- lib/services/media_service.dart | 12 +- lib/services/notification_service.dart | 6 +- lib/services/user_service.dart | 2 +- lib/ui/nav_pages/dm_page/dm_page.dart | 10 +- .../nav_pages/dm_page/dm_page_viewmodel.dart | 2 +- .../dm_page/dm_search_find_page.dart | 8 +- .../dm_page/widgets/dmmessage_read.dart | 4 +- .../dm_page/widgets/dmmessage_unread.dart | 6 +- .../drafted_message_page.dart | 10 +- .../drafted_message_page_viewmodel.dart | 2 +- .../widgets/app/data.dart | 2 +- .../nav_pages/home_page/home_item_model.dart | 4 +- lib/ui/nav_pages/home_page/home_page.dart | 18 +- .../home_page/home_page_viewmodel.dart | 40 +-- .../widgets/custom_channel_list_tile.dart | 6 +- .../widgets/custom_dm_list_tile.dart | 4 +- .../custom_homepage_section_title.dart | 2 +- .../widgets/custom_plugin_list_tile.dart | 8 +- .../home_page/widgets/home_expanded.dart | 10 +- .../home_page/widgets/home_list_items.dart | 6 +- .../home_page/widgets/zuri_logo.dart | 4 +- .../plugin_page/add_plugin_view.dart | 14 +- .../plugin_page/edit_plugin_view.dart | 8 +- .../plugin_page/plugin_intro_page.dart | 12 +- .../plugin_page/plugin_page_view.dart | 20 +- .../plugin_page/plugin_viewmodel.dart | 10 +- .../nav_pages/plugin_page/plugins_view.dart | 13 +- .../plugin_page/widgets/custom_appbar.dart | 4 +- .../you_page/widgets/profile_page_head.dart | 15 +- .../you_page/widgets/status_form.dart | 6 +- lib/ui/nav_pages/you_page/you_page.dart | 10 +- .../you_page/you_page_viewmodel.dart | 26 +- .../custom_user_bottom_sheet_view.dart | 6 +- .../custom_user_bottom_sheet_viewmodel.dart | 14 +- .../widgets/custom_button.dart | 6 +- .../widgets/profile_head.dart | 6 +- .../emoji_picker_bottomsheet_view.dart | 2 +- .../custom_user_bottom_sheet_view.dart | 4 +- .../custom_user_bottom_sheet_viewmodel.dart | 4 +- .../widgets/custom_profile_tile.dart | 2 +- .../widgets/profile_head.dart | 2 +- .../sign_out_bottom_sheet_view.dart | 8 +- .../sign_out_botton_sheet_viewmodel.dart | 18 +- .../widgets/work_space_display_info_view.dart | 4 +- .../thread_options_bottomsheet_view.dart | 2 +- .../bottom_sheets/zuri_chat_bottomsheet.dart | 12 +- lib/ui/shared/dialogs.dart | 2 +- .../dialogs/delete_draft_alert_dialog.dart | 4 +- lib/ui/shared/dialogs/delete_message.dart | 2 +- .../remind_me_dialog/remind_me_dialog.dart | 6 +- .../remind_me_dialog_viewmodel.dart | 4 +- .../dialogs/schedule_channel_dialog.dart | 4 +- lib/ui/shared/dialogs/schedule_dialog.dart | 4 +- .../dialogs/select_language_dialog.dart | 2 +- .../shared/dialogs/select_theme_dialog.dart | 4 +- .../shared/dialogs/send_feedback_dialog.dart | 9 +- lib/ui/shared/dialogs/sign_out_dialog.dart | 2 +- lib/ui/shared/dialogs/skin_tone_dialog.dart | 4 +- lib/ui/shared/long_button.dart | 2 +- lib/ui/shared/search_bar.dart | 2 +- lib/ui/shared/setup_bottom_sheet_ui.dart | 6 +- lib/ui/shared/setup_dialog_ui.dart | 12 +- lib/ui/shared/shared.dart | 6 +- .../expandable_textfield_screen.dart | 4 +- ...expandable_textfield_screen_viewmodel.dart | 4 +- .../text_parser/text_parser_view.dart | 2 +- .../text_parser/text_parser_viewmodel.dart | 2 +- .../thread_card/thread_card_view.dart | 10 +- .../thread_card/thread_card_viewmodel.dart | 6 +- .../thread_card/widgets/audio_message.dart | 2 +- .../thread_card/widgets/emojis.dart | 2 +- .../thread_card/widgets/emojis_list.dart | 2 +- .../thread_card/widgets/media_files.dart | 2 +- .../widgets/post_files_display.dart | 10 +- .../thread_card/widgets/post_replies.dart | 4 +- .../thread_card/widgets/quoted_replies.dart | 6 +- .../thread_card/widgets/snapshot_links.dart | 8 +- .../widgets/thread_card_channel_main.dart | 14 +- .../widgets/thread_card_detail.dart | 6 +- .../thread_card/widgets/thread_card_main.dart | 4 +- .../thread_card/widgets/thread_card_post.dart | 4 +- lib/ui/shared/text_field.dart | 2 +- lib/ui/shared/text_styles.dart | 2 +- lib/ui/shared/zuri_appbar.dart | 6 +- lib/ui/shared/zuri_loader.dart | 4 +- lib/ui/view/add_people/add_people_view.dart | 6 +- lib/ui/view/advanced/advanced_view.dart | 8 +- .../add_people/channel_add_people_view.dart | 288 +++++++++--------- .../channel_add_people_viewmodel.dart | 14 +- .../channel_info/channel_info_view.dart | 14 +- .../channel_info/channel_info_view_model.dart | 21 +- .../channel_info/widgets/custom_app_bar.dart | 6 +- .../channel_info/widgets/edit_button.dart | 4 +- .../channel_info/widgets/fifth_section.dart | 4 +- .../channel_info/widgets/first_section.dart | 8 +- .../channel_info/widgets/fourth_section.dart | 4 +- .../channel_info/widgets/new_row_tile.dart | 2 +- .../channel_info/widgets/second_section.dart | 8 +- .../channel_info/widgets/seventh_section.dart | 4 +- .../channel_info/widgets/sixth_section.dart | 42 +-- .../channel_info/widgets/third_section.dart | 12 +- .../channel/channel_list/channels_view.dart | 6 +- .../channel_list/channels_viewmodel.dart | 18 +- .../channel_members/channel_members_list.dart | 16 +- .../channel_members_list_model.dart | 4 +- .../channel_notification_view.dart | 8 +- .../channel_notification_viewmodel.dart | 2 +- .../channel_search/channel_search_view.dart | 8 +- .../channel_search/widgets/app_bar_main.dart | 2 +- .../channel_search/widgets/search_result.dart | 2 +- .../widgets/textfield_style.dart | 2 +- .../channel_view/channel_page_view.dart | 19 +- .../channel_view/channel_page_viewmodel.dart | 32 +- .../channel_view/widgets/channel_chat.dart | 16 +- .../channel_view/widgets/channel_intro.dart | 10 +- .../channel_view/widgets/check_user.dart | 10 +- .../channel_view/widgets/message_tile.dart | 4 +- .../edit_channel/edit_channel_view.dart | 8 +- .../edit_channel/edit_channel_view_model.dart | 10 +- .../widgets/edit_channel_appbar.dart | 4 +- .../widgets/edit_channel_headers.dart | 4 +- .../widgets/edit_channel_text_field.dart | 2 +- .../view/channel/new_channel/new_channel.dart | 8 +- .../new_channel/new_channel_viewmodel.dart | 12 +- .../pinned_messages/pinned_messages_view.dart | 10 +- .../pinned_messages_viewmodel.dart | 10 +- .../share_message/share_message_hook.dart | 14 +- .../share_message/share_message_view.dart | 12 +- .../share_message_viewmodel.dart | 16 +- .../widgets/select_channel_drop_down.dart | 6 +- .../widgets/share_message_textfield.dart | 4 +- .../widgets/channel_browser_container.dart | 4 +- lib/ui/view/clear_after/clear_after_view.dart | 6 +- .../clear_after/clear_after_viewmodel.dart | 4 +- .../clear_after/widget/date_and_time.dart | 2 +- .../clear_notification_view.dart | 8 +- .../clear_notification_viewmodel.dart | 2 +- .../create_channel_view.dart | 6 +- .../create_channel_viewmodel.dart | 2 +- .../widgets/custom_text_field.dart | 2 +- .../view/direct_message/direct_message.dart | 8 +- .../direct_message_text_field_hook.dart | 2 +- .../direct_message_viewmodel.dart | 2 +- lib/ui/view/dm_chat_view/dm_jump_to_view.dart | 14 +- .../dm_chat_view/dm_jump_to_viewmodel.dart | 4 +- lib/ui/view/dm_search/dm_search_view.dart | 6 +- .../view/dm_search/dm_search_viewmodel.dart | 2 +- lib/ui/view/dm_user/dm_user_view.dart | 14 +- lib/ui/view/dm_user/dm_user_viewmodel.dart | 14 +- .../dm_user/dummy_data/models/message.dart | 2 +- .../view/dm_user/dummy_data/models/user.dart | 2 +- .../dm_user/widgets/custom_start_message.dart | 4 +- .../view/dm_user/widgets/custom_status.dart | 2 +- lib/ui/view/dm_user/widgets/message_view.dart | 2 +- .../dm_user/widgets/online_indicator.dart | 2 +- .../do_not_disturb/do_not_disturb_view.dart | 6 +- .../do_not_disturb_viewmodel.dart | 2 +- lib/ui/view/draft/app/data.dart | 2 +- .../view/draft/app/drafted_item_widget.dart | 2 +- lib/ui/view/draft/draft_view.dart | 32 +- lib/ui/view/draft/draft_viewmodel.dart | 20 +- lib/ui/view/draft/drafts.dart | 8 +- .../view/edit_profile/edit_profile_view.dart | 10 +- .../edit_profile/edit_profile_viewmodel.dart | 22 +- .../widget/edit_profile_body.dart | 9 +- .../expandable_textfield_screen.dart | 12 +- ...expandable_textfield_screen_viewmodel.dart | 12 +- .../widget/user_mentions.dart | 4 +- .../feed_back_dialog.dart | 4 +- lib/ui/view/file_search/file_search_view.dart | 6 +- .../view/file_search/widgets/search_bar.dart | 4 +- lib/ui/view/file_search/widgets/tab_bar.dart | 2 +- .../forgot_password_email_view.dart | 12 +- .../forgot_password_email_viewmodel.dart | 20 +- .../forgot_password_newview.dart | 12 +- .../forgot_password_newviewmodel.dart | 20 +- .../forgot_password_otpview.dart | 12 +- .../forgot_password_otpviewmodel.dart | 18 +- .../language_and_region_view.dart | 6 +- .../language_and_region_viewmodel.dart | 11 +- lib/ui/view/login/login_view.dart | 10 +- lib/ui/view/login/login_viewmodel.dart | 12 +- lib/ui/view/nav_bar/nav_bar_view.dart | 6 +- .../notifications/notifications_view.dart | 6 +- .../notifications_viewmodel.dart | 2 +- lib/ui/view/onboarding/onboading_view.dart | 6 +- .../add_organization_view.dart | 14 +- .../create_organization/company.dart | 4 +- .../create_organization.dart | 4 +- .../create_organization_viewmodel.dart | 6 +- .../create_organization/invite.dart | 6 +- .../create_organization/project.dart | 2 +- .../email_confirmation_view.dart | 6 +- .../email_confirmation_viewmodel.dart | 4 +- .../admin_permissions/create_invite_link.dart | 10 +- .../admin_permissions/invite_via_email.dart | 10 +- .../invitation_sent.dart | 14 +- .../invite_via_contact/import_contact.dart | 8 +- .../invite_via_email/invite_via_email.dart | 12 +- .../invite_via_email/invite_viewmodel.dart | 16 +- .../organization/new_email/new_email.dart | 4 +- .../different_email_organization_view.dart | 10 +- ...ifferent_email_organization_viewmodel.dart | 10 +- .../organization_icon.dart | 16 +- .../organization_name_url.dart | 16 +- .../organization_settings_view.dart | 10 +- .../organization_settings_view_model.dart | 18 +- .../organization_url_view.dart | 8 +- .../organization_view/organization_view.dart | 10 +- .../organization_viewmodel.dart | 6 +- .../select_email/select_email_view.dart | 6 +- .../select_email/select_email_viewmodel.dart | 6 +- lib/ui/view/otp/otp_view.dart | 6 +- lib/ui/view/otp/otp_viewmodel.dart | 4 +- .../view/password_recovery/new_password.dart | 4 +- .../view/password_recovery/recovery_view.dart | 4 +- .../popup_notification.dart | 4 +- lib/ui/view/preference/preference_view.dart | 8 +- .../view/preference/preference_viewmodel.dart | 6 +- .../profile_page/profile_page_viewmodel.dart | 2 +- lib/ui/view/saved_items/saved_items_view.dart | 8 +- .../saved_items/saved_items_viewmodel.dart | 12 +- .../widgets/saved_item_background.dart | 4 +- lib/ui/view/set_status/set_status_view.dart | 27 +- .../view/set_status/set_status_viewmodel.dart | 20 +- lib/ui/view/sign_up/sign_up_view.dart | 10 +- lib/ui/view/sign_up/sign_up_viewmodel.dart | 6 +- lib/ui/view/splashscreen/splashscreen.dart | 2 +- .../splashscreen/splashscreen_viewmodel.dart | 2 +- lib/ui/view/start_dm/start_dm_view.dart | 6 +- lib/ui/view/start_dm/start_dm_viewmodel.dart | 4 +- .../start_dm/widgets/custom_chip_input.dart | 2 +- .../terms_and_conditions_view.dart | 2 +- .../terms_and_conditions_view_model.dart | 2 +- .../threads/all_threads/threads_view.dart | 6 +- .../all_threads/widgets/thread_card.dart | 4 +- lib/ui/view/threads/test_data.dart | 4 +- .../thread_detail/thread_detail_view.dart | 12 +- .../thread_detail_viewmodel.dart | 14 +- lib/ui/view/user_search/user_search.dart | 2 +- .../user_search/user_search_not_found.dart | 4 +- lib/ui/view/user_search/user_search_view.dart | 2 +- .../user_search/user_search_viewmodel.dart | 6 +- .../widget/custom_dm_list_tile.dart | 2 +- lib/ui/view/webview_page/web_view_model.dart | 2 +- lib/ui/view/webview_page/webview_page.dart | 6 +- .../extensions/locale_extension.dart | 4 +- .../localization/app_localization.dart | 4 +- .../mixins/close_on_second_back_mixin.dart | 2 +- lib/utilities/utilities.dart | 2 +- pubspec.lock | 10 +- pubspec.yaml | 2 +- test/helpers/test_helpers.dart | 30 +- test/helpers/test_helpers.mocks.dart | 42 +-- test/services/bottom_sheet_service_test.dart | 4 +- test/services/dialog_service_test.dart | 4 +- .../services/local_storage_services_test.dart | 4 +- test/services/navigation_service_test.dart | 4 +- test/services/user_service_test.dart | 4 +- .../add_people_viewmodel_test.dart | 2 +- test/view_models/advanced_viewmodel_test.dart | 4 +- .../channel_add_people_viewmodel_test.dart | 6 +- .../channel_info_view_model_test.dart | 4 +- .../channel_members_list_model_test.dart | 2 +- .../channel_notification_viewmodel_test.dart | 2 +- test/view_models/channels_viewmodel_test.dart | 6 +- .../dm_jump_to_viewmodel_test.dart | 2 +- test/view_models/dm_user_viewmodel_test.dart | 2 +- .../forgot_password_email_viewmodel_test.dart | 2 +- .../forgot_password_new_viewmodel_test.dart | 4 +- .../forgot_password_otp_viewmodel_test.dart | 2 +- test/view_models/login_viewmodel_test.dart | 2 +- .../notifications_viewmodel_test.dart | 2 +- test/view_models/otp_viewmodel_test.dart | 4 +- test/view_models/plugin_viewmodel_test.dart | 4 +- test/view_models/you_page_viewmodel_test.dart | 4 +- 302 files changed, 1268 insertions(+), 1280 deletions(-) diff --git a/lib/app/app.dart b/lib/app/app.dart index 3c7ecea19..0238f8944 100644 --- a/lib/app/app.dart +++ b/lib/app/app.dart @@ -1,37 +1,37 @@ -import 'package:hng/services/centrifuge_service.dart'; -import 'package:hng/services/localization_service.dart'; -import 'package:hng/services/media_service.dart'; -import 'package:hng/services/notification_service.dart'; -import 'package:hng/services/status_service.dart'; -import 'package:hng/services/zuri_theme_service.dart'; -import 'package:hng/ui/nav_pages/dm_page/dm_search_find_page.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_intro_page.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_page_view.dart'; -import 'package:hng/ui/view/channel/share_message/share_message_view.dart'; -import 'package:hng/ui/view/direct_message/direct_message.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invitation_sent.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart'; -import 'package:hng/ui/view/organization/organization_settings/organization_icon.dart'; -import 'package:hng/ui/view/organization/organization_settings/organization_name_url.dart'; -import 'package:hng/ui/view/organization/organization_settings/organization_settings_view.dart'; -import 'package:hng/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart'; -import 'package:hng/ui/view/threads/all_threads/threads_view.dart'; -import 'package:hng/package/base/jump_to_request/jump_to_api.dart'; -import 'package:hng/ui/view/user_search/user_search_view.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/view/channel/edit_channel/edit_channel_view.dart'; -import 'package:hng/ui/view/threads/thread_detail/thread_detail_view.dart'; -import 'package:hng/ui/view/organization/organization_url/organization_url_view.dart'; -import 'package:hng/ui/view/channel/add_people/channel_add_people_view.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart'; -import 'package:hng/ui/view/webview_page/webview_page.dart'; +import 'package:zurichat/services/centrifuge_service.dart'; +import 'package:zurichat/services/localization_service.dart'; +import 'package:zurichat/services/media_service.dart'; +import 'package:zurichat/services/notification_service.dart'; +import 'package:zurichat/services/status_service.dart'; +import 'package:zurichat/services/zuri_theme_service.dart'; +import 'package:zurichat/ui/nav_pages/dm_page/dm_search_find_page.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_intro_page.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_page_view.dart'; +import 'package:zurichat/ui/view/channel/share_message/share_message_view.dart'; +import 'package:zurichat/ui/view/direct_message/direct_message.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invitation_sent.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart'; +import 'package:zurichat/ui/view/organization/organization_settings/organization_icon.dart'; +import 'package:zurichat/ui/view/organization/organization_settings/organization_name_url.dart'; +import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view.dart'; +import 'package:zurichat/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart'; +import 'package:zurichat/ui/view/threads/all_threads/threads_view.dart'; +import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart'; +import 'package:zurichat/ui/view/user_search/user_search_view.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/view/channel/edit_channel/edit_channel_view.dart'; +import 'package:zurichat/ui/view/threads/thread_detail/thread_detail_view.dart'; +import 'package:zurichat/ui/view/organization/organization_url/organization_url_view.dart'; +import 'package:zurichat/ui/view/channel/add_people/channel_add_people_view.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart'; +import 'package:zurichat/ui/view/webview_page/webview_page.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/app/app.locator.dart b/lib/app/app.locator.dart index 80b5b2346..d85614ff8 100644 --- a/lib/app/app.locator.dart +++ b/lib/app/app.locator.dart @@ -6,7 +6,7 @@ // ignore_for_file: public_member_api_docs -import 'package:hng/services/status_service.dart'; +import 'package:zurichat/services/status_service.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/general_widgets/app_alert_dialog.dart b/lib/general_widgets/app_alert_dialog.dart index 260b04893..588299438 100644 --- a/lib/general_widgets/app_alert_dialog.dart +++ b/lib/general_widgets/app_alert_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../ui/shared/shared.dart'; diff --git a/lib/general_widgets/custom_channel.dart b/lib/general_widgets/custom_channel.dart index 23436272f..ebf59d905 100644 --- a/lib/general_widgets/custom_channel.dart +++ b/lib/general_widgets/custom_channel.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class CustomChannel extends StatelessWidget { final String? text; diff --git a/lib/general_widgets/custom_channel_stage.dart b/lib/general_widgets/custom_channel_stage.dart index 41bb63f1a..00c04564c 100644 --- a/lib/general_widgets/custom_channel_stage.dart +++ b/lib/general_widgets/custom_channel_stage.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class CustomChannelStage extends StatelessWidget { final IconData? leadingIcon; diff --git a/lib/general_widgets/custom_textfield.dart b/lib/general_widgets/custom_textfield.dart index 2bb25ae46..caf27a621 100644 --- a/lib/general_widgets/custom_textfield.dart +++ b/lib/general_widgets/custom_textfield.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../ui/shared/colors.dart'; //import 'package:expandable_text/expandable_text.dart'; diff --git a/lib/general_widgets/custom_user.dart b/lib/general_widgets/custom_user.dart index 0139c816b..0fb62ba99 100644 --- a/lib/general_widgets/custom_user.dart +++ b/lib/general_widgets/custom_user.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class CustomUser extends StatelessWidget { const CustomUser({Key? key, this.image, this.text}) : super(key: key); diff --git a/lib/general_widgets/custom_user_channel.dart b/lib/general_widgets/custom_user_channel.dart index e52a442ee..cd38a1e8f 100644 --- a/lib/general_widgets/custom_user_channel.dart +++ b/lib/general_widgets/custom_user_channel.dart @@ -63,7 +63,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class CustomUserChannel extends StatelessWidget { final String? image; diff --git a/lib/general_widgets/menu_item_tile.dart b/lib/general_widgets/menu_item_tile.dart index a7f0f5d09..cee230946 100644 --- a/lib/general_widgets/menu_item_tile.dart +++ b/lib/general_widgets/menu_item_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../ui/shared/colors.dart'; diff --git a/lib/general_widgets/no_connection_widget.dart b/lib/general_widgets/no_connection_widget.dart index 823421ed7..d747c8385 100644 --- a/lib/general_widgets/no_connection_widget.dart +++ b/lib/general_widgets/no_connection_widget.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class NoConnectionWidget extends StatelessWidget { const NoConnectionWidget( diff --git a/lib/general_widgets/status_icon.dart b/lib/general_widgets/status_icon.dart index d42236f4d..4dfce07fd 100644 --- a/lib/general_widgets/status_icon.dart +++ b/lib/general_widgets/status_icon.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class StatusIcon extends StatelessWidget { int count = 5; diff --git a/lib/general_widgets/unread_count.dart b/lib/general_widgets/unread_count.dart index dc326fe63..c5c68bad2 100644 --- a/lib/general_widgets/unread_count.dart +++ b/lib/general_widgets/unread_count.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class UnreadCount extends StatelessWidget { final int count; diff --git a/lib/main.dart b/lib/main.dart index 1164234b8..a4b8fa508 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/services/notification_service.dart'; -import 'package:hng/ui/shared/setup_bottom_sheet_ui.dart'; -import 'package:hng/ui/shared/setup_dialog_ui.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/services/notification_service.dart'; +import 'package:zurichat/ui/shared/setup_bottom_sheet_ui.dart'; +import 'package:zurichat/ui/shared/setup_dialog_ui.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/main_app_view_model.dart b/lib/main_app_view_model.dart index 30fec261f..b65cb0eae 100644 --- a/lib/main_app_view_model.dart +++ b/lib/main_app_view_model.dart @@ -1,6 +1,6 @@ import 'package:flutter/widgets.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/localization_service.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/localization_service.dart'; import 'package:stacked/stacked.dart'; class AppModel extends ReactiveViewModel { diff --git a/lib/package/base/jump_to_request/jump_to_api.dart b/lib/package/base/jump_to_request/jump_to_api.dart index 0f3c581aa..27d92b601 100644 --- a/lib/package/base/jump_to_request/jump_to_api.dart +++ b/lib/package/base/jump_to_request/jump_to_api.dart @@ -1,5 +1,5 @@ import 'package:dio/dio.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import '../../../app/app.locator.dart'; import '../../../app/app.logger.dart'; diff --git a/lib/package/base/server-request/api/api.dart b/lib/package/base/server-request/api/api.dart index f1ad81912..84fd91bc8 100644 --- a/lib/package/base/server-request/api/api.dart +++ b/lib/package/base/server-request/api/api.dart @@ -2,10 +2,10 @@ import 'dart:io'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/api_response.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/utilities/failures.dart'; +import 'package:zurichat/models/api_response.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/utilities/failures.dart'; abstract class Api { /// THIS IS THE API ABSTRACT CLASS FOR ZURI CHAT MOBILE diff --git a/lib/package/base/server-request/api/dio_interceptors.dart b/lib/package/base/server-request/api/dio_interceptors.dart index ec9c7f563..a6ea9c2c8 100644 --- a/lib/package/base/server-request/api/dio_interceptors.dart +++ b/lib/package/base/server-request/api/dio_interceptors.dart @@ -1,5 +1,5 @@ import 'package:dio/dio.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class DioInterceptor implements Interceptor { final log = getLogger("DioInterceptor"); diff --git a/lib/package/base/server-request/api/zuri_api.dart b/lib/package/base/server-request/api/zuri_api.dart index 49de98eb9..65da154bd 100644 --- a/lib/package/base/server-request/api/zuri_api.dart +++ b/lib/package/base/server-request/api/zuri_api.dart @@ -6,19 +6,19 @@ import 'dart:convert'; import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:http_parser/http_parser.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/api_response.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/models/channels_search_model.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/api_utils.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/failures.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/api_response.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/models/channels_search_model.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/api_utils.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/failures.dart'; import 'package:stacked_services/stacked_services.dart' hide FormData, MultipartFile; diff --git a/lib/package/base/server-request/channels/channels_api_service.dart b/lib/package/base/server-request/channels/channels_api_service.dart index 0ccd77187..bc88ac16c 100644 --- a/lib/package/base/server-request/channels/channels_api_service.dart +++ b/lib/package/base/server-request/channels/channels_api_service.dart @@ -1,9 +1,9 @@ import 'dart:async'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/models/pinned_message_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/models/pinned_message_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import '../../../../app/app.locator.dart'; import '../../../../app/app.logger.dart'; diff --git a/lib/package/base/server-request/dms/dms_api_service.dart b/lib/package/base/server-request/dms/dms_api_service.dart index abc85f3d6..c5a00ba25 100644 --- a/lib/package/base/server-request/dms/dms_api_service.dart +++ b/lib/package/base/server-request/dms/dms_api_service.dart @@ -1,5 +1,5 @@ -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import '../../../../app/app.locator.dart'; import '../../../../app/app.logger.dart'; diff --git a/lib/package/base/server-request/organization_request/organization_api_service.dart b/lib/package/base/server-request/organization_request/organization_api_service.dart index c122dca3d..93d3fe239 100644 --- a/lib/package/base/server-request/organization_request/organization_api_service.dart +++ b/lib/package/base/server-request/organization_request/organization_api_service.dart @@ -1,6 +1,6 @@ -import 'package:hng/models/organization_member_model.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/models/organization_member_model.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import '../../../../app/app.locator.dart'; import '../../../../app/app.logger.dart'; import '../../../../models/organization_model.dart'; diff --git a/lib/services/centrifuge_service.dart b/lib/services/centrifuge_service.dart index 75413cb74..ddf852bc0 100644 --- a/lib/services/centrifuge_service.dart +++ b/lib/services/centrifuge_service.dart @@ -3,12 +3,12 @@ import 'dart:convert'; import 'package:centrifuge/centrifuge.dart' as centrifuge; import 'package:centrifuge/centrifuge.dart'; -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; class CentrifugeService with ReactiveServiceMixin { diff --git a/lib/services/current_user_profile.dart b/lib/services/current_user_profile.dart index 0e4a84034..dc1412c52 100644 --- a/lib/services/current_user_profile.dart +++ b/lib/services/current_user_profile.dart @@ -1,10 +1,10 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/models/profile_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/models/profile_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked_services/stacked_services.dart'; import 'local_storage_services.dart'; diff --git a/lib/services/deep_link_service.dart b/lib/services/deep_link_service.dart index 65a91c4cf..b8812dbb8 100644 --- a/lib/services/deep_link_service.dart +++ b/lib/services/deep_link_service.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/utilities/utilities.dart'; import 'package:uni_links/uni_links.dart'; import 'package:flutter/services.dart' show PlatformException; diff --git a/lib/services/local_storage_services.dart b/lib/services/local_storage_services.dart index 5225d59eb..98323d4d8 100644 --- a/lib/services/local_storage_services.dart +++ b/lib/services/local_storage_services.dart @@ -1,7 +1,7 @@ import 'dart:convert'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/utilities/constants.dart'; class SharedPreferenceLocalStorage { static SharedPreferenceLocalStorage? _instance; diff --git a/lib/services/localization_service.dart b/lib/services/localization_service.dart index a4cdb59ca..d0fcdbf41 100644 --- a/lib/services/localization_service.dart +++ b/lib/services/localization_service.dart @@ -1,13 +1,13 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:intl/intl.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:stacked/stacked.dart'; import '../utilities/internalization/localization/app_localization.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; import 'package:observable_ish/observable_ish.dart'; /// List of languages codes that the app will support diff --git a/lib/services/media_service.dart b/lib/services/media_service.dart index e90161cd2..b36bbbced 100644 --- a/lib/services/media_service.dart +++ b/lib/services/media_service.dart @@ -1,11 +1,11 @@ import 'dart:io'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:image_picker/image_picker.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/shared.dart'; class MediaService { final ImagePicker _picker = ImagePicker(); diff --git a/lib/services/notification_service.dart b/lib/services/notification_service.dart index 5c299d35c..203e75d03 100644 --- a/lib/services/notification_service.dart +++ b/lib/services/notification_service.dart @@ -3,9 +3,9 @@ import 'dart:math'; import 'package:awesome_notifications/awesome_notifications.dart'; import 'package:flutter/material.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:stacked_services/stacked_services.dart'; class NotificationService { diff --git a/lib/services/user_service.dart b/lib/services/user_service.dart index c87b47ab2..2e8b11d69 100644 --- a/lib/services/user_service.dart +++ b/lib/services/user_service.dart @@ -1,7 +1,7 @@ //On login or signup the user service is used to save all the user details import 'dart:convert'; -import 'package:hng/models/user_model.dart'; +import 'package:zurichat/models/user_model.dart'; import '../app/app.locator.dart'; import '../models/organization_model.dart'; diff --git a/lib/ui/nav_pages/dm_page/dm_page.dart b/lib/ui/nav_pages/dm_page/dm_page.dart index abb11934e..202ded177 100644 --- a/lib/ui/nav_pages/dm_page/dm_page.dart +++ b/lib/ui/nav_pages/dm_page/dm_page.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../shared/search_bar.dart'; diff --git a/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart b/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart index 4cedc641b..dd2604298 100644 --- a/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart +++ b/lib/ui/nav_pages/dm_page/dm_page_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/services/local_storage_services.dart'; +import 'package:zurichat/services/local_storage_services.dart'; import '../../../app/app.locator.dart'; import '../../../app/app.router.dart'; diff --git a/lib/ui/nav_pages/dm_page/dm_search_find_page.dart b/lib/ui/nav_pages/dm_page/dm_search_find_page.dart index 30ab64015..9bb3680d1 100644 --- a/lib/ui/nav_pages/dm_page/dm_search_find_page.dart +++ b/lib/ui/nav_pages/dm_page/dm_search_find_page.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_chips_input/flutter_chips_input.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/nav_pages/dm_page/widgets/dmmessage_read.dart b/lib/ui/nav_pages/dm_page/widgets/dmmessage_read.dart index b2b6fd973..7315fe6c9 100644 --- a/lib/ui/nav_pages/dm_page/widgets/dmmessage_read.dart +++ b/lib/ui/nav_pages/dm_page/widgets/dmmessage_read.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class DMMessageRead extends StatelessWidget { const DMMessageRead({ diff --git a/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart b/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart index 27af0873b..39d1f5052 100644 --- a/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart +++ b/lib/ui/nav_pages/dm_page/widgets/dmmessage_unread.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/unread_count.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/unread_count.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class DMMessageUnread extends StatelessWidget { const DMMessageUnread({ diff --git a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart index f31a6724d..9c4d16fb9 100644 --- a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart +++ b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/nav_pages/drafted_messages_page/widgets/app/data.dart'; -import 'package:hng/ui/nav_pages/drafted_messages_page/widgets/app/drafted_item_widget.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/nav_pages/drafted_messages_page/widgets/app/data.dart'; +import 'package:zurichat/ui/nav_pages/drafted_messages_page/widgets/app/drafted_item_widget.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'drafted_message_page_viewmodel.dart'; diff --git a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart index 4d014b5fe..f04eaa3b8 100644 --- a/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart +++ b/lib/ui/nav_pages/drafted_messages_page/drafted_message_page_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart b/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart index 5201d0386..78bbf2d34 100644 --- a/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart +++ b/lib/ui/nav_pages/drafted_messages_page/widgets/app/data.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class DraftedItem { final String? username, message, time; diff --git a/lib/ui/nav_pages/home_page/home_item_model.dart b/lib/ui/nav_pages/home_page/home_item_model.dart index 686bde40f..1419313e8 100644 --- a/lib/ui/nav_pages/home_page/home_item_model.dart +++ b/lib/ui/nav_pages/home_page/home_item_model.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/utilities/enums.dart'; class HomeItemModel { final log = getLogger('HomeItemModel'); diff --git a/lib/ui/nav_pages/home_page/home_page.dart b/lib/ui/nav_pages/home_page/home_page.dart index ebbccf63f..df8a61a20 100644 --- a/lib/ui/nav_pages/home_page/home_page.dart +++ b/lib/ui/nav_pages/home_page/home_page.dart @@ -1,15 +1,15 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/general_widgets/easy_container.dart'; -import 'package:hng/ui/nav_pages/home_page/home_page_viewmodel.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_expanded.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/general_widgets/easy_container.dart'; +import 'package:zurichat/ui/nav_pages/home_page/home_page_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_expanded.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'widgets/home_list_items.dart'; diff --git a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart index bfbbf5ffa..13d446419 100644 --- a/lib/ui/nav_pages/home_page/home_page_viewmodel.dart +++ b/lib/ui/nav_pages/home_page/home_page_viewmodel.dart @@ -1,24 +1,24 @@ import 'dart:async'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/models/user_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; -import 'package:hng/services/centrifuge_service.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/notification_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/nav_pages/home_page/home_item_model.dart'; -import 'package:hng/ui/view/dm_chat_view/dm_jump_to_view.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/models/user_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; +import 'package:zurichat/services/centrifuge_service.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/notification_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/nav_pages/home_page/home_item_model.dart'; +import 'package:zurichat/ui/view/dm_chat_view/dm_jump_to_view.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart b/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart index 4c36d0b64..d116a51c5 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_channel_list_tile.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/unread_count.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/unread_count.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class CustomChannelListTile extends StatelessWidget { final String channelName; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart b/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart index a74caa1ce..6118092df 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_dm_list_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import '../home_page_viewmodel.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart b/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart index 3e1fc9e7d..21d2ab78b 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_homepage_section_title.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class CustomHomePageSectionTitle extends StatelessWidget { final String? title; diff --git a/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart b/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart index a1a220fc3..a3f4cca11 100644 --- a/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart +++ b/lib/ui/nav_pages/home_page/widgets/custom_plugin_list_tile.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/unread_count.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/general_widgets/unread_count.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class CustomPluginListTile extends StatelessWidget { final String? assetName; diff --git a/lib/ui/nav_pages/home_page/widgets/home_expanded.dart b/lib/ui/nav_pages/home_page/widgets/home_expanded.dart index a5eb56cd2..6112ff141 100644 --- a/lib/ui/nav_pages/home_page/widgets/home_expanded.dart +++ b/lib/ui/nav_pages/home_page/widgets/home_expanded.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; import '../home_item_model.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/home_list_items.dart b/lib/ui/nav_pages/home_page/widgets/home_list_items.dart index 1e3a46b71..1671837a6 100644 --- a/lib/ui/nav_pages/home_page/widgets/home_list_items.dart +++ b/lib/ui/nav_pages/home_page/widgets/home_list_items.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart b/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart index e623f0021..03316e4bc 100644 --- a/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart +++ b/lib/ui/nav_pages/home_page/widgets/zuri_logo.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../../../../utilities/constants.dart'; diff --git a/lib/ui/nav_pages/plugin_page/add_plugin_view.dart b/lib/ui/nav_pages/plugin_page/add_plugin_view.dart index 2b9a0bb2a..24b06e68c 100644 --- a/lib/ui/nav_pages/plugin_page/add_plugin_view.dart +++ b/lib/ui/nav_pages/plugin_page/add_plugin_view.dart @@ -1,12 +1,12 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -// import 'package:hng/ui/shared/styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +// import 'package:zurichat/ui/shared/styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; class AddPluginView extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart b/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart index a22697c0a..6c362ba14 100644 --- a/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart +++ b/lib/ui/nav_pages/plugin_page/edit_plugin_view.dart @@ -1,10 +1,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_appbar.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_appbar.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; import 'package:stacked/stacked.dart'; class EditPluginView extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart b/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart index 5aed8997e..cd71d101b 100644 --- a/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart +++ b/lib/ui/nav_pages/plugin_page/plugin_intro_page.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/shared/long_button.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; class PluginPageIntro extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/plugin_page_view.dart b/lib/ui/nav_pages/plugin_page/plugin_page_view.dart index 453d3dbb6..10d9c37b3 100644 --- a/lib/ui/nav_pages/plugin_page/plugin_page_view.dart +++ b/lib/ui/nav_pages/plugin_page/plugin_page_view.dart @@ -1,15 +1,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/menu_item_tile.dart'; -import 'package:hng/models/plugin_model.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/long_button.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/menu_item_tile.dart'; +import 'package:zurichat/models/plugin_model.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; class PluginPage extends StatelessWidget { diff --git a/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart b/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart index 3c5ddecf7..b0c2139aa 100644 --- a/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart +++ b/lib/ui/nav_pages/plugin_page/plugin_viewmodel.dart @@ -1,13 +1,13 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/plugin_model.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/icons.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/plugin_model.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/icons.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; class PluginViewModel extends BaseViewModel { final navigationService = locator(); - //TODO + //TODO // final local = AppLocalization.of(context); bool _editMode = false; bool _checked = false; diff --git a/lib/ui/nav_pages/plugin_page/plugins_view.dart b/lib/ui/nav_pages/plugin_page/plugins_view.dart index f21c6fa77..38b764f28 100644 --- a/lib/ui/nav_pages/plugin_page/plugins_view.dart +++ b/lib/ui/nav_pages/plugin_page/plugins_view.dart @@ -1,13 +1,13 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; import 'package:stacked/stacked.dart'; import '../../shared/colors.dart'; @@ -22,7 +22,6 @@ class PluginView extends StatelessWidget { builder: (BuildContext context, PluginViewModel model, Widget? child) { return Scaffold( appBar: ZuriAppBar( - isDarkMode: Theme.of(context).brightness == Brightness.dark, orgTitle: Text( Plugins, diff --git a/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart b/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart index b84113511..a7d60bca7 100644 --- a/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart +++ b/lib/ui/nav_pages/plugin_page/widgets/custom_appbar.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class CustomAppBars extends StatelessWidget implements PreferredSizeWidget { final String appbarTitle; diff --git a/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart b/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart index 33356dc9c..f864ddf76 100644 --- a/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart +++ b/lib/ui/nav_pages/you_page/widgets/profile_page_head.dart @@ -1,11 +1,16 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../../../shared/colors.dart'; class ProfilePageHead extends StatelessWidget { - const ProfilePageHead({Key? key, this.image, this.name, this.currentStatus, this.isActive = true}) + const ProfilePageHead( + {Key? key, + this.image, + this.name, + this.currentStatus, + this.isActive = true}) : super(key: key); final String? image; @@ -45,7 +50,9 @@ class ProfilePageHead extends StatelessWidget { child: Icon( Icons.circle, size: 15, - color: isActive ? AppColors.zuriPrimaryColor : AppColors.greyishColor, + color: isActive + ? AppColors.zuriPrimaryColor + : AppColors.greyishColor, ), ), ], diff --git a/lib/ui/nav_pages/you_page/widgets/status_form.dart b/lib/ui/nav_pages/you_page/widgets/status_form.dart index 4f8477400..5c1a7c561 100644 --- a/lib/ui/nav_pages/you_page/widgets/status_form.dart +++ b/lib/ui/nav_pages/you_page/widgets/status_form.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; class StatusForm extends StatelessWidget { const StatusForm({ diff --git a/lib/ui/nav_pages/you_page/you_page.dart b/lib/ui/nav_pages/you_page/you_page.dart index 292919964..16f18c5f6 100644 --- a/lib/ui/nav_pages/you_page/you_page.dart +++ b/lib/ui/nav_pages/you_page/you_page.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart index a8c4258f0..114c0bb13 100644 --- a/lib/ui/nav_pages/you_page/you_page_viewmodel.dart +++ b/lib/ui/nav_pages/you_page/you_page_viewmodel.dart @@ -1,18 +1,18 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/status_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/status_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/app/app.router.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/app/app.router.dart'; class YouPageViewModel extends ReactiveViewModel { final log = getLogger('YouPageViewModel'); diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart index 28923539a..1a8cb54ee 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart index 91c6fb340..282a1eeeb 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/custom_user_bottom_sheet_viewmodel.dart @@ -1,10 +1,10 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/user_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/user_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart index b6499d0d7..12c2a21cc 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/custom_button.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/enums.dart'; class CustomButton extends StatelessWidget { const CustomButton( diff --git a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart index a971c6e50..18f0fdc74 100644 --- a/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart +++ b/lib/ui/shared/bottom_sheets/custom_user_bottomsheet/widgets/profile_head.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import '../custom_user_bottom_sheet_viewmodel.dart'; diff --git a/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart b/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart index 81f1db511..1cafe2efc 100644 --- a/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart +++ b/lib/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart @@ -1,6 +1,6 @@ import 'package:emoji_picker_flutter/emoji_picker_flutter.dart'; import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import 'package:stacked_services/stacked_services.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart index accb9ef17..4483ca8de 100644 --- a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart index 9a94b8f45..0a2f66705 100644 --- a/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/profile_botton_sheet/custom_user_bottom_sheet_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/profile_botton_sheet/widgets/custom_profile_tile.dart b/lib/ui/shared/bottom_sheets/profile_botton_sheet/widgets/custom_profile_tile.dart index 01874068b..5315403a5 100644 --- a/lib/ui/shared/bottom_sheets/profile_botton_sheet/widgets/custom_profile_tile.dart +++ b/lib/ui/shared/bottom_sheets/profile_botton_sheet/widgets/custom_profile_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class CustomProfileTile extends StatelessWidget { const CustomProfileTile( diff --git a/lib/ui/shared/bottom_sheets/profile_botton_sheet/widgets/profile_head.dart b/lib/ui/shared/bottom_sheets/profile_botton_sheet/widgets/profile_head.dart index f53c4294a..2e05e3c01 100644 --- a/lib/ui/shared/bottom_sheets/profile_botton_sheet/widgets/profile_head.dart +++ b/lib/ui/shared/bottom_sheets/profile_botton_sheet/widgets/profile_head.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import '../../../colors.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart index fcac1775f..d9ba27e20 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart'; -import 'package:hng/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart index 1658cd91d..a8f6c1a89 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_botton_sheet_viewmodel.dart @@ -1,12 +1,12 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart index 0798c3248..b80f236ed 100644 --- a/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart +++ b/lib/ui/shared/bottom_sheets/sign_out_bottomsheet/widgets/work_space_display_info_view.dart @@ -1,7 +1,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class WorkSpaceDisplayInfo extends StatelessWidget { final String? imageUrl; diff --git a/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart b/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart index 5e9087bf5..97078aaf1 100644 --- a/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart +++ b/lib/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_option_bottomsheet_viewmodel.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_option_bottomsheet_viewmodel.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart b/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart index 181fd6f95..b8b1ed89b 100644 --- a/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart +++ b/lib/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked_services/stacked_services.dart'; import 'thread_options_bottomsheet/widget/recent_emojis.dart'; diff --git a/lib/ui/shared/dialogs.dart b/lib/ui/shared/dialogs.dart index 3999392bb..4a574bac5 100644 --- a/lib/ui/shared/dialogs.dart +++ b/lib/ui/shared/dialogs.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'shared.dart'; diff --git a/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart b/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart index b0cbd5ba8..0374d945e 100644 --- a/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart +++ b/lib/ui/shared/dialogs/delete_draft_alert_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; import 'package:stacked_services/stacked_services.dart'; class ShowAlertDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/delete_message.dart b/lib/ui/shared/dialogs/delete_message.dart index 4d63c3b8c..336cde012 100644 --- a/lib/ui/shared/dialogs/delete_message.dart +++ b/lib/ui/shared/dialogs/delete_message.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; class DeleteMessageDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart index 2d0b4a4ba..a40bb90b0 100644 --- a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart +++ b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart index cc421993d..8dd165d33 100644 --- a/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart +++ b/lib/ui/shared/dialogs/remind_me_dialog/remind_me_dialog_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/notification_service.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/notification_service.dart'; import 'package:intl/intl.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/shared/dialogs/schedule_channel_dialog.dart b/lib/ui/shared/dialogs/schedule_channel_dialog.dart index 45fe8c159..bfac8ee49 100644 --- a/lib/ui/shared/dialogs/schedule_channel_dialog.dart +++ b/lib/ui/shared/dialogs/schedule_channel_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/view/channel/channel_view/channel_page_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/view/channel/channel_view/channel_page_viewmodel.dart'; import 'package:stacked_services/stacked_services.dart'; class ScheduleMessChannel extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/schedule_dialog.dart b/lib/ui/shared/dialogs/schedule_dialog.dart index 5d4bcb8a3..29dd89e80 100644 --- a/lib/ui/shared/dialogs/schedule_dialog.dart +++ b/lib/ui/shared/dialogs/schedule_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/view/dm_user/dm_user_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/view/dm_user/dm_user_viewmodel.dart'; import 'package:stacked_services/stacked_services.dart'; class ScheduleMess extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/select_language_dialog.dart b/lib/ui/shared/dialogs/select_language_dialog.dart index db714973d..639079101 100644 --- a/lib/ui/shared/dialogs/select_language_dialog.dart +++ b/lib/ui/shared/dialogs/select_language_dialog.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked_services/stacked_services.dart'; import '../colors.dart'; diff --git a/lib/ui/shared/dialogs/select_theme_dialog.dart b/lib/ui/shared/dialogs/select_theme_dialog.dart index fd6f1bd55..bbf8e5238 100644 --- a/lib/ui/shared/dialogs/select_theme_dialog.dart +++ b/lib/ui/shared/dialogs/select_theme_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked_services/stacked_services.dart'; import '../colors.dart'; diff --git a/lib/ui/shared/dialogs/send_feedback_dialog.dart b/lib/ui/shared/dialogs/send_feedback_dialog.dart index cdfcf6ccf..bad03bbe2 100644 --- a/lib/ui/shared/dialogs/send_feedback_dialog.dart +++ b/lib/ui/shared/dialogs/send_feedback_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked_services/stacked_services.dart'; class SendFeedbackDialog extends StatelessWidget { @@ -41,7 +41,7 @@ class _SendFeedbackDialogContent extends StatelessWidget { height: size.height * .3, child: Column( children: [ - Align( + Align( alignment: Alignment.topLeft, child: Text( local!.composeFeedback, @@ -54,7 +54,8 @@ class _SendFeedbackDialogContent extends StatelessWidget { child: TextField( controller: controller, decoration: InputDecoration( - hintText: local.feedbackHint, helperText: local.feedbackHelperText), + hintText: local.feedbackHint, + helperText: local.feedbackHelperText), minLines: 1, maxLines: 5, ), diff --git a/lib/ui/shared/dialogs/sign_out_dialog.dart b/lib/ui/shared/dialogs/sign_out_dialog.dart index 61a649591..13838e021 100644 --- a/lib/ui/shared/dialogs/sign_out_dialog.dart +++ b/lib/ui/shared/dialogs/sign_out_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked_services/stacked_services.dart'; class SignOutDialog extends StatelessWidget { diff --git a/lib/ui/shared/dialogs/skin_tone_dialog.dart b/lib/ui/shared/dialogs/skin_tone_dialog.dart index 4a72cf8dc..549f73d9b 100644 --- a/lib/ui/shared/dialogs/skin_tone_dialog.dart +++ b/lib/ui/shared/dialogs/skin_tone_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:stacked_services/stacked_services.dart'; class SkinToneDialog extends StatelessWidget { diff --git a/lib/ui/shared/long_button.dart b/lib/ui/shared/long_button.dart index c29f2febb..5c0c7cd3f 100644 --- a/lib/ui/shared/long_button.dart +++ b/lib/ui/shared/long_button.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'shared.dart'; diff --git a/lib/ui/shared/search_bar.dart b/lib/ui/shared/search_bar.dart index 503b5cb48..c5d145460 100644 --- a/lib/ui/shared/search_bar.dart +++ b/lib/ui/shared/search_bar.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../general_widgets/easy_container.dart'; import '../../utilities/constants.dart'; diff --git a/lib/ui/shared/setup_bottom_sheet_ui.dart b/lib/ui/shared/setup_bottom_sheet_ui.dart index 354b7715f..afb8230cb 100644 --- a/lib/ui/shared/setup_bottom_sheet_ui.dart +++ b/lib/ui/shared/setup_bottom_sheet_ui.dart @@ -1,6 +1,6 @@ -import 'package:hng/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart'; -import 'package:hng/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart'; -import 'package:hng/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/emoji_picker_bottomsheet/emoji_picker_bottomsheet_view.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/sign_out_bottomsheet/sign_out_bottom_sheet_view.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/thread_options_bottomsheet/thread_options_bottomsheet_view.dart'; import '../../app/app.locator.dart'; import '../../utilities/enums.dart'; diff --git a/lib/ui/shared/setup_dialog_ui.dart b/lib/ui/shared/setup_dialog_ui.dart index 42029af78..2c1871f9a 100644 --- a/lib/ui/shared/setup_dialog_ui.dart +++ b/lib/ui/shared/setup_dialog_ui.dart @@ -1,10 +1,10 @@ import 'package:flutter/widgets.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart'; -import 'package:hng/ui/shared/dialogs/delete_draft_alert_dialog.dart'; -import 'package:hng/ui/shared/dialogs/schedule_dialog.dart'; -import 'package:hng/ui/shared/dialogs/sign_out_dialog.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/ui/shared/dialogs/remind_me_dialog/remind_me_dialog.dart'; +import 'package:zurichat/ui/shared/dialogs/delete_draft_alert_dialog.dart'; +import 'package:zurichat/ui/shared/dialogs/schedule_dialog.dart'; +import 'package:zurichat/ui/shared/dialogs/sign_out_dialog.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked_services/stacked_services.dart'; import 'dialogs/image_source_dialog.dart'; import 'dialogs/schedule_channel_dialog.dart'; diff --git a/lib/ui/shared/shared.dart b/lib/ui/shared/shared.dart index cf9a011f0..10d293a24 100644 --- a/lib/ui/shared/shared.dart +++ b/lib/ui/shared/shared.dart @@ -1,3 +1,3 @@ -export 'package:hng/ui/shared/colors.dart'; -export 'package:hng/utilities/constants.dart'; -export 'package:hng/ui/shared/ui_helpers.dart'; +export 'package:zurichat/ui/shared/colors.dart'; +export 'package:zurichat/utilities/constants.dart'; +export 'package:zurichat/ui/shared/ui_helpers.dart'; diff --git a/lib/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen.dart b/lib/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen.dart index bd733bf01..decb5d13d 100644 --- a/lib/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen.dart +++ b/lib/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen.dart @@ -3,9 +3,9 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:hng/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen_viewmodel.dart'; +import 'package:zurichat/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen_viewmodel.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import '../../colors.dart'; diff --git a/lib/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen_viewmodel.dart b/lib/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen_viewmodel.dart index ed459b347..6f5f1ad17 100644 --- a/lib/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen_viewmodel.dart +++ b/lib/ui/shared/smart_widgets/expandable_textfield/expandable_textfield_screen_viewmodel.dart @@ -1,7 +1,7 @@ import 'dart:io'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/media_service.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/media_service.dart'; import 'package:stacked/stacked.dart'; class ExpandableTextFieldScreenViewModel extends BaseViewModel { diff --git a/lib/ui/shared/smart_widgets/text_parser/text_parser_view.dart b/lib/ui/shared/smart_widgets/text_parser/text_parser_view.dart index b611a4fcd..148ce7bed 100644 --- a/lib/ui/shared/smart_widgets/text_parser/text_parser_view.dart +++ b/lib/ui/shared/smart_widgets/text_parser/text_parser_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_parsed_text/flutter_parsed_text.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import 'text_parser_viewmodel.dart'; diff --git a/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart b/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart index 5fb15a466..83f95feac 100644 --- a/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart +++ b/lib/ui/shared/smart_widgets/text_parser/text_parser_viewmodel.dart @@ -1,5 +1,5 @@ import 'package:flutter_parsed_text/flutter_parsed_text.dart'; -import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/utilities/utilities.dart'; import 'package:stacked/stacked.dart'; import '../../text_styles.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart b/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart index bde968365..eed553c6b 100644 --- a/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart +++ b/lib/ui/shared/smart_widgets/thread_card/thread_card_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'thread_card_viewmodel.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart b/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart index ed0f7be7e..50baf941f 100644 --- a/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart +++ b/lib/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -9,7 +9,7 @@ import '../../../../app/app.locator.dart'; import '../../../../app/app.router.dart'; import '../../../../models/user_post.dart'; import '../../../../utilities/enums.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class ThreadCardViewModel extends BaseViewModel { final _navigationService = locator(); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart index 0c409b0a8..5af1215d8 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; +import 'package:zurichat/models/user_post.dart'; class AudioMessage extends StatelessWidget { const AudioMessage({Key? key, required this.postAudioFiles}) diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/emojis.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/emojis.dart index d2ef030ab..2ccb9a32f 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/emojis.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/emojis.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../../../../../models/user_post.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart index 28d0a4521..6b77f2245 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/emojis_list.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; +import 'package:zurichat/models/user_post.dart'; import 'package:stacked/stacked.dart'; import '../thread_card_viewmodel.dart'; diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart index a288735ad..ef1f57f3e 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/media_files.dart @@ -1,6 +1,6 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; +import 'package:zurichat/models/user_post.dart'; class MediaFiles extends StatelessWidget { const MediaFiles({Key? key, required this.postMediaFiles}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart index 5208eb087..43aecf4f6 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/post_files_display.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/utilities.dart'; class PostFilesDisplay extends StatelessWidget { const PostFilesDisplay({Key? key, required this.postFiles}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart index d6c2c1196..782d0b9fe 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/post_replies.dart @@ -1,7 +1,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; import 'package:stacked/stacked.dart'; class PostReplies extends ViewModelWidget { diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart index 4b94827eb..10bbbb067 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/quoted_replies.dart @@ -1,8 +1,8 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class QuotedReplies extends StatelessWidget { const QuotedReplies({ diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart index e51ff3715..7a7dd1e36 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/snapshot_links.dart @@ -1,10 +1,10 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/utilities.dart'; class SnapshotLinks extends StatelessWidget { const SnapshotLinks({Key? key, required this.postSnapshotLinks}) diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart index e3027fecd..37f8e9ded 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_channel_main.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/widgets/audio_message.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import '../../../colors.dart'; @@ -17,7 +17,7 @@ import 'post_files_display.dart'; import 'post_replies.dart'; import 'quoted_replies.dart'; import 'snapshot_links.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class ThreadChannelMain extends ViewModelWidget { ThreadChannelMain(this.userPost, {Key? key}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart index 020f96dcc..4cf654a9f 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_detail.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; @@ -10,7 +10,7 @@ import '../../../text_styles.dart'; import '../../text_parser/text_parser_view.dart'; import '../thread_card_viewmodel.dart'; import 'emojis_list.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class ThreadCardDetail extends ViewModelWidget { ThreadCardDetail(this.userPost, {Key? key}) : super(key: key); diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart index 653398b89..48310f1bf 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_main.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; //Shows the original message with the number of replies diff --git a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart index cde328f98..31a76e422 100644 --- a/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart +++ b/lib/ui/shared/smart_widgets/thread_card/widgets/thread_card_post.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; @@ -8,7 +8,7 @@ import '../../../shared.dart'; import '../../../text_styles.dart'; import '../../text_parser/text_parser_view.dart'; import '../thread_card_viewmodel.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class ThreadCardPost extends ViewModelWidget { ThreadCardPost(this.userThreadPost, {Key? key}) : super(key: key); diff --git a/lib/ui/shared/text_field.dart b/lib/ui/shared/text_field.dart index 3f38b319b..f13101801 100644 --- a/lib/ui/shared/text_field.dart +++ b/lib/ui/shared/text_field.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; ///This is the text field with border ///Should accept only hint with no labels diff --git a/lib/ui/shared/text_styles.dart b/lib/ui/shared/text_styles.dart index 0e270908f..4f171dd1c 100644 --- a/lib/ui/shared/text_styles.dart +++ b/lib/ui/shared/text_styles.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class AppTextStyle { // static const double _size10 = 11; diff --git a/lib/ui/shared/zuri_appbar.dart b/lib/ui/shared/zuri_appbar.dart index 0638999f0..3ddd39f71 100644 --- a/lib/ui/shared/zuri_appbar.dart +++ b/lib/ui/shared/zuri_appbar.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/shared.dart'; // ignore: must_be_immutable class ZuriAppBar extends StatelessWidget implements PreferredSizeWidget { diff --git a/lib/ui/shared/zuri_loader.dart b/lib/ui/shared/zuri_loader.dart index dfdc6ea1c..351a92003 100644 --- a/lib/ui/shared/zuri_loader.dart +++ b/lib/ui/shared/zuri_loader.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class ZuriLoader extends StatefulWidget { final bool isTransparent; diff --git a/lib/ui/view/add_people/add_people_view.dart b/lib/ui/view/add_people/add_people_view.dart index f9df5b0b1..3d3f07929 100644 --- a/lib/ui/view/add_people/add_people_view.dart +++ b/lib/ui/view/add_people/add_people_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/advanced/advanced_view.dart b/lib/ui/view/advanced/advanced_view.dart index 4e10aa6c6..ea4012bba 100644 --- a/lib/ui/view/advanced/advanced_view.dart +++ b/lib/ui/view/advanced/advanced_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/view/channel/add_people/channel_add_people_view.dart b/lib/ui/view/channel/add_people/channel_add_people_view.dart index 4cc9cabcf..e83bdc434 100644 --- a/lib/ui/view/channel/add_people/channel_add_people_view.dart +++ b/lib/ui/view/channel/add_people/channel_add_people_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; @@ -24,160 +24,156 @@ class ChannelAddPeopleView extends StatelessWidget { Widget build(BuildContext context) { final local = AppLocalization.of(context); return ViewModelBuilder.reactive( - onModelReady: (model) => model.fetchOrganizationMembers(), - viewModelBuilder: () => ChannelAddPeopleViewModel(), - initialiseSpecialViewModelsOnce: true, - disposeViewModel: false, - builder: (context, viewModel, child) => Scaffold( - resizeToAvoidBottomInset: false, - appBar: ZuriAppBar( - orgTitle: Text( - viewModel.markedUsers.isNotEmpty - ? '${viewModel.markedUsers.length} ${local!.selected}' - : AddPeople, - style: AppTextStyle.darkGreySize20Bold, - ), - whiteBackground: true, - leading: Icons.clear, - leadingPress: () => viewModel.navigateBack(), - actions: [ - viewModel.isBusy - ? const ZuriLoader() - : Padding( - padding: const EdgeInsets.fromLTRB(0.0, 16.0, 20.0, 0.0), - child: InkWell( - child: Text( - Add, - style: GoogleFonts.lato( - color: AppColors.zuriPrimaryColor, - fontSize: 16.0), - ), - highlightColor: Colors.transparent, - splashColor: Colors.transparent, - onTap: () => - viewModel.addMarkedUsersToChannel(channelId), + onModelReady: (model) => model.fetchOrganizationMembers(), + viewModelBuilder: () => ChannelAddPeopleViewModel(), + initialiseSpecialViewModelsOnce: true, + disposeViewModel: false, + builder: (context, viewModel, child) => Scaffold( + resizeToAvoidBottomInset: false, + appBar: ZuriAppBar( + orgTitle: Text( + viewModel.markedUsers.isNotEmpty + ? '${viewModel.markedUsers.length} ${local!.selected}' + : AddPeople, + style: AppTextStyle.darkGreySize20Bold, + ), + whiteBackground: true, + leading: Icons.clear, + leadingPress: () => viewModel.navigateBack(), + actions: [ + viewModel.isBusy + ? const ZuriLoader() + : Padding( + padding: const EdgeInsets.fromLTRB(0.0, 16.0, 20.0, 0.0), + child: InkWell( + child: Text( + Add, + style: GoogleFonts.lato( + color: AppColors.zuriPrimaryColor, fontSize: 16.0), ), + highlightColor: Colors.transparent, + splashColor: Colors.transparent, + onTap: () => viewModel.addMarkedUsersToChannel(channelId), ), - ], - ), - body: Column( - children: [ - if (viewModel.users.isNotEmpty && !viewModel.isBusy) ...[ - const SizedBox(height: 24.0), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 20.0), - child: SearchField( - onChanged: viewModel.onSearchUser, - labelText: local!.searchPeople, ), + ], + ), + body: Column( + children: [ + if (viewModel.users.isNotEmpty && !viewModel.isBusy) ...[ + const SizedBox(height: 24.0), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 20.0), + child: SearchField( + onChanged: viewModel.onSearchUser, + labelText: local!.searchPeople, ), - if (viewModel.matchingUsers.isNotEmpty && - !viewModel.isBusy) ...[ - const SizedBox(height: 16.0), - const Divider(thickness: 2.0), - const SizedBox(height: 16.0), - Padding( - padding: const EdgeInsets.fromLTRB(20.0, 0.0, 12.0, 0.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - local.addEveryone, - style: GoogleFonts.lato( - color: AppColors.deepBlackColor, - fontWeight: FontWeight.bold, - ), + ), + if (viewModel.matchingUsers.isNotEmpty && !viewModel.isBusy) ...[ + const SizedBox(height: 16.0), + const Divider(thickness: 2.0), + const SizedBox(height: 16.0), + Padding( + padding: const EdgeInsets.fromLTRB(20.0, 0.0, 12.0, 0.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + local.addEveryone, + style: GoogleFonts.lato( + color: AppColors.deepBlackColor, + fontWeight: FontWeight.bold, ), - const SizedBox(height: 4.0), - Text( - local.everyoneWillBeAdded, - style: GoogleFonts.lato( - color: AppColors.greyishColor, - fontWeight: FontWeight.bold, - fontSize: 12.0, - ), + ), + const SizedBox(height: 4.0), + Text( + local.everyoneWillBeAdded, + style: GoogleFonts.lato( + color: AppColors.greyishColor, + fontWeight: FontWeight.bold, + fontSize: 12.0, ), - ], - ), - Transform.scale( - child: Checkbox( - onChanged: viewModel.onMarkAll, - side: const BorderSide(width: 0.96), - value: viewModel.allMarked, ), - scale: 1.512, + ], + ), + Transform.scale( + child: Checkbox( + onChanged: viewModel.onMarkAll, + side: const BorderSide(width: 0.96), + value: viewModel.allMarked, ), - ], - ), + scale: 1.512, + ), + ], ), - const SizedBox(height: 16.0), - const Divider(thickness: 2.0), - ] - ], - Expanded( - child: viewModel.users.isEmpty - ? const Center(child: ZuriLoader()) - : viewModel.isBusy - ? Center( - child: Text( - local!.addingMarkedUsers, - style: GoogleFonts.lato( - color: AppColors.deepBlackColor, - fontWeight: FontWeight.bold, - fontSize: 16.0, - ), + ), + const SizedBox(height: 16.0), + const Divider(thickness: 2.0), + ] + ], + Expanded( + child: viewModel.users.isEmpty + ? const Center(child: ZuriLoader()) + : viewModel.isBusy + ? Center( + child: Text( + local!.addingMarkedUsers, + style: GoogleFonts.lato( + color: AppColors.deepBlackColor, + fontWeight: FontWeight.bold, + fontSize: 16.0, ), - ) - : ListView.separated( - physics: const BouncingScrollPhysics(), - shrinkWrap: true, - padding: const EdgeInsets.fromLTRB( - 20.0, 25.0, 12.0, 25.0), - itemCount: viewModel.matchingUsers.length, - separatorBuilder: (context, index) => - const SizedBox(height: 24.0), - itemBuilder: (context, index) => ListTile( - onTap: () => viewModel.markOne( - !viewModel.markedUsers - .contains(viewModel.matchingUsers[index]), - index), - contentPadding: EdgeInsets.zero, - leading: CircleAvatar( - backgroundColor: AppColors.whiteColor, - backgroundImage: viewModel - .matchingUsers[index].imageUrl! - .startsWith("http") - ? NetworkImage( - '${viewModel.matchingUsers[index].imageUrl}', - ) as dynamic - : const AssetImage( - "assets/images/user.png"), - radius: 20.0, - ), - trailing: Transform.scale( - child: Checkbox( - value: viewModel.markedUsers - .contains(viewModel.matchingUsers[index]), - onChanged: (marked) => - viewModel.markOne(marked, index), - side: const BorderSide(width: 0.96), - ), - scale: 1.512, - ), - title: Text( - "${viewModel.matchingUsers[index].userName}", - style: GoogleFonts.lato( - color: AppColors.zuriTextBodyColor), + ), + ) + : ListView.separated( + physics: const BouncingScrollPhysics(), + shrinkWrap: true, + padding: + const EdgeInsets.fromLTRB(20.0, 25.0, 12.0, 25.0), + itemCount: viewModel.matchingUsers.length, + separatorBuilder: (context, index) => + const SizedBox(height: 24.0), + itemBuilder: (context, index) => ListTile( + onTap: () => viewModel.markOne( + !viewModel.markedUsers + .contains(viewModel.matchingUsers[index]), + index), + contentPadding: EdgeInsets.zero, + leading: CircleAvatar( + backgroundColor: AppColors.whiteColor, + backgroundImage: viewModel + .matchingUsers[index].imageUrl! + .startsWith("http") + ? NetworkImage( + '${viewModel.matchingUsers[index].imageUrl}', + ) as dynamic + : const AssetImage("assets/images/user.png"), + radius: 20.0, + ), + trailing: Transform.scale( + child: Checkbox( + value: viewModel.markedUsers + .contains(viewModel.matchingUsers[index]), + onChanged: (marked) => + viewModel.markOne(marked, index), + side: const BorderSide(width: 0.96), ), + scale: 1.512, + ), + title: Text( + "${viewModel.matchingUsers[index].userName}", + style: GoogleFonts.lato( + color: AppColors.zuriTextBodyColor), ), ), - ), - ], - ), + ), + ), + ], ), - ); + ), + ); } } diff --git a/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart b/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart index 33ef4a562..40b115e15 100644 --- a/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart +++ b/lib/ui/view/channel/add_people/channel_add_people_viewmodel.dart @@ -1,10 +1,10 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_info/channel_info_view.dart b/lib/ui/view/channel/channel_info/channel_info_view.dart index 180384b57..553192ac6 100644 --- a/lib/ui/view/channel/channel_info/channel_info_view.dart +++ b/lib/ui/view/channel/channel_info/channel_info_view.dart @@ -1,14 +1,14 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'channel_info_view_model.dart'; import 'widgets/first_section.dart'; diff --git a/lib/ui/view/channel/channel_info/channel_info_view_model.dart b/lib/ui/view/channel/channel_info/channel_info_view_model.dart index c4e2a3945..439c3bdd4 100644 --- a/lib/ui/view/channel/channel_info/channel_info_view_model.dart +++ b/lib/ui/view/channel/channel_info/channel_info_view_model.dart @@ -1,12 +1,12 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/view/channel/channel_members/channel_members_list.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/view/channel/channel_members/channel_members_list.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../../app/app.locator.dart'; @@ -24,11 +24,8 @@ class ChannelInfoViewModel extends BaseViewModel { final _dialogService = locator(); final log = getLogger('ChannelInfoViewModel'); - - bool notification = true; - String? channelName; String? _channelDescription; diff --git a/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart b/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart index 0bca3b799..e63d11104 100644 --- a/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart +++ b/lib/ui/view/channel/channel_info/widgets/custom_app_bar.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; Widget customAppBar(model) { return AppBar( diff --git a/lib/ui/view/channel/channel_info/widgets/edit_button.dart b/lib/ui/view/channel/channel_info/widgets/edit_button.dart index cf1f390a5..2aeebdf65 100644 --- a/lib/ui/view/channel/channel_info/widgets/edit_button.dart +++ b/lib/ui/view/channel/channel_info/widgets/edit_button.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../channel_info_view_model.dart'; diff --git a/lib/ui/view/channel/channel_info/widgets/fifth_section.dart b/lib/ui/view/channel/channel_info/widgets/fifth_section.dart index 8fc812ece..226da51ab 100644 --- a/lib/ui/view/channel/channel_info/widgets/fifth_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/fifth_section.dart @@ -2,8 +2,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../../../../shared/colors.dart'; class FifthSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/first_section.dart b/lib/ui/view/channel/channel_info/widgets/first_section.dart index 107f602b0..3e837526c 100644 --- a/lib/ui/view/channel/channel_info/widgets/first_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/first_section.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/ui_helpers.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/ui_helpers.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; import '../../../../shared/colors.dart'; class FirstSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/fourth_section.dart b/lib/ui/view/channel/channel_info/widgets/fourth_section.dart index 88b17fab5..2dc082482 100644 --- a/lib/ui/view/channel/channel_info/widgets/fourth_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/fourth_section.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; import 'new_row_tile.dart'; class FourthSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart b/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart index 7afec3634..ccb877eb8 100644 --- a/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart +++ b/lib/ui/view/channel/channel_info/widgets/new_row_tile.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class NewRowTile extends StatelessWidget { const NewRowTile({ diff --git a/lib/ui/view/channel/channel_info/widgets/second_section.dart b/lib/ui/view/channel/channel_info/widgets/second_section.dart index ca79f9842..e3e068cbb 100644 --- a/lib/ui/view/channel/channel_info/widgets/second_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/second_section.dart @@ -2,11 +2,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; import 'package:stacked/stacked.dart'; import '../../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/channel_info/widgets/seventh_section.dart b/lib/ui/view/channel/channel_info/widgets/seventh_section.dart index cbc8cd536..c51597dff 100644 --- a/lib/ui/view/channel/channel_info/widgets/seventh_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/seventh_section.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import '../../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/channel_info/widgets/sixth_section.dart b/lib/ui/view/channel/channel_info/widgets/sixth_section.dart index 4ae6c2631..1316c0997 100644 --- a/lib/ui/view/channel/channel_info/widgets/sixth_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/sixth_section.dart @@ -1,13 +1,13 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/ui_helpers.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/ui_helpers.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; import 'package:stacked/stacked.dart'; class SixthSection extends ViewModelWidget { @@ -41,20 +41,20 @@ class SixthSection extends ViewModelWidget { ), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - ArchiveChannel, - style: AppTextStyle.errorSize14, - ), - Container( - alignment: Alignment.center, - child: Text( - ArchiveChannelWarning, - style: AppTextStyle.darkGreySize14, - )), - ], - )), + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + ArchiveChannel, + style: AppTextStyle.errorSize14, + ), + Container( + alignment: Alignment.center, + child: Text( + ArchiveChannelWarning, + style: AppTextStyle.darkGreySize14, + )), + ], + )), UIHelper.horizontalSpaceMedium, UIHelper.horizontalSpaceSmall, Expanded( @@ -78,4 +78,4 @@ class SixthSection extends ViewModelWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/ui/view/channel/channel_info/widgets/third_section.dart b/lib/ui/view/channel/channel_info/widgets/third_section.dart index 872122662..c0c4a428d 100644 --- a/lib/ui/view/channel/channel_info/widgets/third_section.dart +++ b/lib/ui/view/channel/channel_info/widgets/third_section.dart @@ -2,13 +2,13 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; -import 'package:hng/ui/view/channel/channel_info/widgets/new_row_tile.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/ui/view/channel/channel_info/widgets/new_row_tile.dart'; import '../../../../shared/colors.dart'; class ThirdSection extends StatelessWidget { diff --git a/lib/ui/view/channel/channel_list/channels_view.dart b/lib/ui/view/channel/channel_list/channels_view.dart index 5f72e8c93..4407a883b 100644 --- a/lib/ui/view/channel/channel_list/channels_view.dart +++ b/lib/ui/view/channel/channel_list/channels_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:grouped_list/grouped_list.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/channel_list/channels_viewmodel.dart b/lib/ui/view/channel/channel_list/channels_viewmodel.dart index 1f09715f7..048906b3d 100644 --- a/lib/ui/view/channel/channel_list/channels_viewmodel.dart +++ b/lib/ui/view/channel/channel_list/channels_viewmodel.dart @@ -1,12 +1,12 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_members/channel_members_list.dart b/lib/ui/view/channel/channel_members/channel_members_list.dart index ffe8d1f79..b483dc6ee 100644 --- a/lib/ui/view/channel/channel_members/channel_members_list.dart +++ b/lib/ui/view/channel/channel_members/channel_members_list.dart @@ -1,14 +1,14 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_plugin_list_tile.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import '../../../shared/colors.dart'; import 'package:stacked/stacked.dart'; import '../shared_widgets.dart'; diff --git a/lib/ui/view/channel/channel_members/channel_members_list_model.dart b/lib/ui/view/channel/channel_members/channel_members_list_model.dart index 5f217f0cc..f5503c5ae 100644 --- a/lib/ui/view/channel/channel_members/channel_members_list_model.dart +++ b/lib/ui/view/channel/channel_members/channel_members_list_model.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/models/static_user_model.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/models/static_user_model.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_notification/channel_notification_view.dart b/lib/ui/view/channel/channel_notification/channel_notification_view.dart index 08ecb7f14..b3121671e 100644 --- a/lib/ui/view/channel/channel_notification/channel_notification_view.dart +++ b/lib/ui/view/channel/channel_notification/channel_notification_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'channel_notification_viewmodel.dart'; diff --git a/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart b/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart index f7b51d1d6..92b988572 100644 --- a/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart +++ b/lib/ui/view/channel/channel_notification/channel_notification_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; class ChannelNotificationViewModel extends BaseViewModel { diff --git a/lib/ui/view/channel/channel_search/channel_search_view.dart b/lib/ui/view/channel/channel_search/channel_search_view.dart index 8882645ac..2c7cd85ea 100644 --- a/lib/ui/view/channel/channel_search/channel_search_view.dart +++ b/lib/ui/view/channel/channel_search/channel_search_view.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'channel_search_view_model.dart'; @@ -37,8 +37,8 @@ class ChannelSearchPageView extends StatelessWidget { const EdgeInsets.symmetric(horizontal: 10, vertical: 30), child: TextFormField( // style: textStyling(), - decoration: - textFormFields('${local.searchPeopleOn} $channelName')), + decoration: textFormFields( + '${local.searchPeopleOn} $channelName')), ), const SizedBox(child: SearchResults()), diff --git a/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart b/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart index 628bf7cbc..2784ca539 100644 --- a/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart +++ b/lib/ui/view/channel/channel_search/widgets/app_bar_main.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'textfield_style.dart'; diff --git a/lib/ui/view/channel/channel_search/widgets/search_result.dart b/lib/ui/view/channel/channel_search/widgets/search_result.dart index 1a31751bb..32946533d 100644 --- a/lib/ui/view/channel/channel_search/widgets/search_result.dart +++ b/lib/ui/view/channel/channel_search/widgets/search_result.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../../../shared/shared.dart'; import '../../channel_info/widgets/textstyles.dart'; diff --git a/lib/ui/view/channel/channel_search/widgets/textfield_style.dart b/lib/ui/view/channel/channel_search/widgets/textfield_style.dart index 0f2391ee9..4ba79fdda 100644 --- a/lib/ui/view/channel/channel_search/widgets/textfield_style.dart +++ b/lib/ui/view/channel/channel_search/widgets/textfield_style.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; InputDecoration textFormFields(String hintText) { return InputDecoration( diff --git a/lib/ui/view/channel/channel_view/channel_page_view.dart b/lib/ui/view/channel/channel_view/channel_page_view.dart index cd39fae47..11a02b27a 100644 --- a/lib/ui/view/channel/channel_view/channel_page_view.dart +++ b/lib/ui/view/channel/channel_view/channel_page_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/no_connection_widget.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/channel/channel_view/widgets/channel_intro.dart'; -import 'package:hng/ui/view/expandable_textfield/expandable_textfield_screen.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/no_connection_widget.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/channel/channel_view/widgets/channel_intro.dart'; +import 'package:zurichat/ui/view/expandable_textfield/expandable_textfield_screen.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import '../../../shared/shared.dart'; @@ -74,10 +74,9 @@ class ChannelPageView extends StatelessWidget with $ChannelPageView { padding: const EdgeInsets.only(right: 5), child: IconButton( onPressed: () => model.navigateToChannelInfoScreen( - membersCount!, - ChannelModel(id: channelId!, name: channelName!), - channelName! - ), + membersCount!, + ChannelModel(id: channelId!, name: channelName!), + channelName!), icon: const Icon( Icons.info_outlined, color: AppColors.textLight10, diff --git a/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart b/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart index 209cf09a8..ebe71ab9c 100644 --- a/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart +++ b/lib/ui/view/channel/channel_view/channel_page_viewmodel.dart @@ -3,22 +3,22 @@ import 'dart:convert'; import 'dart:io'; import 'package:flutter/widgets.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/models/channel_model.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/centrifuge_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/media_service.dart'; -import 'package:hng/services/notification_service.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/models/channel_model.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/centrifuge_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/media_service.dart'; +import 'package:zurichat/services/notification_service.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:simple_moment/simple_moment.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/channel_view/widgets/channel_chat.dart b/lib/ui/view/channel/channel_view/widgets/channel_chat.dart index 16e0ddbba..3bf466508 100644 --- a/lib/ui/view/channel/channel_view/widgets/channel_chat.dart +++ b/lib/ui/view/channel/channel_view/widgets/channel_chat.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/thread_card_view.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/view/channel/channel_view/channel_page_viewmodel.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; -import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/thread_card_view.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/view/channel/channel_view/channel_page_viewmodel.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/utilities/utilities.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/channel/channel_view/widgets/channel_intro.dart b/lib/ui/view/channel/channel_view/widgets/channel_intro.dart index c1c7b64cc..35921af5e 100644 --- a/lib/ui/view/channel/channel_view/widgets/channel_intro.dart +++ b/lib/ui/view/channel/channel_view/widgets/channel_intro.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/smart_widgets/text_parser/text_parser_view.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../channel_page_viewmodel.dart'; diff --git a/lib/ui/view/channel/channel_view/widgets/check_user.dart b/lib/ui/view/channel/channel_view/widgets/check_user.dart index 85e3874da..af9ac865b 100644 --- a/lib/ui/view/channel/channel_view/widgets/check_user.dart +++ b/lib/ui/view/channel/channel_view/widgets/check_user.dart @@ -2,11 +2,11 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/view/channel/channel_info/widgets/textstyles.dart'; -import 'package:hng/ui/view/channel/channel_view/channel_page_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/view/channel/channel_info/widgets/textstyles.dart'; +import 'package:zurichat/ui/view/channel/channel_view/channel_page_viewmodel.dart'; import 'package:stacked/stacked.dart'; class CheckUser extends ViewModelWidget { diff --git a/lib/ui/view/channel/channel_view/widgets/message_tile.dart b/lib/ui/view/channel/channel_view/widgets/message_tile.dart index 99478cbf0..56f716a2f 100644 --- a/lib/ui/view/channel/channel_view/widgets/message_tile.dart +++ b/lib/ui/view/channel/channel_view/widgets/message_tile.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class MessageTile extends StatelessWidget { final String message, avatar, name, time; diff --git a/lib/ui/view/channel/edit_channel/edit_channel_view.dart b/lib/ui/view/channel/edit_channel/edit_channel_view.dart index 99c090d35..6968e82da 100644 --- a/lib/ui/view/channel/edit_channel/edit_channel_view.dart +++ b/lib/ui/view/channel/edit_channel/edit_channel_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart b/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart index 7aca58a77..eceb3c372 100644 --- a/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart +++ b/lib/ui/view/channel/edit_channel/edit_channel_view_model.dart @@ -1,8 +1,8 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/storage_keys.dart'; -// import 'package:hng/utilities/utilities.dart'; -// import 'package:hng/utilities/utilities.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; +// import 'package:zurichat/utilities/utilities.dart'; +// import 'package:zurichat/utilities/utilities.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart b/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart index f3e515d36..755df9647 100644 --- a/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart +++ b/lib/ui/view/channel/edit_channel/widgets/edit_channel_appbar.dart @@ -1,8 +1,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../edit_channel_view_model.dart'; class CustomAppBars extends StatelessWidget implements PreferredSizeWidget { diff --git a/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart b/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart index 56058b0fb..317cbeaeb 100644 --- a/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart +++ b/lib/ui/view/channel/edit_channel/widgets/edit_channel_headers.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class TextHeader extends StatelessWidget { final String headerText; diff --git a/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart b/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart index 8a822badc..e74ea1158 100644 --- a/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart +++ b/lib/ui/view/channel/edit_channel/widgets/edit_channel_text_field.dart @@ -1,6 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class TextBox extends StatelessWidget { final String hint; diff --git a/lib/ui/view/channel/new_channel/new_channel.dart b/lib/ui/view/channel/new_channel/new_channel.dart index 29e8a03ff..4f5e657bf 100644 --- a/lib/ui/view/channel/new_channel/new_channel.dart +++ b/lib/ui/view/channel/new_channel/new_channel.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart b/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart index 6d2c5f99b..471a413f2 100644 --- a/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart +++ b/lib/ui/view/channel/new_channel/new_channel_viewmodel.dart @@ -1,10 +1,10 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../../utilities/mixins/validators_mixin.dart'; import 'new_channel.form.dart'; diff --git a/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart b/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart index 0fb9d1847..9d58047e2 100644 --- a/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart +++ b/lib/ui/view/channel/pinned_messages/pinned_messages_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart b/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart index 001ca832f..a5f2ffd3d 100644 --- a/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart +++ b/lib/ui/view/channel/pinned_messages/pinned_messages_viewmodel.dart @@ -1,8 +1,8 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/models/pinned_message_model.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/models/pinned_message_model.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/share_message/share_message_hook.dart b/lib/ui/view/channel/share_message/share_message_hook.dart index 8e8af2c3c..090584caa 100644 --- a/lib/ui/view/channel/share_message/share_message_hook.dart +++ b/lib/ui/view/channel/share_message/share_message_hook.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/ui_helpers.dart'; -import 'package:hng/ui/view/channel/share_message/share_message_viewmodel.dart'; -import 'package:hng/ui/view/channel/share_message/widgets/select_channel_drop_down.dart'; -import 'package:hng/ui/view/channel/share_message/widgets/share_message_textfield.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/ui_helpers.dart'; +import 'package:zurichat/ui/view/channel/share_message/share_message_viewmodel.dart'; +import 'package:zurichat/ui/view/channel/share_message/widgets/select_channel_drop_down.dart'; +import 'package:zurichat/ui/view/channel/share_message/widgets/share_message_textfield.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; class ShareMessageHook extends HookViewModelWidget { diff --git a/lib/ui/view/channel/share_message/share_message_view.dart b/lib/ui/view/channel/share_message/share_message_view.dart index c26954096..bc2e4e2c3 100644 --- a/lib/ui/view/channel/share_message/share_message_view.dart +++ b/lib/ui/view/channel/share_message/share_message_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/ui/view/channel/share_message/share_message_hook.dart'; -import 'package:hng/ui/view/channel/share_message/share_message_viewmodel.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/view/channel/share_message/share_message_hook.dart'; +import 'package:zurichat/ui/view/channel/share_message/share_message_viewmodel.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; class ShareMessageView extends StatelessWidget { diff --git a/lib/ui/view/channel/share_message/share_message_viewmodel.dart b/lib/ui/view/channel/share_message/share_message_viewmodel.dart index a1cc9793f..92dd8c069 100644 --- a/lib/ui/view/channel/share_message/share_message_viewmodel.dart +++ b/lib/ui/view/channel/share_message/share_message_viewmodel.dart @@ -1,11 +1,11 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/nav_pages/home_page/home_item_model.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/nav_pages/home_page/home_item_model.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/channel/share_message/widgets/select_channel_drop_down.dart b/lib/ui/view/channel/share_message/widgets/select_channel_drop_down.dart index c5027ca4c..6cc2bbb3e 100644 --- a/lib/ui/view/channel/share_message/widgets/select_channel_drop_down.dart +++ b/lib/ui/view/channel/share_message/widgets/select_channel_drop_down.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/nav_pages/home_page/home_item_model.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/nav_pages/home_page/home_item_model.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class SelectChannelDropDown extends StatelessWidget { final List values; diff --git a/lib/ui/view/channel/share_message/widgets/share_message_textfield.dart b/lib/ui/view/channel/share_message/widgets/share_message_textfield.dart index d300c12f4..d2d3da943 100644 --- a/lib/ui/view/channel/share_message/widgets/share_message_textfield.dart +++ b/lib/ui/view/channel/share_message/widgets/share_message_textfield.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class ShareMessageTextField extends StatelessWidget { final TextEditingController controller; diff --git a/lib/ui/view/channel/widgets/channel_browser_container.dart b/lib/ui/view/channel/widgets/channel_browser_container.dart index 4ec71cea4..47a5a4333 100644 --- a/lib/ui/view/channel/widgets/channel_browser_container.dart +++ b/lib/ui/view/channel/widgets/channel_browser_container.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/view/channel/channel_list/channels_viewmodel.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/view/channel/channel_list/channels_viewmodel.dart'; import 'package:stacked/stacked.dart'; class ChannelBrowserContainer extends ViewModelWidget { diff --git a/lib/ui/view/clear_after/clear_after_view.dart b/lib/ui/view/clear_after/clear_after_view.dart index 716ea936e..cc511c516 100644 --- a/lib/ui/view/clear_after/clear_after_view.dart +++ b/lib/ui/view/clear_after/clear_after_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import '../../shared/shared.dart'; import 'package:stacked/stacked.dart'; import 'clear_after_viewmodel.dart'; diff --git a/lib/ui/view/clear_after/clear_after_viewmodel.dart b/lib/ui/view/clear_after/clear_after_viewmodel.dart index 44eaac794..7687e545d 100644 --- a/lib/ui/view/clear_after/clear_after_viewmodel.dart +++ b/lib/ui/view/clear_after/clear_after_viewmodel.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/clear_after/widget/date_and_time.dart b/lib/ui/view/clear_after/widget/date_and_time.dart index 4d357819d..998b10225 100644 --- a/lib/ui/view/clear_after/widget/date_and_time.dart +++ b/lib/ui/view/clear_after/widget/date_and_time.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class DateAndTime extends StatefulWidget { const DateAndTime({Key? key}) : super(key: key); diff --git a/lib/ui/view/clear_notification/clear_notification_view.dart b/lib/ui/view/clear_notification/clear_notification_view.dart index 3a1a2c1c4..be918eb7f 100644 --- a/lib/ui/view/clear_notification/clear_notification_view.dart +++ b/lib/ui/view/clear_notification/clear_notification_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'clear_notification_viewmodel.dart'; diff --git a/lib/ui/view/clear_notification/clear_notification_viewmodel.dart b/lib/ui/view/clear_notification/clear_notification_viewmodel.dart index 18cf7df65..3d8e0d09b 100644 --- a/lib/ui/view/clear_notification/clear_notification_viewmodel.dart +++ b/lib/ui/view/clear_notification/clear_notification_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/create_channel_view/create_channel_view.dart b/lib/ui/view/create_channel_view/create_channel_view.dart index 198a0ce34..a32d2ac8e 100644 --- a/lib/ui/view/create_channel_view/create_channel_view.dart +++ b/lib/ui/view/create_channel_view/create_channel_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/create_channel_view/create_channel_viewmodel.dart b/lib/ui/view/create_channel_view/create_channel_viewmodel.dart index 9f2299424..a1a7ea326 100644 --- a/lib/ui/view/create_channel_view/create_channel_viewmodel.dart +++ b/lib/ui/view/create_channel_view/create_channel_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/create_channel_view/widgets/custom_text_field.dart b/lib/ui/view/create_channel_view/widgets/custom_text_field.dart index 925c18bf0..6189eaee6 100644 --- a/lib/ui/view/create_channel_view/widgets/custom_text_field.dart +++ b/lib/ui/view/create_channel_view/widgets/custom_text_field.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class CustomTextField extends StatelessWidget { const CustomTextField({Key? key}) : super(key: key); diff --git a/lib/ui/view/direct_message/direct_message.dart b/lib/ui/view/direct_message/direct_message.dart index a612b36f4..2618a176d 100644 --- a/lib/ui/view/direct_message/direct_message.dart +++ b/lib/ui/view/direct_message/direct_message.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked_annotations.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import '../../../utilities/constants.dart'; import 'package:intl/intl.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/direct_message/direct_message_text_field_hook.dart b/lib/ui/view/direct_message/direct_message_text_field_hook.dart index 93ecb5d0a..9b2b82a5e 100644 --- a/lib/ui/view/direct_message/direct_message_text_field_hook.dart +++ b/lib/ui/view/direct_message/direct_message_text_field_hook.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; import 'direct_message_viewmodel.dart'; diff --git a/lib/ui/view/direct_message/direct_message_viewmodel.dart b/lib/ui/view/direct_message/direct_message_viewmodel.dart index f49564198..c20fdc250 100644 --- a/lib/ui/view/direct_message/direct_message_viewmodel.dart +++ b/lib/ui/view/direct_message/direct_message_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/dm_chat_view/dm_jump_to_view.dart b/lib/ui/view/dm_chat_view/dm_jump_to_view.dart index baa12caa1..29aa0d286 100644 --- a/lib/ui/view/dm_chat_view/dm_jump_to_view.dart +++ b/lib/ui/view/dm_chat_view/dm_jump_to_view.dart @@ -2,14 +2,14 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/custom_channel.dart'; -import 'package:hng/general_widgets/custom_user.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/custom_channel.dart'; +import 'package:zurichat/general_widgets/custom_user.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked/stacked.dart'; import 'dm_jump_to_view.form.dart'; diff --git a/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart b/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart index 66452982d..21b232495 100644 --- a/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart +++ b/lib/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../app/app.locator.dart'; diff --git a/lib/ui/view/dm_search/dm_search_view.dart b/lib/ui/view/dm_search/dm_search_view.dart index ecde9c1e4..c126103f7 100644 --- a/lib/ui/view/dm_search/dm_search_view.dart +++ b/lib/ui/view/dm_search/dm_search_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import 'dm_search_viewmodel.dart'; diff --git a/lib/ui/view/dm_search/dm_search_viewmodel.dart b/lib/ui/view/dm_search/dm_search_viewmodel.dart index 5ae48f8b7..5ea478e4a 100644 --- a/lib/ui/view/dm_search/dm_search_viewmodel.dart +++ b/lib/ui/view/dm_search/dm_search_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/dm_user/dm_user_view.dart b/lib/ui/view/dm_user/dm_user_view.dart index a3b6e32e0..921581890 100644 --- a/lib/ui/view/dm_user/dm_user_view.dart +++ b/lib/ui/view/dm_user/dm_user_view.dart @@ -1,12 +1,12 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:grouped_list/grouped_list.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/dm_user/widgets/custom_start_message.dart'; -import 'package:hng/ui/view/dm_user/widgets/group_separator.dart'; -import 'package:hng/ui/view/expandable_textfield/expandable_textfield_screen.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/dm_user/widgets/custom_start_message.dart'; +import 'package:zurichat/ui/view/dm_user/widgets/group_separator.dart'; +import 'package:zurichat/ui/view/expandable_textfield/expandable_textfield_screen.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import '../../shared/colors.dart'; @@ -64,7 +64,7 @@ class DmUserView extends StatelessWidget with $DmUserView { channelID: '', hintText: '${local!.messageButton} ${model.receiver.username}', textController: messageController, - sendMessage: ( message, media) { + sendMessage: (message, media) { model.sendMessage(); FocusScope.of(context).requestFocus(FocusNode()); _scrollController diff --git a/lib/ui/view/dm_user/dm_user_viewmodel.dart b/lib/ui/view/dm_user/dm_user_viewmodel.dart index e34070dd9..71dc18a8c 100644 --- a/lib/ui/view/dm_user/dm_user_viewmodel.dart +++ b/lib/ui/view/dm_user/dm_user_viewmodel.dart @@ -1,15 +1,15 @@ import 'dart:convert'; import 'dart:math'; import 'package:flutter/cupertino.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/view/dm_user/dummy_data/models/message.dart'; -import 'package:hng/ui/view/dm_user/dummy_data/models/user.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/view/dm_user/dummy_data/models/message.dart'; +import 'package:zurichat/ui/view/dm_user/dummy_data/models/user.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class DmUserViewModel extends FormViewModel { final navigationService = locator(); diff --git a/lib/ui/view/dm_user/dummy_data/models/message.dart b/lib/ui/view/dm_user/dummy_data/models/message.dart index 41944adcc..453d4a67f 100644 --- a/lib/ui/view/dm_user/dummy_data/models/message.dart +++ b/lib/ui/view/dm_user/dummy_data/models/message.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:intl/intl.dart'; import 'user.dart'; diff --git a/lib/ui/view/dm_user/dummy_data/models/user.dart b/lib/ui/view/dm_user/dummy_data/models/user.dart index 6df3ba7ad..48a8f6776 100644 --- a/lib/ui/view/dm_user/dummy_data/models/user.dart +++ b/lib/ui/view/dm_user/dummy_data/models/user.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class User { String name; diff --git a/lib/ui/view/dm_user/widgets/custom_start_message.dart b/lib/ui/view/dm_user/widgets/custom_start_message.dart index 6c829fd74..263d51ebd 100644 --- a/lib/ui/view/dm_user/widgets/custom_start_message.dart +++ b/lib/ui/view/dm_user/widgets/custom_start_message.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class StartMessage extends StatelessWidget { final String? userName; diff --git a/lib/ui/view/dm_user/widgets/custom_status.dart b/lib/ui/view/dm_user/widgets/custom_status.dart index 1cc5a8441..4bba8fe18 100644 --- a/lib/ui/view/dm_user/widgets/custom_status.dart +++ b/lib/ui/view/dm_user/widgets/custom_status.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/status_icon.dart'; +import 'package:zurichat/general_widgets/status_icon.dart'; class CustomStatus extends StatelessWidget { final bool isActive; diff --git a/lib/ui/view/dm_user/widgets/message_view.dart b/lib/ui/view/dm_user/widgets/message_view.dart index d6f3e2015..879fbd960 100644 --- a/lib/ui/view/dm_user/widgets/message_view.dart +++ b/lib/ui/view/dm_user/widgets/message_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:intl/intl.dart'; import '../dummy_data/models/message.dart'; diff --git a/lib/ui/view/dm_user/widgets/online_indicator.dart b/lib/ui/view/dm_user/widgets/online_indicator.dart index 1c081a603..d89d92ed2 100644 --- a/lib/ui/view/dm_user/widgets/online_indicator.dart +++ b/lib/ui/view/dm_user/widgets/online_indicator.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/colors.dart'; class OnlineIndicator extends StatelessWidget { const OnlineIndicator(int i, {Key? key}) : super(key: key); diff --git a/lib/ui/view/do_not_disturb/do_not_disturb_view.dart b/lib/ui/view/do_not_disturb/do_not_disturb_view.dart index 228551cb6..f7bd00105 100644 --- a/lib/ui/view/do_not_disturb/do_not_disturb_view.dart +++ b/lib/ui/view/do_not_disturb/do_not_disturb_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart b/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart index 3fcb4e266..ae43baa7f 100644 --- a/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart +++ b/lib/ui/view/do_not_disturb/do_not_disturb_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/draft/app/data.dart b/lib/ui/view/draft/app/data.dart index 51e0d1ad9..18b726cd0 100644 --- a/lib/ui/view/draft/app/data.dart +++ b/lib/ui/view/draft/app/data.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; class DraftedItem { final String? username, message, time; diff --git a/lib/ui/view/draft/app/drafted_item_widget.dart b/lib/ui/view/draft/app/drafted_item_widget.dart index f2d900ca1..b6f5f4969 100644 --- a/lib/ui/view/draft/app/drafted_item_widget.dart +++ b/lib/ui/view/draft/app/drafted_item_widget.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class DraftedItemWidget extends StatelessWidget { const DraftedItemWidget({ diff --git a/lib/ui/view/draft/draft_view.dart b/lib/ui/view/draft/draft_view.dart index d345d5977..b87c82964 100644 --- a/lib/ui/view/draft/draft_view.dart +++ b/lib/ui/view/draft/draft_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/draft/drafts.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/draft/drafts.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'draft_viewmodel.dart'; import 'package:flutter_slidable/flutter_slidable.dart'; @@ -30,10 +30,8 @@ class DraftView extends StatelessWidget { model.goBack(); }, orgTitle: Text( - local!.draft, - style: const TextStyle( - color:AppColors.blackColor - ), + local!.draft, + style: const TextStyle(color: AppColors.blackColor), ), ), body: model.widgetBuilderList.isNotEmpty @@ -105,22 +103,20 @@ class DraftView extends StatelessWidget { child: Padding( padding: EdgeInsets.all(8.r), child: Center( - child: - Text(local.draftMessageIntro, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 20.sp, - fontWeight: FontWeight.bold, - color: AppColors.blackColor, - )), + child: Text(local.draftMessageIntro, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 20.sp, + fontWeight: FontWeight.bold, + color: AppColors.blackColor, + )), ), ), ), SizedBox(height: 10.h), Center( child: Center( - child: Text( - local.draftIntroText, + child: Text(local.draftIntroText, textAlign: TextAlign.center, style: TextStyle( fontSize: 15.sp, diff --git a/lib/ui/view/draft/draft_viewmodel.dart b/lib/ui/view/draft/draft_viewmodel.dart index 3240b30c4..7c0430add 100644 --- a/lib/ui/view/draft/draft_viewmodel.dart +++ b/lib/ui/view/draft/draft_viewmodel.dart @@ -1,16 +1,16 @@ import 'dart:convert'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/draft_data_holder_model.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/draft_data_holder_model.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class DraftViewModel extends BaseViewModel { final _navigationService = locator(); diff --git a/lib/ui/view/draft/drafts.dart b/lib/ui/view/draft/drafts.dart index 5d0536546..3a70ca9c9 100644 --- a/lib/ui/view/draft/drafts.dart +++ b/lib/ui/view/draft/drafts.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_post.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/view/draft/draft_viewmodel.dart'; -import 'package:hng/ui/view/threads/test_data.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/view/draft/draft_viewmodel.dart'; +import 'package:zurichat/ui/view/threads/test_data.dart'; import 'package:intl/intl.dart'; class CustomListTile extends StatelessWidget { diff --git a/lib/ui/view/edit_profile/edit_profile_view.dart b/lib/ui/view/edit_profile/edit_profile_view.dart index 5a57ade56..2c7b2ce21 100644 --- a/lib/ui/view/edit_profile/edit_profile_view.dart +++ b/lib/ui/view/edit_profile/edit_profile_view.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/models/user_model.dart'; +import 'package:zurichat/models/user_model.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart index 86308d529..7bfc40b90 100644 --- a/lib/ui/view/edit_profile/edit_profile_viewmodel.dart +++ b/lib/ui/view/edit_profile/edit_profile_viewmodel.dart @@ -1,11 +1,11 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/user_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/user_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -55,9 +55,9 @@ class EditProfileViewModel extends BaseViewModel with ValidatorMixin { fullName = fullName.trim(); userModel ..firstName = - fullName.isNotEmpty ? fullName.split(" ").first : userModel.firstName + fullName.isNotEmpty ? fullName.split(" ").first : userModel.firstName ..lastName = - fullName.isNotEmpty ? fullName.split(" ").last : userModel.lastName + fullName.isNotEmpty ? fullName.split(" ").last : userModel.lastName ..displayName = displayName ..bio = bio ..phoneNumber = phone; @@ -102,4 +102,4 @@ class EditProfileViewModel extends BaseViewModel with ValidatorMixin { return false; } } -} \ No newline at end of file +} diff --git a/lib/ui/view/edit_profile/widget/edit_profile_body.dart b/lib/ui/view/edit_profile/widget/edit_profile_body.dart index af33a8247..fca629796 100644 --- a/lib/ui/view/edit_profile/widget/edit_profile_body.dart +++ b/lib/ui/view/edit_profile/widget/edit_profile_body.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -//import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +//import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../edit_profile_viewmodel.dart'; @@ -15,7 +15,6 @@ class Body extends ViewModelWidget { super(key: key, reactive: true); @override Widget build(BuildContext context, EditProfileViewModel viewModel) { - return Container( padding: EdgeInsets.symmetric( vertical: _size.height * 0.02, horizontal: _size.width * 0.05), @@ -92,4 +91,4 @@ class Body extends ViewModelWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart b/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart index 9b6d032df..3342241a5 100644 --- a/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart +++ b/lib/ui/view/expandable_textfield/expandable_textfield_screen.dart @@ -4,13 +4,13 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:hng/ui/view/expandable_textfield/widget/user_mentions.dart'; +import 'package:zurichat/ui/view/expandable_textfield/widget/user_mentions.dart'; import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart'; -import 'package:hng/ui/view/channel/channel_view/widgets/check_user.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart'; +import 'package:zurichat/ui/view/channel/channel_view/widgets/check_user.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import 'expandable_textfield_screen_viewmodel.dart'; diff --git a/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart b/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart index 7dbe360d3..963e6b7af 100644 --- a/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart +++ b/lib/ui/view/expandable_textfield/expandable_textfield_screen_viewmodel.dart @@ -1,11 +1,11 @@ import 'dart:io'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/media_service.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/media_service.dart'; +import 'package:zurichat/utilities/enums.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -90,7 +90,6 @@ class ExpandableTextFieldScreenViewModel extends BaseViewModel { notifyListeners(); } - void showMembersList(bool show) { matchedUsers = channelUsersList; _showMembers = show; @@ -114,6 +113,7 @@ class ExpandableTextFieldScreenViewModel extends BaseViewModel { notifyListeners(); } + void clearMediaList() { _mediaList.clear(); } diff --git a/lib/ui/view/expandable_textfield/widget/user_mentions.dart b/lib/ui/view/expandable_textfield/widget/user_mentions.dart index 1deb9f2e1..70182de85 100644 --- a/lib/ui/view/expandable_textfield/widget/user_mentions.dart +++ b/lib/ui/view/expandable_textfield/widget/user_mentions.dart @@ -1,7 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class MyStatelessWidget extends StatelessWidget { final ChannelMembermodel membersList; diff --git a/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart b/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart index 44a109d6e..a5c54dd29 100644 --- a/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart +++ b/lib/ui/view/feedback_alert_dialog/feed_back_dialog.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import '../../../general_widgets/app_alert_dialog.dart'; diff --git a/lib/ui/view/file_search/file_search_view.dart b/lib/ui/view/file_search/file_search_view.dart index 8c7b55d27..78e15f478 100644 --- a/lib/ui/view/file_search/file_search_view.dart +++ b/lib/ui/view/file_search/file_search_view.dart @@ -1,9 +1,9 @@ // ignore_for_file: prefer_typing_uninitialized_variables import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../shared/shared.dart'; diff --git a/lib/ui/view/file_search/widgets/search_bar.dart b/lib/ui/view/file_search/widgets/search_bar.dart index fee369c66..a44296580 100644 --- a/lib/ui/view/file_search/widgets/search_bar.dart +++ b/lib/ui/view/file_search/widgets/search_bar.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/file_search/widgets/tab_bar.dart b/lib/ui/view/file_search/widgets/tab_bar.dart index 54e17245f..5ed1c13ad 100644 --- a/lib/ui/view/file_search/widgets/tab_bar.dart +++ b/lib/ui/view/file_search/widgets/tab_bar.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart index 26a501ddf..f46588247 100644 --- a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart +++ b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart index e450b4f5e..677ca9be5 100644 --- a/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart +++ b/lib/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart @@ -1,13 +1,13 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.form.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_email/forgot_password_email_view.form.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart index 53441eaa1..a7ed2e995 100644 --- a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart +++ b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newview.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart index c15f868d4..ef5fb1e2d 100644 --- a/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart +++ b/lib/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart @@ -1,13 +1,13 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart index b3fc6c5d8..716076f7d 100644 --- a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart +++ b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpview.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart index 25525c83e..6a7f06a0a 100644 --- a/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart +++ b/lib/ui/view/forgot_password/forgot_password_otp/forgot_password_otpviewmodel.dart @@ -1,14 +1,14 @@ import 'dart:async'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/otp/otp_view.form.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/otp/otp_view.form.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/language_and_region/language_and_region_view.dart b/lib/ui/view/language_and_region/language_and_region_view.dart index 300c8d913..27c747454 100644 --- a/lib/ui/view/language_and_region/language_and_region_view.dart +++ b/lib/ui/view/language_and_region/language_and_region_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/view/language_and_region/language_and_region_viewmodel.dart b/lib/ui/view/language_and_region/language_and_region_viewmodel.dart index c39f4413d..efa1bbfc9 100644 --- a/lib/ui/view/language_and_region/language_and_region_viewmodel.dart +++ b/lib/ui/view/language_and_region/language_and_region_viewmodel.dart @@ -1,11 +1,11 @@ // ignore_for_file: avoid_print import 'package:flutter/widgets.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/main.dart'; -import 'package:hng/services/localization_service.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/extensions/locale_extension.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/main.dart'; +import 'package:zurichat/services/localization_service.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/extensions/locale_extension.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -41,7 +41,6 @@ class LanguageAndRegionModelViewModel extends BaseViewModel { currentValue = locales.indexOf(_localizationService.appLocale); final dialogResult = await _dialogService.showCustomDialog( variant: DialogType.selectLanguage, - data: {'languages': languages, 'currentValue': currentValue}, ); diff --git a/lib/ui/view/login/login_view.dart b/lib/ui/view/login/login_view.dart index 37806ce06..f0e9649e3 100644 --- a/lib/ui/view/login/login_view.dart +++ b/lib/ui/view/login/login_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/ui_helpers.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/ui_helpers.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/login/login_viewmodel.dart b/lib/ui/view/login/login_viewmodel.dart index cf63cd17c..3cc81b47f 100644 --- a/lib/ui/view/login/login_viewmodel.dart +++ b/lib/ui/view/login/login_viewmodel.dart @@ -1,9 +1,9 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/user_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/user_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/nav_bar/nav_bar_view.dart b/lib/ui/view/nav_bar/nav_bar_view.dart index 2c2407d9b..c06583579 100644 --- a/lib/ui/view/nav_bar/nav_bar_view.dart +++ b/lib/ui/view/nav_bar/nav_bar_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_intro_page.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_intro_page.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/svg_icon.dart'; diff --git a/lib/ui/view/notifications/notifications_view.dart b/lib/ui/view/notifications/notifications_view.dart index e347eaff3..81b0ef34f 100644 --- a/lib/ui/view/notifications/notifications_view.dart +++ b/lib/ui/view/notifications/notifications_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/menu_item_tile.dart'; +import 'package:zurichat/general_widgets/menu_item_tile.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'notifications_viewmodel.dart'; diff --git a/lib/ui/view/notifications/notifications_viewmodel.dart b/lib/ui/view/notifications/notifications_viewmodel.dart index ae2eb6968..a4d54fe94 100644 --- a/lib/ui/view/notifications/notifications_viewmodel.dart +++ b/lib/ui/view/notifications/notifications_viewmodel.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/onboarding/onboading_view.dart b/lib/ui/view/onboarding/onboading_view.dart index 58edab64b..49bc0ab6f 100644 --- a/lib/ui/view/onboarding/onboading_view.dart +++ b/lib/ui/view/onboarding/onboading_view.dart @@ -2,9 +2,9 @@ import 'dart:core'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:page_view_dot_indicator/page_view_dot_indicator.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/organization/add_organization/add_organization_view.dart b/lib/ui/view/organization/add_organization/add_organization_view.dart index 55af19ac4..f3faf2f17 100644 --- a/lib/ui/view/organization/add_organization/add_organization_view.dart +++ b/lib/ui/view/organization/add_organization/add_organization_view.dart @@ -1,14 +1,14 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'add_organization_viewmodel.dart'; diff --git a/lib/ui/view/organization/create_organization/company.dart b/lib/ui/view/organization/create_organization/company.dart index 783c45bc8..36ed79ed7 100644 --- a/lib/ui/view/organization/create_organization/company.dart +++ b/lib/ui/view/organization/create_organization/company.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import '../../../shared/colors.dart'; import '../../../shared/long_button.dart'; import '../../../shared/text_field.dart'; diff --git a/lib/ui/view/organization/create_organization/create_organization.dart b/lib/ui/view/organization/create_organization/create_organization.dart index 7d10e1f09..f400a1f62 100644 --- a/lib/ui/view/organization/create_organization/create_organization.dart +++ b/lib/ui/view/organization/create_organization/create_organization.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'create_organization_viewmodel.dart'; import 'company.dart'; diff --git a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart index 5d87f135c..c61440465 100644 --- a/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart +++ b/lib/ui/view/organization/create_organization/create_organization_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/create_organization/invite.dart b/lib/ui/view/organization/create_organization/invite.dart index 64ea91df3..bf98a0cb7 100644 --- a/lib/ui/view/organization/create_organization/invite.dart +++ b/lib/ui/view/organization/create_organization/invite.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/organization/create_organization/project.dart b/lib/ui/view/organization/create_organization/project.dart index 423714bd0..61f1d4777 100644 --- a/lib/ui/view/organization/create_organization/project.dart +++ b/lib/ui/view/organization/create_organization/project.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; diff --git a/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart b/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart index bad1e4110..7ea863cf9 100644 --- a/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart +++ b/lib/ui/view/organization/email_confirmation/email_confirmation_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'email_confirmation_viewmodel.dart'; diff --git a/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart b/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart index 5bc4c95ea..d147a7ca1 100644 --- a/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart +++ b/lib/ui/view/organization/email_confirmation/email_confirmation_viewmodel.dart @@ -2,8 +2,8 @@ import 'dart:io'; // ignore: import_of_legacy_library_into_null_safe import 'package:flutter_appavailability/flutter_appavailability.dart'; -import 'package:hng/app/app.logger.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/app/app.logger.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart b/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart index 1b1327d1f..ed89a442c 100644 --- a/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart +++ b/lib/ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; class CreateInviteLink extends StatelessWidget { diff --git a/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart b/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart index 419bf2e02..26866a6e0 100644 --- a/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart +++ b/lib/ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; class InviteViaEmailAdmin extends StatelessWidget { diff --git a/lib/ui/view/organization/invite_to_organization/invitation_sent.dart b/lib/ui/view/organization/invite_to_organization/invitation_sent.dart index b5a2afa8d..b01506943 100644 --- a/lib/ui/view/organization/invite_to_organization/invitation_sent.dart +++ b/lib/ui/view/organization/invite_to_organization/invitation_sent.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:hng/ui/shared/long_button.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/ui_helpers.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/ui_helpers.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; class InvitationSent extends StatelessWidget { diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart b/lib/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart index c16ccda86..5475822cf 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/widgets/custom_search_field.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../invite_via_email/invite_viewmodel.dart'; diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart index 2766870a4..5b5ca7389 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; import 'invite_via_email.form.dart'; diff --git a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart index 24543d5ea..80dd96b6c 100644 --- a/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart +++ b/lib/ui/view/organization/invite_to_organization/invite_via_email/invite_viewmodel.dart @@ -1,13 +1,13 @@ import 'package:dio/dio.dart'; import 'package:stacked/stacked.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import '../../../../../../app/app.logger.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/new_email/new_email.dart b/lib/ui/view/organization/new_email/new_email.dart index 8bcddec6a..517ef00a9 100644 --- a/lib/ui/view/organization/new_email/new_email.dart +++ b/lib/ui/view/organization/new_email/new_email.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; diff --git a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart index f41bb0366..0030e0412 100644 --- a/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart +++ b/lib/ui/view/organization/organization_different_email/different_email_organization_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/text_field.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_field.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart b/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart index c65aa341b..94657c1bf 100644 --- a/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_different_email/different_email_organization_viewmodel.dart @@ -1,8 +1,8 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/organization_settings/organization_icon.dart b/lib/ui/view/organization/organization_settings/organization_icon.dart index 697503800..10870180d 100644 --- a/lib/ui/view/organization/organization_settings/organization_icon.dart +++ b/lib/ui/view/organization/organization_settings/organization_icon.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/long_button.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/ui/view/organization/organization_settings/organization_settings_view_model.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view_model.dart'; class OrganizationLogo extends StatelessWidget { final OrganizationModel org; diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart index 08719588b..22b35c77a 100644 --- a/lib/ui/view/organization/organization_settings/organization_name_url.dart +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -1,13 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/view/organization/organization_settings/organization_settings_view_model.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_field.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view_model.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_field.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:stacked_hooks/stacked_hooks.dart'; class OrganizationNameUrl diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart index 6e86af9e0..da83bfc91 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'organization_settings_view_model.dart'; diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart index 79bb3c626..949246256 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart @@ -2,15 +2,15 @@ import 'dart:io'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/media_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/mixins/validators_mixin.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/media_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/mixins/validators_mixin.dart'; import '../../../../app/app.logger.dart'; class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { diff --git a/lib/ui/view/organization/organization_url/organization_url_view.dart b/lib/ui/view/organization/organization_url/organization_url_view.dart index 56956a083..3a0084f2e 100644 --- a/lib/ui/view/organization/organization_url/organization_url_view.dart +++ b/lib/ui/view/organization/organization_url/organization_url_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import '../../../shared/shared.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/organization/organization_view/organization_view.dart b/lib/ui/view/organization/organization_view/organization_view.dart index 806f70537..73cd02d50 100644 --- a/lib/ui/view/organization/organization_view/organization_view.dart +++ b/lib/ui/view/organization/organization_view/organization_view.dart @@ -1,10 +1,10 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/models/organization_model.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/models/organization_model.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../../models/organization_model.dart'; import '../../../shared/shared.dart'; diff --git a/lib/ui/view/organization/organization_view/organization_viewmodel.dart b/lib/ui/view/organization/organization_view/organization_viewmodel.dart index cf1272545..1e7a295ef 100644 --- a/lib/ui/view/organization/organization_view/organization_viewmodel.dart +++ b/lib/ui/view/organization/organization_view/organization_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/nav_pages/home_page/widgets/home_list_items.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/nav_pages/home_page/widgets/home_list_items.dart'; +import 'package:zurichat/ui/shared/colors.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/organization/select_email/select_email_view.dart b/lib/ui/view/organization/select_email/select_email_view.dart index 01025b9e8..5f14b07e9 100644 --- a/lib/ui/view/organization/select_email/select_email_view.dart +++ b/lib/ui/view/organization/select_email/select_email_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../../utilities/enums.dart'; diff --git a/lib/ui/view/organization/select_email/select_email_viewmodel.dart b/lib/ui/view/organization/select_email/select_email_viewmodel.dart index 4cf8aad2d..6f1489583 100644 --- a/lib/ui/view/organization/select_email/select_email_viewmodel.dart +++ b/lib/ui/view/organization/select_email/select_email_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -70,4 +70,4 @@ class SelectEmailViewModel extends BaseViewModel { return local!.joinWorkspace; } } -} \ No newline at end of file +} diff --git a/lib/ui/view/otp/otp_view.dart b/lib/ui/view/otp/otp_view.dart index fe1677be1..866925359 100644 --- a/lib/ui/view/otp/otp_view.dart +++ b/lib/ui/view/otp/otp_view.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/otp/otp_viewmodel.dart b/lib/ui/view/otp/otp_viewmodel.dart index ef8c3808a..b1448298f 100644 --- a/lib/ui/view/otp/otp_viewmodel.dart +++ b/lib/ui/view/otp/otp_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/password_recovery/new_password.dart b/lib/ui/view/password_recovery/new_password.dart index 7febd3c53..9fafdab81 100644 --- a/lib/ui/view/password_recovery/new_password.dart +++ b/lib/ui/view/password_recovery/new_password.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/general_widgets/custom_textfield.dart'; -import 'package:hng/ui/view/password_recovery/recovery_viewmodel.dart'; +import 'package:zurichat/general_widgets/custom_textfield.dart'; +import 'package:zurichat/ui/view/password_recovery/recovery_viewmodel.dart'; import 'package:stacked/stacked.dart'; class NewPassView extends StatelessWidget { diff --git a/lib/ui/view/password_recovery/recovery_view.dart b/lib/ui/view/password_recovery/recovery_view.dart index 3392d6deb..47bd3d341 100644 --- a/lib/ui/view/password_recovery/recovery_view.dart +++ b/lib/ui/view/password_recovery/recovery_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:stacked/stacked.dart'; -import 'package:hng/general_widgets/custom_textfield.dart'; -import 'package:hng/ui/view/password_recovery/recovery_viewmodel.dart'; +import 'package:zurichat/general_widgets/custom_textfield.dart'; +import 'package:zurichat/ui/view/password_recovery/recovery_viewmodel.dart'; class ForgotPassView extends StatelessWidget { const ForgotPassView({Key? key}) : super(key: key); diff --git a/lib/ui/view/popup_notification/popup_notification.dart b/lib/ui/view/popup_notification/popup_notification.dart index 1112dcdeb..9aa08dac7 100644 --- a/lib/ui/view/popup_notification/popup_notification.dart +++ b/lib/ui/view/popup_notification/popup_notification.dart @@ -1,8 +1,8 @@ // import 'dart:ui'; import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/view/popup_notification/popup_notification_viewmodel.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/view/popup_notification/popup_notification_viewmodel.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/preference/preference_view.dart b/lib/ui/view/preference/preference_view.dart index 4664e4105..7e5eca93f 100644 --- a/lib/ui/view/preference/preference_view.dart +++ b/lib/ui/view/preference/preference_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../general_widgets/menu_item_tile.dart'; diff --git a/lib/ui/view/preference/preference_viewmodel.dart b/lib/ui/view/preference/preference_viewmodel.dart index 6aa66a183..f194c682d 100644 --- a/lib/ui/view/preference/preference_viewmodel.dart +++ b/lib/ui/view/preference/preference_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/zuri_theme_service.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/zuri_theme_service.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/profile_page/profile_page_viewmodel.dart b/lib/ui/view/profile_page/profile_page_viewmodel.dart index c3365f83c..e45266868 100644 --- a/lib/ui/view/profile_page/profile_page_viewmodel.dart +++ b/lib/ui/view/profile_page/profile_page_viewmodel.dart @@ -3,7 +3,7 @@ this is the view model i created to run my test, the dev in charge can delete if he sees fit */ -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; // import 'package:image_gallery_saver/image_gallery_saver.dart'; // import 'package:permission_handler/permission_handler.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/view/saved_items/saved_items_view.dart b/lib/ui/view/saved_items/saved_items_view.dart index 910cfa806..5b3abaf1b 100644 --- a/lib/ui/view/saved_items/saved_items_view.dart +++ b/lib/ui/view/saved_items/saved_items_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/colors.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'saved_items_viewmodel.dart'; import 'widgets/saved_item_background.dart'; diff --git a/lib/ui/view/saved_items/saved_items_viewmodel.dart b/lib/ui/view/saved_items/saved_items_viewmodel.dart index 1c635ee7d..4ba85708c 100644 --- a/lib/ui/view/saved_items/saved_items_viewmodel.dart +++ b/lib/ui/view/saved_items/saved_items_viewmodel.dart @@ -1,13 +1,13 @@ import 'dart:convert'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/saved_item_model.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/saved_item_model.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; class SavedItemsViewModel extends BaseViewModel { final _navigationService = locator(); diff --git a/lib/ui/view/saved_items/widgets/saved_item_background.dart b/lib/ui/view/saved_items/widgets/saved_item_background.dart index 5e1513f7f..4f3d08e58 100644 --- a/lib/ui/view/saved_items/widgets/saved_item_background.dart +++ b/lib/ui/view/saved_items/widgets/saved_item_background.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/colors.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/colors.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; class SavedItemBackground extends StatelessWidget { const SavedItemBackground({ diff --git a/lib/ui/view/set_status/set_status_view.dart b/lib/ui/view/set_status/set_status_view.dart index 4fbb97f5c..1a06f3513 100644 --- a/lib/ui/view/set_status/set_status_view.dart +++ b/lib/ui/view/set_status/set_status_view.dart @@ -1,17 +1,17 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/ui/view/set_status/set_status_viewmodel.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/view/set_status/set_status_viewmodel.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; -import 'package:hng/ui/shared/shared.dart'; -import 'package:hng/ui/view/set_status/widgets/status.dart'; -import 'package:hng/ui/view/set_status/widgets/statuses.dart'; -import 'package:hng/ui/view/set_status/set_status_view.form.dart'; +import 'package:zurichat/ui/shared/shared.dart'; +import 'package:zurichat/ui/view/set_status/widgets/status.dart'; +import 'package:zurichat/ui/view/set_status/widgets/statuses.dart'; +import 'package:zurichat/ui/view/set_status/set_status_view.form.dart'; @FormView( fields: [ @@ -23,7 +23,6 @@ class SetStatusView extends StatelessWidget with $SetStatusView { @override Widget build(BuildContext context) { return ViewModelBuilder.reactive( - //TODO: onModelReady to be reviewed in next PR // onModelReady: (model) => listenToFormUpdated(model), builder: (context, model, child) => ModalProgressHUD( @@ -32,22 +31,18 @@ class SetStatusView extends StatelessWidget with $SetStatusView { progressIndicator: const ZuriLoader(), child: Scaffold( appBar: ZuriAppBar( - leading: Icons.close_rounded, leadingPress: () => model.exitPage(), orgTitle: Text( 'Set a status', - style: AppTextStyles.heading4.copyWith( - color: Theme.of(context).textTheme.bodyText1!.color, - - ), + style: AppTextStyle.darkGreySize20Bold ), actions: [ TextButton( onPressed: model.saveStatus, child: Text( Save, - style: AppTextStyles.heading8, + style: AppTextStyle.greenSize16, ), ) ], diff --git a/lib/ui/view/set_status/set_status_viewmodel.dart b/lib/ui/view/set_status/set_status_viewmodel.dart index b91c7c909..9c93823d0 100644 --- a/lib/ui/view/set_status/set_status_viewmodel.dart +++ b/lib/ui/view/set_status/set_status_viewmodel.dart @@ -1,15 +1,15 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/status_service.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/enums.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/status_service.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/enums.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/app/app.logger.dart'; class SetStatusViewModel extends ReactiveViewModel { final _navigationService = locator(); diff --git a/lib/ui/view/sign_up/sign_up_view.dart b/lib/ui/view/sign_up/sign_up_view.dart index f924034a8..5e4e1c34f 100644 --- a/lib/ui/view/sign_up/sign_up_view.dart +++ b/lib/ui/view/sign_up/sign_up_view.dart @@ -1,11 +1,11 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/general_widgets/custom_textfield.dart'; -import 'package:hng/ui/shared/long_button.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/general_widgets/custom_textfield.dart'; +import 'package:zurichat/ui/shared/long_button.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:modal_progress_hud_nsn/modal_progress_hud_nsn.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/sign_up/sign_up_viewmodel.dart b/lib/ui/view/sign_up/sign_up_viewmodel.dart index 8b4cf1ef4..951d01a4d 100644 --- a/lib/ui/view/sign_up/sign_up_viewmodel.dart +++ b/lib/ui/view/sign_up/sign_up_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import '../../../app/app.locator.dart'; diff --git a/lib/ui/view/splashscreen/splashscreen.dart b/lib/ui/view/splashscreen/splashscreen.dart index 5c2c6c094..bc7ddf229 100644 --- a/lib/ui/view/splashscreen/splashscreen.dart +++ b/lib/ui/view/splashscreen/splashscreen.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import 'package:stacked/stacked.dart'; import 'splashscreen_viewmodel.dart'; diff --git a/lib/ui/view/splashscreen/splashscreen_viewmodel.dart b/lib/ui/view/splashscreen/splashscreen_viewmodel.dart index e7ca0c58b..cf34ee813 100644 --- a/lib/ui/view/splashscreen/splashscreen_viewmodel.dart +++ b/lib/ui/view/splashscreen/splashscreen_viewmodel.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/start_dm/start_dm_view.dart b/lib/ui/view/start_dm/start_dm_view.dart index 99813aa24..1e8d8fec7 100644 --- a/lib/ui/view/start_dm/start_dm_view.dart +++ b/lib/ui/view/start_dm/start_dm_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_chips_input/flutter_chips_input.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; diff --git a/lib/ui/view/start_dm/start_dm_viewmodel.dart b/lib/ui/view/start_dm/start_dm_viewmodel.dart index 16cb9ff9e..632b9900b 100644 --- a/lib/ui/view/start_dm/start_dm_viewmodel.dart +++ b/lib/ui/view/start_dm/start_dm_viewmodel.dart @@ -1,5 +1,5 @@ -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/utilities/constants.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/utilities/constants.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/start_dm/widgets/custom_chip_input.dart b/lib/ui/view/start_dm/widgets/custom_chip_input.dart index 36dcb8e31..08fd55f9e 100644 --- a/lib/ui/view/start_dm/widgets/custom_chip_input.dart +++ b/lib/ui/view/start_dm/widgets/custom_chip_input.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_chips_input/flutter_chips_input.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../../../models/start_dm_models.dart'; import '../../../../utilities/utilities.dart'; diff --git a/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart b/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart index 55ffe5c66..6be6c30b2 100644 --- a/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart +++ b/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import '../../../../constants/app_strings.dart'; diff --git a/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart b/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart index 06271f8be..11d9bf828 100644 --- a/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart +++ b/lib/ui/view/static_pages/terms_and_conditions/terms_and_conditions_view_model.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/threads/all_threads/threads_view.dart b/lib/ui/view/threads/all_threads/threads_view.dart index f617a67d2..44e386102 100644 --- a/lib/ui/view/threads/all_threads/threads_view.dart +++ b/lib/ui/view/threads/all_threads/threads_view.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:stacked/stacked.dart'; import '../../../shared/colors.dart'; diff --git a/lib/ui/view/threads/all_threads/widgets/thread_card.dart b/lib/ui/view/threads/all_threads/widgets/thread_card.dart index c9c62055d..0e560498e 100644 --- a/lib/ui/view/threads/all_threads/widgets/thread_card.dart +++ b/lib/ui/view/threads/all_threads/widgets/thread_card.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; //The screen shown in homepage -> Threads diff --git a/lib/ui/view/threads/test_data.dart b/lib/ui/view/threads/test_data.dart index 498a2b1f9..cfcda3c18 100644 --- a/lib/ui/view/threads/test_data.dart +++ b/lib/ui/view/threads/test_data.dart @@ -1,5 +1,5 @@ -import 'package:hng/models/user_post.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/models/user_post.dart'; +import 'package:zurichat/utilities/enums.dart'; List thread1 = [ UserThreadPost( diff --git a/lib/ui/view/threads/thread_detail/thread_detail_view.dart b/lib/ui/view/threads/thread_detail/thread_detail_view.dart index 71bd794bf..d502f272a 100644 --- a/lib/ui/view/threads/thread_detail/thread_detail_view.dart +++ b/lib/ui/view/threads/thread_detail/thread_detail_view.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; -import 'package:hng/utilities/internalization/localization/app_localization.dart'; +import 'package:zurichat/ui/shared/bottom_sheets/zuri_chat_bottomsheet.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; +import 'package:zurichat/utilities/internalization/localization/app_localization.dart'; import 'package:overlay_support/overlay_support.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked/stacked_annotations.dart'; @@ -14,7 +14,7 @@ import '../../../shared/colors.dart'; import '../../../shared/smart_widgets/thread_card/thread_card_view.dart'; import '../../dm_user/icons/zap_icon.dart'; import 'thread_detail_viewmodel.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; import 'thread_detail_view.form.dart'; @FormView(fields: [FormTextField(name: 'message')]) diff --git a/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart b/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart index 55f0ac410..0ce273a7c 100644 --- a/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart +++ b/lib/ui/view/threads/thread_detail/thread_detail_viewmodel.dart @@ -1,15 +1,15 @@ import 'dart:convert'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/constants.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/constants.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:intl/intl.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; import '../../../../app/app.locator.dart'; import '../../../../models/user_post.dart'; import '../../../../package/base/server-request/api/zuri_api.dart'; diff --git a/lib/ui/view/user_search/user_search.dart b/lib/ui/view/user_search/user_search.dart index a2339829b..8addcd8fc 100644 --- a/lib/ui/view/user_search/user_search.dart +++ b/lib/ui/view/user_search/user_search.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../../utilities/constants.dart'; diff --git a/lib/ui/view/user_search/user_search_not_found.dart b/lib/ui/view/user_search/user_search_not_found.dart index a5ccdcb16..4970461ed 100644 --- a/lib/ui/view/user_search/user_search_not_found.dart +++ b/lib/ui/view/user_search/user_search_not_found.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/ui/shared/text_styles.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import '../../shared/colors.dart'; diff --git a/lib/ui/view/user_search/user_search_view.dart b/lib/ui/view/user_search/user_search_view.dart index 4b9688396..87b3dfc02 100644 --- a/lib/ui/view/user_search/user_search_view.dart +++ b/lib/ui/view/user_search/user_search_view.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:stacked/stacked.dart'; import '../../nav_pages/home_page/widgets/custom_channel_list_tile.dart'; diff --git a/lib/ui/view/user_search/user_search_viewmodel.dart b/lib/ui/view/user_search/user_search_viewmodel.dart index 4e93517c8..c888bc59d 100644 --- a/lib/ui/view/user_search/user_search_viewmodel.dart +++ b/lib/ui/view/user_search/user_search_viewmodel.dart @@ -1,6 +1,6 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/user_search/widget/custom_dm_list_tile.dart b/lib/ui/view/user_search/widget/custom_dm_list_tile.dart index 12ab4f99b..b79820afd 100644 --- a/lib/ui/view/user_search/widget/custom_dm_list_tile.dart +++ b/lib/ui/view/user_search/widget/custom_dm_list_tile.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/view/user_search/user_search_viewmodel.dart'; +import 'package:zurichat/ui/view/user_search/user_search_viewmodel.dart'; import 'package:stacked/stacked.dart'; class CustomDMListTile extends ViewModelWidget { diff --git a/lib/ui/view/webview_page/web_view_model.dart b/lib/ui/view/webview_page/web_view_model.dart index c8de773d4..632e261fc 100644 --- a/lib/ui/view/webview_page/web_view_model.dart +++ b/lib/ui/view/webview_page/web_view_model.dart @@ -1,4 +1,4 @@ -import 'package:hng/app/app.locator.dart'; +import 'package:zurichat/app/app.locator.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/lib/ui/view/webview_page/webview_page.dart b/lib/ui/view/webview_page/webview_page.dart index 79ad23031..e3e67b2d4 100644 --- a/lib/ui/view/webview_page/webview_page.dart +++ b/lib/ui/view/webview_page/webview_page.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:hng/ui/shared/text_styles.dart'; -import 'package:hng/ui/shared/zuri_appbar.dart'; -import 'package:hng/ui/shared/zuri_loader.dart'; +import 'package:zurichat/ui/shared/text_styles.dart'; +import 'package:zurichat/ui/shared/zuri_appbar.dart'; +import 'package:zurichat/ui/shared/zuri_loader.dart'; import 'package:webview_flutter/webview_flutter.dart'; import 'package:stacked/stacked.dart'; import 'web_view_model.dart'; diff --git a/lib/utilities/extensions/locale_extension.dart b/lib/utilities/extensions/locale_extension.dart index 9ff850fc9..b973e8b84 100644 --- a/lib/utilities/extensions/locale_extension.dart +++ b/lib/utilities/extensions/locale_extension.dart @@ -1,6 +1,6 @@ import 'package:flutter/widgets.dart'; -import 'package:hng/constants/app_strings.dart'; -import 'package:hng/services/localization_service.dart'; +import 'package:zurichat/constants/app_strings.dart'; +import 'package:zurichat/services/localization_service.dart'; extension LocaleExtension on Locale { String getLanguageName() { diff --git a/lib/utilities/internalization/localization/app_localization.dart b/lib/utilities/internalization/localization/app_localization.dart index 3c57e100c..812015951 100644 --- a/lib/utilities/internalization/localization/app_localization.dart +++ b/lib/utilities/internalization/localization/app_localization.dart @@ -3,8 +3,8 @@ import 'dart:convert'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:hng/constants/local_keys.dart'; -import 'package:hng/services/localization_service.dart'; +import 'package:zurichat/constants/local_keys.dart'; +import 'package:zurichat/services/localization_service.dart'; class AppLocalization { ///TODO: Remove late diff --git a/lib/utilities/mixins/close_on_second_back_mixin.dart b/lib/utilities/mixins/close_on_second_back_mixin.dart index 3d09982f6..a752e03b4 100644 --- a/lib/utilities/mixins/close_on_second_back_mixin.dart +++ b/lib/utilities/mixins/close_on_second_back_mixin.dart @@ -1,4 +1,4 @@ -import 'package:hng/constants/app_strings.dart'; +import 'package:zurichat/constants/app_strings.dart'; import '../../general_widgets/app_toast.dart'; diff --git a/lib/utilities/utilities.dart b/lib/utilities/utilities.dart index 1396b76cc..d8c107f03 100644 --- a/lib/utilities/utilities.dart +++ b/lib/utilities/utilities.dart @@ -1,6 +1,6 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/widgets.dart'; -import 'package:hng/app/app.logger.dart'; +import 'package:zurichat/app/app.logger.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/pubspec.lock b/pubspec.lock index bf085a12e..345148d32 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -14,7 +14,7 @@ packages: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "1.7.1" + version: "1.7.2" archive: dependency: transitive description: @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.1" auto_size_text_pk: dependency: transitive description: @@ -154,7 +154,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" checked_yaml: dependency: transitive description: @@ -664,7 +664,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" mime: dependency: transitive description: @@ -1061,7 +1061,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" timing: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 42875a8c6..5a97a254d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: hng +name: zurichat description: A new Flutter project. publish_to: "none" version: 1.0.0+1 diff --git a/test/helpers/test_helpers.dart b/test/helpers/test_helpers.dart index d565fb363..63d55d8cb 100644 --- a/test/helpers/test_helpers.dart +++ b/test/helpers/test_helpers.dart @@ -1,18 +1,18 @@ -import 'package:hng/app/app.locator.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/models/channels_search_model.dart'; -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/package/base/jump_to_request/jump_to_api.dart'; -import 'package:hng/package/base/server-request/api/zuri_api.dart'; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart'; -import 'package:hng/package/base/server-request/dms/dms_api_service.dart'; -import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart'; -import 'package:hng/services/centrifuge_service.dart'; -import 'package:hng/services/connectivity_service.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/services/media_service.dart'; -import 'package:hng/services/user_service.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/models/channels_search_model.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart'; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart'; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart'; +import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart'; +import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart'; +import 'package:zurichat/services/centrifuge_service.dart'; +import 'package:zurichat/services/connectivity_service.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/services/media_service.dart'; +import 'package:zurichat/services/user_service.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:stacked_services/stacked_services.dart'; diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index a425cf678..2ee027231 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -9,30 +9,30 @@ import 'dart:ui' as _i15; import 'package:centrifuge/centrifuge.dart' as _i22; import 'package:dio/dio.dart' as _i3; import 'package:flutter/material.dart' as _i12; -import 'package:hng/models/api_response.dart' as _i23; -import 'package:hng/models/channel_members.dart' as _i20; -import 'package:hng/models/channel_model.dart' as _i19; -import 'package:hng/models/channels_search_model.dart' as _i29; -import 'package:hng/models/organization_member_model.dart' as _i7; -import 'package:hng/models/organization_model.dart' as _i6; -import 'package:hng/models/pinned_message_model.dart' as _i18; -import 'package:hng/models/user_model.dart' as _i9; -import 'package:hng/models/user_search_model.dart' as _i24; -import 'package:hng/package/base/jump_to_request/jump_to_api.dart' as _i28; -import 'package:hng/package/base/server-request/api/zuri_api.dart' as _i5; -import 'package:hng/package/base/server-request/channels/channels_api_service.dart' +import 'package:zurichat/models/api_response.dart' as _i23; +import 'package:zurichat/models/channel_members.dart' as _i20; +import 'package:zurichat/models/channel_model.dart' as _i19; +import 'package:zurichat/models/channels_search_model.dart' as _i29; +import 'package:zurichat/models/organization_member_model.dart' as _i7; +import 'package:zurichat/models/organization_model.dart' as _i6; +import 'package:zurichat/models/pinned_message_model.dart' as _i18; +import 'package:zurichat/models/user_model.dart' as _i9; +import 'package:zurichat/models/user_search_model.dart' as _i24; +import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart' as _i28; +import 'package:zurichat/package/base/server-request/api/zuri_api.dart' as _i5; +import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart' as _i17; -import 'package:hng/package/base/server-request/dms/dms_api_service.dart' +import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart' as _i16; -import 'package:hng/package/base/server-request/organization_request/organization_api_service.dart' +import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart' as _i31; -import 'package:hng/services/centrifuge_service.dart' as _i21; -import 'package:hng/services/connectivity_service.dart' as _i26; -import 'package:hng/services/local_storage_services.dart' as _i10; -import 'package:hng/services/media_service.dart' as _i30; -import 'package:hng/services/user_service.dart' as _i8; -import 'package:hng/utilities/enums.dart' as _i27; -import 'package:hng/utilities/failures.dart' as _i4; +import 'package:zurichat/services/centrifuge_service.dart' as _i21; +import 'package:zurichat/services/connectivity_service.dart' as _i26; +import 'package:zurichat/services/local_storage_services.dart' as _i10; +import 'package:zurichat/services/media_service.dart' as _i30; +import 'package:zurichat/services/user_service.dart' as _i8; +import 'package:zurichat/utilities/enums.dart' as _i27; +import 'package:zurichat/utilities/failures.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; import 'package:stacked_services/stacked_services.dart' as _i11; import 'package:stacked_themes/src/theme_manager.dart' as _i14; diff --git a/test/services/bottom_sheet_service_test.dart b/test/services/bottom_sheet_service_test.dart index 3178d9d18..3532db6f2 100644 --- a/test/services/bottom_sheet_service_test.dart +++ b/test/services/bottom_sheet_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/shared/smart_widgets/thread_card/thread_card_viewmodel.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/services/dialog_service_test.dart b/test/services/dialog_service_test.dart index 44d90bcb9..884cc6371 100644 --- a/test/services/dialog_service_test.dart +++ b/test/services/dialog_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/services/local_storage_services_test.dart b/test/services/local_storage_services_test.dart index 0a4b2af5f..869b2e7d9 100644 --- a/test/services/local_storage_services_test.dart +++ b/test/services/local_storage_services_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/services/local_storage_services.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/services/local_storage_services.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; void main() { group('LocalStorageServiceTest -', () { diff --git a/test/services/navigation_service_test.dart b/test/services/navigation_service_test.dart index f6eb096d1..2854703c4 100644 --- a/test/services/navigation_service_test.dart +++ b/test/services/navigation_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/view/login/login_viewmodel.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/view/login/login_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/services/user_service_test.dart b/test/services/user_service_test.dart index 804d7675f..4fc22bbe6 100644 --- a/test/services/user_service_test.dart +++ b/test/services/user_service_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.locator.dart'; -import 'package:hng/services/user_service.dart'; +import 'package:zurichat/app/app.locator.dart'; +import 'package:zurichat/services/user_service.dart'; void main() { group('UserServiceTest -', () { diff --git a/test/view_models/add_people_viewmodel_test.dart b/test/view_models/add_people_viewmodel_test.dart index 32e113e26..45b1d7f74 100644 --- a/test/view_models/add_people_viewmodel_test.dart +++ b/test/view_models/add_people_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/add_people/add_people_viewmodel.dart'; +import 'package:zurichat/ui/view/add_people/add_people_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/advanced_viewmodel_test.dart b/test/view_models/advanced_viewmodel_test.dart index 4ffac81d2..0abbe40f1 100644 --- a/test/view_models/advanced_viewmodel_test.dart +++ b/test/view_models/advanced_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/advanced/advanced_viewmodel.dart'; -import 'package:hng/utilities/enums.dart'; +import 'package:zurichat/ui/view/advanced/advanced_viewmodel.dart'; +import 'package:zurichat/utilities/enums.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_add_people_viewmodel_test.dart b/test/view_models/channel_add_people_viewmodel_test.dart index c3fe9c40e..8a6976ce2 100644 --- a/test/view_models/channel_add_people_viewmodel_test.dart +++ b/test/view_models/channel_add_people_viewmodel_test.dart @@ -1,7 +1,7 @@ -import 'package:hng/models/user_search_model.dart'; -import 'package:hng/ui/view/channel/add_people/channel_add_people_viewmodel.dart'; +import 'package:zurichat/models/user_search_model.dart'; +import 'package:zurichat/ui/view/channel/add_people/channel_add_people_viewmodel.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/utilities/storage_keys.dart'; +import 'package:zurichat/utilities/storage_keys.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_info_view_model_test.dart b/test/view_models/channel_info_view_model_test.dart index 55cdd924b..97b5339d3 100644 --- a/test/view_models/channel_info_view_model_test.dart +++ b/test/view_models/channel_info_view_model_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/view/channel/channel_info/channel_info_view_model.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/view/channel/channel_info/channel_info_view_model.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_members_list_model_test.dart b/test/view_models/channel_members_list_model_test.dart index dbb747259..ea05ae380 100644 --- a/test/view_models/channel_members_list_model_test.dart +++ b/test/view_models/channel_members_list_model_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/channel/channel_members/channel_members_list_model.dart'; +import 'package:zurichat/ui/view/channel/channel_members/channel_members_list_model.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/channel_notification_viewmodel_test.dart b/test/view_models/channel_notification_viewmodel_test.dart index bc1030de7..0e23d3950 100644 --- a/test/view_models/channel_notification_viewmodel_test.dart +++ b/test/view_models/channel_notification_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/channel/channel_notification/channel_notification_viewmodel.dart'; +import 'package:zurichat/ui/view/channel/channel_notification/channel_notification_viewmodel.dart'; import '../helpers/test_helpers.dart'; // This is a test setup diff --git a/test/view_models/channels_viewmodel_test.dart b/test/view_models/channels_viewmodel_test.dart index 1ae1c87a6..ea870b25a 100644 --- a/test/view_models/channels_viewmodel_test.dart +++ b/test/view_models/channels_viewmodel_test.dart @@ -1,7 +1,7 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/models/app_model.dart'; -import 'package:hng/models/channel_members.dart'; -import 'package:hng/ui/view/channel/channel_list/channels_viewmodel.dart'; +import 'package:zurichat/models/app_model.dart'; +import 'package:zurichat/models/channel_members.dart'; +import 'package:zurichat/ui/view/channel/channel_list/channels_viewmodel.dart'; import '../helpers/test_helpers.dart'; // This is a test setup diff --git a/test/view_models/dm_jump_to_viewmodel_test.dart b/test/view_models/dm_jump_to_viewmodel_test.dart index dc0d92bfd..5a2c21026 100644 --- a/test/view_models/dm_jump_to_viewmodel_test.dart +++ b/test/view_models/dm_jump_to_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart'; +import 'package:zurichat/ui/view/dm_chat_view/dm_jump_to_viewmodel.dart'; import '../helpers/test_helpers.dart'; void main() { diff --git a/test/view_models/dm_user_viewmodel_test.dart b/test/view_models/dm_user_viewmodel_test.dart index f9ce091c9..31386d00c 100644 --- a/test/view_models/dm_user_viewmodel_test.dart +++ b/test/view_models/dm_user_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/dm_user/dm_user_viewmodel.dart'; +import 'package:zurichat/ui/view/dm_user/dm_user_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/forgot_password_email_viewmodel_test.dart b/test/view_models/forgot_password_email_viewmodel_test.dart index 5f4a7a3fd..065a050f5 100644 --- a/test/view_models/forgot_password_email_viewmodel_test.dart +++ b/test/view_models/forgot_password_email_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_email/forgot_password_email_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/forgot_password_new_viewmodel_test.dart b/test/view_models/forgot_password_new_viewmodel_test.dart index 0e908b3b4..60dd6d18e 100644 --- a/test/view_models/forgot_password_new_viewmodel_test.dart +++ b/test/view_models/forgot_password_new_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/view/forgot_password/forgot_password_new_password/forgot_password_newviewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/forgot_password_otp_viewmodel_test.dart b/test/view_models/forgot_password_otp_viewmodel_test.dart index 2634dde7e..7e9425bb0 100644 --- a/test/view_models/forgot_password_otp_viewmodel_test.dart +++ b/test/view_models/forgot_password_otp_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; +import 'package:zurichat/app/app.router.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/login_viewmodel_test.dart b/test/view_models/login_viewmodel_test.dart index 00625c587..364374be2 100644 --- a/test/view_models/login_viewmodel_test.dart +++ b/test/view_models/login_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/login/login_viewmodel.dart'; +import 'package:zurichat/ui/view/login/login_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/notifications_viewmodel_test.dart b/test/view_models/notifications_viewmodel_test.dart index 5f880bc69..f672e8496 100644 --- a/test/view_models/notifications_viewmodel_test.dart +++ b/test/view_models/notifications_viewmodel_test.dart @@ -1,5 +1,5 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/ui/view/notifications/notifications_viewmodel.dart'; +import 'package:zurichat/ui/view/notifications/notifications_viewmodel.dart'; import '../helpers/test_helpers.dart'; void main() { diff --git a/test/view_models/otp_viewmodel_test.dart b/test/view_models/otp_viewmodel_test.dart index 11473c561..661b0b0b5 100644 --- a/test/view_models/otp_viewmodel_test.dart +++ b/test/view_models/otp_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/view/otp/otp_viewmodel.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/view/otp/otp_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/plugin_viewmodel_test.dart b/test/view_models/plugin_viewmodel_test.dart index fb106d766..0bd85eb16 100644 --- a/test/view_models/plugin_viewmodel_test.dart +++ b/test/view_models/plugin_viewmodel_test.dart @@ -1,6 +1,6 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; -import 'package:hng/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; +import 'package:zurichat/app/app.router.dart'; +import 'package:zurichat/ui/nav_pages/plugin_page/plugin_viewmodel.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; diff --git a/test/view_models/you_page_viewmodel_test.dart b/test/view_models/you_page_viewmodel_test.dart index c54ab0835..913166ca9 100644 --- a/test/view_models/you_page_viewmodel_test.dart +++ b/test/view_models/you_page_viewmodel_test.dart @@ -1,8 +1,8 @@ import 'package:flutter_test/flutter_test.dart'; -import 'package:hng/app/app.router.dart'; +import 'package:zurichat/app/app.router.dart'; import 'package:mockito/mockito.dart'; import '../helpers/test_helpers.dart'; -import 'package:hng/ui/nav_pages/you_page/you_page_viewmodel.dart'; +import 'package:zurichat/ui/nav_pages/you_page/you_page_viewmodel.dart'; void main() { group('YouPageViewModelTest -', () { From 0145f8235ab0c13686e1055e244bd3c7cd3d48f3 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Sat, 16 Oct 2021 16:13:13 +0100 Subject: [PATCH 16/20] added error catching to workspace settings --- lib/package/base/server-request/api/api.dart | 2 +- .../base/server-request/api/zuri_api.dart | 9 +- .../organization_icon.dart | 2 +- .../organization_name_url.dart | 224 +++++++++--------- .../organization_settings_view.dart | 6 +- .../organization_settings_view_model.dart | 21 +- .../organization_view/organization_view.dart | 6 +- test/helpers/test_helpers.mocks.dart | 16 +- 8 files changed, 149 insertions(+), 137 deletions(-) diff --git a/lib/package/base/server-request/api/api.dart b/lib/package/base/server-request/api/api.dart index 84fd91bc8..3a5b96657 100644 --- a/lib/package/base/server-request/api/api.dart +++ b/lib/package/base/server-request/api/api.dart @@ -78,7 +78,7 @@ abstract class Api { }); // THE SERVICE TO UPDATE AN ORGANIZATION LOGO - Future updateOrgLogo(String orgId, File image, token); + Future updateOrgLogo(String orgId, File image, token); // THE SERVICE TO ADD A MEMBERS TO AN ORGANIZATION Future addMemberToOrganization(String orgId, String email, token); diff --git a/lib/package/base/server-request/api/zuri_api.dart b/lib/package/base/server-request/api/zuri_api.dart index 65da154bd..8ab7f2838 100644 --- a/lib/package/base/server-request/api/zuri_api.dart +++ b/lib/package/base/server-request/api/zuri_api.dart @@ -321,6 +321,7 @@ class ZuriApi implements Api { } on DioError catch (e) { log.w(e.toString()); handleApiError(e); + throw e.response!.data['message']; } } @@ -340,13 +341,14 @@ class ZuriApi implements Api { } on DioError catch (e) { log.w(e.toString()); handleApiError(e); + throw e.response!.data['message']; } } /// Updates an organization's logo. The organization's id `orgId` must not be /// null or empty @override - Future updateOrgLogo(String orgId, File image, token) async { + Future updateOrgLogo(String orgId, File image, token) async { try { var formData = FormData.fromMap({ "image": await MultipartFile.fromFile( @@ -355,17 +357,18 @@ class ZuriApi implements Api { contentType: MediaType('image', 'jpeg'), ), }); - final res = await dio.patch( + await dio.patch( '${coreBaseUrl}organizations/$orgId/logo', options: Options( headers: {'Authorization': 'Bearer $token'}, ), data: formData, ); - return res.data['message']; + return true; } on DioError catch (e) { log.w(e.toString()); handleApiError(e); + throw e.response?.data['message']; } } diff --git a/lib/ui/view/organization/organization_settings/organization_icon.dart b/lib/ui/view/organization/organization_settings/organization_icon.dart index 10870180d..34fd92965 100644 --- a/lib/ui/view/organization/organization_settings/organization_icon.dart +++ b/lib/ui/view/organization/organization_settings/organization_icon.dart @@ -21,7 +21,7 @@ class OrganizationLogo extends StatelessWidget { return Scaffold( appBar: ZuriAppBar( whiteBackground: true, - leading: Icons.chevron_left, + leading: Icons.close, leadingPress: () => model.back(), title: OrgIcon, subtitle: '', diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart index 22b35c77a..261df50f5 100644 --- a/lib/ui/view/organization/organization_settings/organization_name_url.dart +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:stacked/stacked.dart'; import 'package:zurichat/models/organization_model.dart'; import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:zurichat/ui/view/organization/organization_settings/organization_settings_view_model.dart'; @@ -8,139 +9,142 @@ import 'package:zurichat/ui/shared/colors.dart'; import 'package:zurichat/ui/shared/text_field.dart'; import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:zurichat/ui/shared/zuri_loader.dart'; -import 'package:stacked_hooks/stacked_hooks.dart'; -class OrganizationNameUrl - extends HookViewModelWidget { +class OrganizationNameUrl extends HookWidget { final OrganizationModel org; OrganizationNameUrl({Key? key, required this.org}) : super(key: key); final _formKey = GlobalKey(); @override - Widget buildViewModelWidget( - BuildContext context, OrganizationSettingsViewModel viewModel) { + Widget build(BuildContext context) { final _orgNameController = useTextEditingController(text: org.name); final _orgUrlController = useTextEditingController(text: org.organizationUrl?.split('.').first); - return Scaffold( - appBar: ZuriAppBar( - whiteBackground: true, - title: OrgnameUrl, - subtitle: '', - leading: Icons.chevron_left, - leadingPress: () => viewModel.back(), - actions: [ - TextButton( - onPressed: () { - if (!_formKey.currentState!.validate()) return; - viewModel.updateOrgNameAndUrl(org.id.toString(), - _orgNameController.text, _orgUrlController.text); - }, - child: Text( - Save, - style: AppTextStyle.lightGreySize16.copyWith( - color: AppColors.zuriPrimaryColor, - ), - ), - ), - ], - ), - body: Stack( - fit: StackFit.expand, - children: [ - Form( - key: _formKey, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 25, vertical: 20), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - OrgName, - style: AppTextStyle.blackSize18Bold.copyWith( - color: AppColors.blackColor, fontSize: 18), - ), - const SizedBox(height: 15), - Flexible( - child: BorderTextField( - hint: CompanyNameHint, - controller: _orgNameController, - textCapitalization: TextCapitalization.words, - validator: (val) => - viewModel.validateNotEmptyField(val!), - ), - ), - const SizedBox(height: 15), - Text( - OrgNameDesc, - style: AppTextStyle.lightGreySize16 - .copyWith(fontSize: 15, color: AppColors.greyColor), - ), - ], + return ViewModelBuilder.reactive( + viewModelBuilder: () => OrganizationSettingsViewModel(), + onModelReady: (model) => model.init(org.name!, org.organizationUrl!), + builder: (context, viewModel, child) { + return Scaffold( + appBar: ZuriAppBar( + whiteBackground: true, + title: OrgnameUrl, + subtitle: '', + leading: Icons.close, + leadingPress: () => viewModel.back(), + actions: [ + TextButton( + onPressed: () { + if (!_formKey.currentState!.validate()) return; + viewModel.updateOrgNameAndUrl(org.id.toString(), + _orgNameController.text, _orgUrlController.text); + }, + child: Text( + Save, + style: AppTextStyle.lightGreySize16.copyWith( + color: AppColors.zuriPrimaryColor, ), ), - const Divider(color: AppColors.greyColor, thickness: 1), - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 25, vertical: 20), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - OrgUrl, - style: AppTextStyle.blackSize18Bold.copyWith( - color: AppColors.blackColor, fontSize: 18), - ), - const SizedBox(height: 15), - Row( - crossAxisAlignment: CrossAxisAlignment.center, + ), + ], + ), + body: Stack( + fit: StackFit.expand, + children: [ + Form( + key: _formKey, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 25, vertical: 20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + OrgName, + style: AppTextStyle.blackSize18Bold.copyWith( + color: AppColors.blackColor, fontSize: 18), + ), + const SizedBox(height: 15), Flexible( child: BorderTextField( - hint: "hng_i8", - controller: _orgUrlController, - textCapitalization: TextCapitalization.none, - validator: viewModel.vaidateOrgUrl, - textAlign: TextAlign.end, + hint: CompanyNameHint, + controller: _orgNameController, + textCapitalization: TextCapitalization.words, + validator: (val) => + viewModel.validateNotEmptyField(val!), ), ), - const SizedBox(width: 10), + const SizedBox(height: 15), Text( - '.zurichat.com', - style: AppTextStyle.lightGreySize16 - .copyWith(fontSize: 15), + OrgNameDesc, + style: AppTextStyle.lightGreySize16.copyWith( + fontSize: 15, color: AppColors.greyColor), ), ], ), - const SizedBox(height: 15), - Text( - OrgUrlDesc, - style: AppTextStyle.lightGreySize16 - .copyWith(fontSize: 15, color: AppColors.greyColor), + ), + const Divider(color: AppColors.greyColor, thickness: 1), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 25, vertical: 20), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + OrgUrl, + style: AppTextStyle.blackSize18Bold.copyWith( + color: AppColors.blackColor, fontSize: 18), + ), + const SizedBox(height: 15), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Flexible( + child: BorderTextField( + hint: "hng_i8", + controller: _orgUrlController, + textCapitalization: TextCapitalization.none, + validator: viewModel.vaidateOrgUrl, + textAlign: TextAlign.end, + ), + ), + const SizedBox(width: 10), + Text( + '.zurichat.com', + style: AppTextStyle.lightGreySize16 + .copyWith(fontSize: 15), + ), + ], + ), + const SizedBox(height: 15), + Text( + OrgUrlDesc, + style: AppTextStyle.lightGreySize16.copyWith( + fontSize: 15, color: AppColors.greyColor), + ), + ], ), - ], - ), + ), + ], ), - ], - ), - ), - Visibility( - visible: viewModel.isBusy, - child: Container( - alignment: Alignment.center, - height: 100, - child: const ZuriLoader(isTransparent: true), - ), + ), + Visibility( + visible: viewModel.isBusy, + child: Container( + alignment: Alignment.center, + height: 100, + child: const ZuriLoader(isTransparent: true), + ), + ), + ], ), - ], - ), + ); + }, ); } } diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart index da83bfc91..2efe9f418 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -17,14 +17,13 @@ class OrganizationSettingsView extends StatelessWidget { Widget build(BuildContext context) { return ViewModelBuilder.reactive( viewModelBuilder: () => OrganizationSettingsViewModel(), - onModelReady: (model) => model.init(org.name!, org.organizationUrl!), builder: (context, model, child) { return Scaffold( appBar: ZuriAppBar( title: OrgSettings, subtitle: org.name, whiteBackground: true, - leading: Icons.chevron_left, + leading: Icons.arrow_back_ios_new, leadingPress: () => model.back(), ), body: Container( @@ -34,7 +33,8 @@ class OrganizationSettingsView extends StatelessWidget { boxShadow: [ BoxShadow( color: AppColors.shadowColor, - spreadRadius: 10, + spreadRadius: 5, + blurRadius: 10, ), ], ), diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart index 949246256..b6c6e0fa0 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart @@ -52,18 +52,23 @@ class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { try { setBusy(true); if (tempImage == null) return; - await _zuriApi.updateOrgLogo(orgId, tempImage!, token); + final res = await _zuriApi.updateOrgLogo(orgId, tempImage!, token); setBusy(false); - navigation - .popUntil((route) => route.settings.name == Routes.organizationView); - snackbar.showCustomSnackBar( - variant: SnackbarType.success, message: 'Update Successful'); + if (res) { + navigation.popUntil( + (route) => route.settings.name == Routes.organizationView); + snackbar.showCustomSnackBar( + variant: SnackbarType.success, message: 'Update Successful'); + } else { + snackbar.showCustomSnackBar( + variant: SnackbarType.failure, + message: 'Error Updating Workspace logo'); + } } catch (e) { setBusy(false); log.e(e.toString()); snackbar.showCustomSnackBar( - variant: SnackbarType.failure, - message: 'Error Updating Workspace logo'); + variant: SnackbarType.failure, message: e.toString()); } } @@ -92,7 +97,7 @@ class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { setBusy(false); log.e(e.toString()); snackbar.showCustomSnackBar( - variant: SnackbarType.failure, message: 'Update not successful'); + variant: SnackbarType.failure, message: 'Update not successful: $e'); } } diff --git a/lib/ui/view/organization/organization_view/organization_view.dart b/lib/ui/view/organization/organization_view/organization_view.dart index 73cd02d50..74914fb85 100644 --- a/lib/ui/view/organization/organization_view/organization_view.dart +++ b/lib/ui/view/organization/organization_view/organization_view.dart @@ -144,8 +144,8 @@ class OrganizationTile extends ViewModelWidget { return ListTile( onTap: () => viewModel.onTap(org), leading: Container( - height: MediaQuery.of(context).size.height * 0.06, - width: MediaQuery.of(context).size.height * 0.06, + height: 40, + width: 40, padding: const EdgeInsets.all(2), decoration: BoxDecoration( color: viewModel.currentOrgId == org.id @@ -161,7 +161,7 @@ class OrganizationTile extends ViewModelWidget { height: MediaQuery.of(context).size.height * 0.05, width: MediaQuery.of(context).size.height * 0.05, decoration: BoxDecoration( - color: AppColors.whiteColor, + color: Colors.transparent, borderRadius: BorderRadius.circular(5), ), clipBehavior: Clip.hardEdge, diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index 00842c0af..4eeb08453 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -1,5 +1,5 @@ // Mocks generated by Mockito 5.0.15 from annotations -// in hng/test/helpers/test_helpers.dart. +// in zurichat/test/helpers/test_helpers.dart. // Do not manually edit this file. import 'dart:async' as _i2; @@ -9,6 +9,10 @@ import 'dart:ui' as _i15; import 'package:centrifuge/centrifuge.dart' as _i22; import 'package:dio/dio.dart' as _i3; import 'package:flutter/material.dart' as _i12; +import 'package:mockito/mockito.dart' as _i1; +import 'package:stacked_services/stacked_services.dart' as _i11; +import 'package:stacked_themes/src/theme_manager.dart' as _i14; +import 'package:stacked_themes/src/theme_service.dart' as _i13; import 'package:zurichat/models/api_response.dart' as _i23; import 'package:zurichat/models/channel_members.dart' as _i20; import 'package:zurichat/models/channel_model.dart' as _i19; @@ -17,7 +21,7 @@ import 'package:zurichat/models/organization_member_model.dart' as _i7; import 'package:zurichat/models/organization_model.dart' as _i6; import 'package:zurichat/models/pinned_message_model.dart' as _i18; import 'package:zurichat/models/user_model.dart' as _i9; -import 'package:zurichat/models/user_search_model.dart' as _i24; +import 'package:zurichat/models/user_search_model.dart' as _i25; import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart' as _i28; import 'package:zurichat/package/base/server-request/api/zuri_api.dart' as _i5; import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart' @@ -33,10 +37,6 @@ import 'package:zurichat/services/media_service.dart' as _i30; import 'package:zurichat/services/user_service.dart' as _i8; import 'package:zurichat/utilities/enums.dart' as _i27; import 'package:zurichat/utilities/failures.dart' as _i4; -import 'package:mockito/mockito.dart' as _i1; -import 'package:stacked_services/stacked_services.dart' as _i11; -import 'package:stacked_themes/src/theme_manager.dart' as _i14; -import 'package:stacked_themes/src/theme_service.dart' as _i13; // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters @@ -1029,11 +1029,11 @@ class MockZuriApi extends _i1.Mock implements _i5.ZuriApi { Invocation.method(#updateOrgName, [orgId, name, token]), returnValue: Future.value()) as _i2.Future); @override - _i2.Future updateOrgLogo( + _i2.Future updateOrgLogo( String? orgId, _i24.File? image, dynamic token) => (super.noSuchMethod( Invocation.method(#updateOrgLogo, [orgId, image, token]), - returnValue: Future.value()) as _i2.Future); + returnValue: Future.value(false)) as _i2.Future); @override _i2.Future addMemberToChannel( String? channelId, String? orgId, String? userId, dynamic token) => From e81decc7d1d60c1146af9b2c92af478e9d5f1630 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Sat, 16 Oct 2021 17:47:42 +0100 Subject: [PATCH 17/20] changes fixed and workspace settings work now --- .../base/server-request/api/zuri_api.dart | 2 + .../organization_icon.dart | 20 ++++---- .../organization_name_url.dart | 31 +++++++----- .../organization_settings_view.dart | 47 ++++++++++++------- .../organization_settings_view_model.dart | 5 +- 5 files changed, 67 insertions(+), 38 deletions(-) diff --git a/lib/package/base/server-request/api/zuri_api.dart b/lib/package/base/server-request/api/zuri_api.dart index 8ab7f2838..7e820d0fe 100644 --- a/lib/package/base/server-request/api/zuri_api.dart +++ b/lib/package/base/server-request/api/zuri_api.dart @@ -351,6 +351,8 @@ class ZuriApi implements Api { Future updateOrgLogo(String orgId, File image, token) async { try { var formData = FormData.fromMap({ + 'height': 300, + 'width': 300, "image": await MultipartFile.fromFile( image.path, filename: image.path.split(Platform.pathSeparator).last, diff --git a/lib/ui/view/organization/organization_settings/organization_icon.dart b/lib/ui/view/organization/organization_settings/organization_icon.dart index 34fd92965..c0cb8ba35 100644 --- a/lib/ui/view/organization/organization_settings/organization_icon.dart +++ b/lib/ui/view/organization/organization_settings/organization_icon.dart @@ -15,12 +15,14 @@ class OrganizationLogo extends StatelessWidget { @override Widget build(BuildContext context) { + final bool _dark = Theme.of(context).brightness == Brightness.dark; return ViewModelBuilder.reactive( viewModelBuilder: () => OrganizationSettingsViewModel(), builder: (context, model, child) { return Scaffold( appBar: ZuriAppBar( whiteBackground: true, + isDarkMode: _dark, leading: Icons.close, leadingPress: () => model.back(), title: OrgIcon, @@ -30,9 +32,9 @@ class OrganizationLogo extends StatelessWidget { onPressed: () => model.updateOrgLogo(org.id.toString()), child: Text( Save, - style: AppTextStyle.lightGreySize16.copyWith( - color: AppColors.zuriPrimaryColor, - ), + style: _dark + ? AppTextStyle.lightGreySize16 + : AppTextStyle.darkGreySize16, ), ), ], @@ -50,7 +52,6 @@ class OrganizationLogo extends StatelessWidget { width: 150, decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), - // border: Border.all(color: AppColors.greyColor, width: 1), ), clipBehavior: Clip.hardEdge, child: model.tempImage == null && org.logoUrl!.isEmpty @@ -77,14 +78,17 @@ class OrganizationLogo extends StatelessWidget { const SizedBox(height: 30), Text( OrgIconGuide, - style: AppTextStyle.blackSize18Bold - .copyWith(color: AppColors.blackColor, fontSize: 20), + style: AppTextStyle.blackSize18Bold.copyWith( + color: _dark + ? AppColors.whiteColor + : AppColors.blackColor), ), const SizedBox(height: 10), Text( OrgIconGuideDesc, - style: AppTextStyle.lightGreySize16.copyWith( - fontSize: 17, color: AppColors.greyishColor), + style: _dark + ? AppTextStyle.lightGreySize16 + : AppTextStyle.darkGreySize16, ), ], ), diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart index 261df50f5..f2949a53b 100644 --- a/lib/ui/view/organization/organization_settings/organization_name_url.dart +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -20,6 +20,7 @@ class OrganizationNameUrl extends HookWidget { final _orgNameController = useTextEditingController(text: org.name); final _orgUrlController = useTextEditingController(text: org.organizationUrl?.split('.').first); + final bool _dark = Theme.of(context).brightness == Brightness.dark; return ViewModelBuilder.reactive( viewModelBuilder: () => OrganizationSettingsViewModel(), onModelReady: (model) => model.init(org.name!, org.organizationUrl!), @@ -27,6 +28,7 @@ class OrganizationNameUrl extends HookWidget { return Scaffold( appBar: ZuriAppBar( whiteBackground: true, + isDarkMode: _dark, title: OrgnameUrl, subtitle: '', leading: Icons.close, @@ -40,9 +42,9 @@ class OrganizationNameUrl extends HookWidget { }, child: Text( Save, - style: AppTextStyle.lightGreySize16.copyWith( - color: AppColors.zuriPrimaryColor, - ), + style: _dark + ? AppTextStyle.lightGreySize16 + : AppTextStyle.darkGreySize16, ), ), ], @@ -66,7 +68,9 @@ class OrganizationNameUrl extends HookWidget { Text( OrgName, style: AppTextStyle.blackSize18Bold.copyWith( - color: AppColors.blackColor, fontSize: 18), + color: _dark + ? AppColors.whiteColor + : AppColors.blackColor), ), const SizedBox(height: 15), Flexible( @@ -81,8 +85,9 @@ class OrganizationNameUrl extends HookWidget { const SizedBox(height: 15), Text( OrgNameDesc, - style: AppTextStyle.lightGreySize16.copyWith( - fontSize: 15, color: AppColors.greyColor), + style: _dark + ? AppTextStyle.lightGreySize16 + : AppTextStyle.darkGreySize16, ), ], ), @@ -98,7 +103,9 @@ class OrganizationNameUrl extends HookWidget { Text( OrgUrl, style: AppTextStyle.blackSize18Bold.copyWith( - color: AppColors.blackColor, fontSize: 18), + color: _dark + ? AppColors.whiteColor + : AppColors.blackColor), ), const SizedBox(height: 15), Row( @@ -116,16 +123,18 @@ class OrganizationNameUrl extends HookWidget { const SizedBox(width: 10), Text( '.zurichat.com', - style: AppTextStyle.lightGreySize16 - .copyWith(fontSize: 15), + style: _dark + ? AppTextStyle.lightGreySize16 + : AppTextStyle.darkGreySize16, ), ], ), const SizedBox(height: 15), Text( OrgUrlDesc, - style: AppTextStyle.lightGreySize16.copyWith( - fontSize: 15, color: AppColors.greyColor), + style: _dark + ? AppTextStyle.lightGreySize16 + : AppTextStyle.darkGreySize16, ), ], ), diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart index 2efe9f418..033e58e83 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -15,6 +15,7 @@ class OrganizationSettingsView extends StatelessWidget { @override Widget build(BuildContext context) { + final bool _dark = Theme.of(context).brightness == Brightness.dark; return ViewModelBuilder.reactive( viewModelBuilder: () => OrganizationSettingsViewModel(), builder: (context, model, child) { @@ -23,14 +24,15 @@ class OrganizationSettingsView extends StatelessWidget { title: OrgSettings, subtitle: org.name, whiteBackground: true, + isDarkMode: _dark, leading: Icons.arrow_back_ios_new, leadingPress: () => model.back(), ), body: Container( margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 20), - decoration: const BoxDecoration( - color: AppColors.whiteColor, - boxShadow: [ + decoration: BoxDecoration( + color: _dark ? AppColors.blackColor : AppColors.whiteColor, + boxShadow: const [ BoxShadow( color: AppColors.shadowColor, spreadRadius: 5, @@ -51,14 +53,17 @@ class OrganizationSettingsView extends StatelessWidget { children: [ Text( EditOrgIcon, - style: AppTextStyle.blackSize18Bold - .copyWith(color: AppColors.blackColor), + style: AppTextStyle.blackSize18Bold.copyWith( + color: _dark + ? AppColors.whiteColor + : AppColors.blackColor), ), const SizedBox(height: 10), Text( EditOrgIconDesc, - style: AppTextStyle.lightGreySize16.copyWith( - fontSize: 15, color: AppColors.greyColor), + style: _dark + ? AppTextStyle.lightGreySize16 + : AppTextStyle.darkGreySize16, ), ], ), @@ -74,8 +79,10 @@ class OrganizationSettingsView extends StatelessWidget { children: [ Text( EditOrgNameUrl, - style: AppTextStyle.blackSize18Bold - .copyWith(color: AppColors.blackColor), + style: AppTextStyle.blackSize18Bold.copyWith( + color: _dark + ? AppColors.whiteColor + : AppColors.blackColor), ), const SizedBox(height: 10), Text.rich( @@ -83,26 +90,32 @@ class OrganizationSettingsView extends StatelessWidget { children: [ TextSpan( text: EditOrgNameUrlDesc1, - style: AppTextStyle.lightGreySize16.copyWith( - fontSize: 15, color: AppColors.greyColor), + style: _dark + ? AppTextStyle.lightGreySize16 + : AppTextStyle.darkGreySize16, ), TextSpan( text: org.name, style: AppTextStyle.blackSize18Bold.copyWith( - fontSize: 15, - color: AppColors.blackColor, + fontSize: 16, + color: _dark + ? AppColors.whiteColor + : AppColors.blackColor, ), ), TextSpan( text: EditOrgNameUrlDesc2, - style: AppTextStyle.lightGreySize16.copyWith( - fontSize: 15, color: AppColors.greyColor), + style: _dark + ? AppTextStyle.lightGreySize16 + : AppTextStyle.darkGreySize16, ), TextSpan( text: org.organizationUrl ?? '', style: AppTextStyle.blackSize18Bold.copyWith( - fontSize: 15, - color: AppColors.blackColor, + fontSize: 16, + color: _dark + ? AppColors.whiteColor + : AppColors.blackColor, ), ), ], diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart index b6c6e0fa0..87023f655 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart @@ -84,10 +84,11 @@ class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { String orgId, String orgName, String orgUrl) async { try { final parsedUrl = '$orgUrl.zurichat.com'; - setBusy(true); if (orgName != name) await _zuriApi.updateOrgName(orgId, orgName, token); - if (orgUrl != url) await _zuriApi.updateOrgUrl(orgId, parsedUrl, token); + if (parsedUrl != url) { + await _zuriApi.updateOrgUrl(orgId, parsedUrl, token); + } setBusy(false); navigation .popUntil((route) => route.settings.name == Routes.organizationView); From 758eba2aaa41f94f116c230dca04dbaba04c9d7d Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Sat, 16 Oct 2021 17:59:04 +0100 Subject: [PATCH 18/20] Conficts resolved --- .../organization_settings/organization_logo.dart | 6 ++---- .../organization_settings_view_model.dart | 9 ++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/ui/view/organization/organization_settings/organization_logo.dart b/lib/ui/view/organization/organization_settings/organization_logo.dart index 24d29bdd2..39a94b98c 100644 --- a/lib/ui/view/organization/organization_settings/organization_logo.dart +++ b/lib/ui/view/organization/organization_settings/organization_logo.dart @@ -25,10 +25,8 @@ class OrganizationLogo extends StatelessWidget { whiteBackground: true, leading: Icons.close, leadingPress: () => model.back(), - orgTitle: Text( - OrgIcon, - style: AppTextStyle.organizationNameText, - ), + title: OrgIcon, + subtitle: '', actions: [ TextButton( onPressed: () => model.updateOrgLogo(org.id.toString()), diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart index cf6d33a26..87023f655 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart @@ -35,11 +35,10 @@ class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { } void navigateToWorkspaceName(OrganizationModel org) { - //TODO: getting ready - // navigation.navigateTo( - // Routes.organizationNameUrl, - // arguments: OrganizationNameUrlArguments(org: org), - // ); + navigation.navigateTo( + Routes.organizationNameUrl, + arguments: OrganizationNameUrlArguments(org: org), + ); } void navigateToWorkspaceLogo(OrganizationModel org) { From fd162dc9f47cd511bccc4d36600f76abb2cc5706 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Sat, 16 Oct 2021 17:59:04 +0100 Subject: [PATCH 19/20] Conficts resolved --- lib/app/app.locator.dart | 2 - lib/app/app.router.dart | 8 --- .../organization_logo.dart | 6 +- .../organization_settings_view_model.dart | 9 ++- test/helpers/test_helpers.mocks.dart | 64 ------------------- 5 files changed, 6 insertions(+), 83 deletions(-) diff --git a/lib/app/app.locator.dart b/lib/app/app.locator.dart index 6c0bf9f6d..e87396d7f 100644 --- a/lib/app/app.locator.dart +++ b/lib/app/app.locator.dart @@ -34,12 +34,10 @@ Future setupLocator( // Register dependencies locator.registerLazySingleton(() => NavigationService()); locator.registerLazySingleton(() => SnackbarService()); - final zuriThemeService = await ZuriThemeService.getInstance(); locator.registerSingleton(zuriThemeService); locator.registerLazySingleton(() => LocalizationService()); - final sharedPreferenceLocalStorage = await SharedPreferenceLocalStorage.getInstance(); locator.registerSingleton(sharedPreferenceLocalStorage); diff --git a/lib/app/app.router.dart b/lib/app/app.router.dart index 8025a1db7..f08a8bb39 100644 --- a/lib/app/app.router.dart +++ b/lib/app/app.router.dart @@ -31,9 +31,7 @@ import '../ui/view/channel/channel_view/channel_page_view.dart'; import '../ui/view/channel/edit_channel/edit_channel_view.dart'; import '../ui/view/channel/new_channel/new_channel.dart'; import '../ui/view/channel/pinned_messages/pinned_messages_view.dart'; - import '../ui/view/channel/share_message/share_message_view.dart'; - import '../ui/view/clear_after/clear_after_view.dart'; import '../ui/view/direct_message/direct_message.dart'; import '../ui/view/dm_chat_view/dm_jump_to_view.dart'; @@ -55,10 +53,8 @@ import '../ui/view/organization/add_organization/add_organization_view.dart'; import '../ui/view/organization/create_organization/create_organization.dart'; import '../ui/view/organization/invite_to_organization/admin_permissions/create_invite_link.dart'; import '../ui/view/organization/invite_to_organization/admin_permissions/invite_via_email.dart'; - import '../ui/view/organization/invite_to_organization/invitation_sent.dart'; import '../ui/view/organization/invite_to_organization/invite_via_contact/import_contact.dart'; - import '../ui/view/organization/invite_to_organization/invite_via_email/invite_via_email.dart'; import '../ui/view/organization/organization_different_email/different_email_organization_view.dart'; import '../ui/view/organization/organization_settings/organization_logo.dart'; @@ -728,9 +724,7 @@ class StackedRouter extends RouterBase { var args = data.getArgs( orElse: () => InviteViaEmailArguments(), ); - return CupertinoPageRoute( - builder: (context) => InviteViaEmail(key: args.key), settings: data, ); @@ -1015,7 +1009,6 @@ class InviteViaEmailArguments { InviteViaEmailArguments({this.key}); } - /// ShareMessageView arguments holder class class ShareMessageViewArguments { final UserPost userPost; @@ -1043,4 +1036,3 @@ class OrganizationLogoArguments { final OrganizationModel org; OrganizationLogoArguments({this.key, required this.org}); } - diff --git a/lib/ui/view/organization/organization_settings/organization_logo.dart b/lib/ui/view/organization/organization_settings/organization_logo.dart index 24d29bdd2..39a94b98c 100644 --- a/lib/ui/view/organization/organization_settings/organization_logo.dart +++ b/lib/ui/view/organization/organization_settings/organization_logo.dart @@ -25,10 +25,8 @@ class OrganizationLogo extends StatelessWidget { whiteBackground: true, leading: Icons.close, leadingPress: () => model.back(), - orgTitle: Text( - OrgIcon, - style: AppTextStyle.organizationNameText, - ), + title: OrgIcon, + subtitle: '', actions: [ TextButton( onPressed: () => model.updateOrgLogo(org.id.toString()), diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart index cf6d33a26..87023f655 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view_model.dart @@ -35,11 +35,10 @@ class OrganizationSettingsViewModel extends BaseViewModel with ValidatorMixin { } void navigateToWorkspaceName(OrganizationModel org) { - //TODO: getting ready - // navigation.navigateTo( - // Routes.organizationNameUrl, - // arguments: OrganizationNameUrlArguments(org: org), - // ); + navigation.navigateTo( + Routes.organizationNameUrl, + arguments: OrganizationNameUrlArguments(org: org), + ); } void navigateToWorkspaceLogo(OrganizationModel org) { diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index 2f07af639..4eeb08453 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -3,48 +3,12 @@ // Do not manually edit this file. import 'dart:async' as _i2; - import 'dart:io' as _i24; import 'dart:ui' as _i15; import 'package:centrifuge/centrifuge.dart' as _i22; import 'package:dio/dio.dart' as _i3; import 'package:flutter/material.dart' as _i12; -<<<<<<< HEAD -<<<<<<< HEAD -======= -======= -import 'package:mockito/mockito.dart' as _i1; -import 'package:stacked_services/stacked_services.dart' as _i11; -import 'package:stacked_themes/src/theme_manager.dart' as _i14; -import 'package:stacked_themes/src/theme_service.dart' as _i13; ->>>>>>> upstream/dev -import 'package:zurichat/models/api_response.dart' as _i23; -import 'package:zurichat/models/channel_members.dart' as _i20; -import 'package:zurichat/models/channel_model.dart' as _i19; -import 'package:zurichat/models/channels_search_model.dart' as _i29; -import 'package:zurichat/models/organization_member_model.dart' as _i7; -import 'package:zurichat/models/organization_model.dart' as _i6; -import 'package:zurichat/models/pinned_message_model.dart' as _i18; -import 'package:zurichat/models/user_model.dart' as _i9; -import 'package:zurichat/models/user_search_model.dart' as _i25; -import 'package:zurichat/package/base/jump_to_request/jump_to_api.dart' as _i28; -import 'package:zurichat/package/base/server-request/api/zuri_api.dart' as _i5; -import 'package:zurichat/package/base/server-request/channels/channels_api_service.dart' - as _i17; -import 'package:zurichat/package/base/server-request/dms/dms_api_service.dart' - as _i16; -import 'package:zurichat/package/base/server-request/organization_request/organization_api_service.dart' - as _i31; -import 'package:zurichat/services/centrifuge_service.dart' as _i21; -import 'package:zurichat/services/connectivity_service.dart' as _i26; -import 'package:zurichat/services/local_storage_services.dart' as _i10; -import 'package:zurichat/services/media_service.dart' as _i30; -import 'package:zurichat/services/user_service.dart' as _i8; -import 'package:zurichat/utilities/enums.dart' as _i27; -import 'package:zurichat/utilities/failures.dart' as _i4; - ->>>>>>> upstream/dev import 'package:mockito/mockito.dart' as _i1; import 'package:stacked_services/stacked_services.dart' as _i11; import 'package:stacked_themes/src/theme_manager.dart' as _i14; @@ -801,14 +765,12 @@ class MockChannelsApiService extends _i1.Mock returnValue: Future>.value([])) as _i2.Future>); @override - _i2.Future> getChannelPinnedMessages( String? channelId) => (super.noSuchMethod( Invocation.method(#getChannelPinnedMessages, [channelId]), returnValue: Future>.value( <_i18.PinnedMessage>[])) as _i2.Future>); - @override _i2.Future changeChannelMessagePinnedState( String? channelId, String? messageId, String? userId, bool? pinned) => @@ -825,13 +787,11 @@ class MockChannelsApiService extends _i1.Mock #sendChannelMessages, [channelId, userId, message, media]), returnValue: Future.value()) as _i2.Future); @override - _i2.Future> fetchChannel() => (super.noSuchMethod(Invocation.method(#fetchChannel, []), returnValue: Future>.value(<_i19.ChannelModel>[])) as _i2.Future>); - @override _i2.Future createChannels( {String? name, @@ -853,12 +813,10 @@ class MockChannelsApiService extends _i1.Mock (super.noSuchMethod(Invocation.method(#deleteChannel, [orgId, channelId]), returnValue: Future.value(false)) as _i2.Future); @override - _i2.Future?> getChannelMembers(dynamic id) => (super.noSuchMethod(Invocation.method(#getChannelMembers, [id]), returnValue: Future?>.value()) as _i2.Future?>); - @override _i2.Future? dispose() => (super.noSuchMethod( Invocation.method(#dispose, []), @@ -870,9 +828,7 @@ class MockChannelsApiService extends _i1.Mock /// A class which mocks [CentrifugeService]. /// /// See the documentation for Mockito's code generation for more information. - class MockCentrifugeService extends _i1.Mock implements _i21.CentrifugeService { - @override _i2.StreamController get messageStreamController => (super.noSuchMethod(Invocation.getter(#messageStreamController), @@ -885,14 +841,12 @@ class MockCentrifugeService extends _i1.Mock implements _i21.CentrifugeService { Invocation.setter(#messageStreamController, _messageStreamController), returnValueForMissingStub: null); @override - Map get subList => (super.noSuchMethod(Invocation.getter(#subList), returnValue: {}) as Map); @override set subList(Map? _subList) => - super.noSuchMethod(Invocation.setter(#subList, _subList), returnValueForMissingStub: null); @override @@ -956,9 +910,7 @@ class MockCentrifugeService extends _i1.Mock implements _i21.CentrifugeService { /// A class which mocks [ZuriApi]. /// /// See the documentation for Mockito's code generation for more information. - class MockZuriApi extends _i1.Mock implements _i5.ZuriApi { - @override _i3.Dio get dio => (super.noSuchMethod(Invocation.getter(#dio), returnValue: _FakeDio_2()) @@ -1097,17 +1049,13 @@ class MockZuriApi extends _i1.Mock implements _i5.ZuriApi { Invocation.method(#addMemberToOrganization, [orgId, email, token]), returnValue: Future.value()) as _i2.Future); @override - _i2.Future> fetchMembersInOrganization( - String? orgId, dynamic token) => (super.noSuchMethod( Invocation.method(#fetchMembersInOrganization, [orgId, token]), returnValue: - Future>.value(<_i25.UserSearch>[])) as _i2.Future>); - @override _i2.Future getChannelSocketId( String? channelId, String? orgId, dynamic token) => @@ -1163,14 +1111,12 @@ class MockZuriApi extends _i1.Mock implements _i5.ZuriApi { [channelMessageId, content, files, orgId, userId, channelId]), returnValue: Future.value(false)) as _i2.Future); @override - _i2.Future> fetchChannel( String? orgId, dynamic token) => (super.noSuchMethod(Invocation.method(#fetchChannel, [orgId, token]), returnValue: Future>.value(<_i19.ChannelModel>[])) as _i2.Future>); - @override _i2.Future createChannels( {String? name, @@ -1203,9 +1149,7 @@ class MockZuriApi extends _i1.Mock implements _i5.ZuriApi { super.noSuchMethod(Invocation.method( #inviteToOrganizationWithNormalMail, [organizationId, body, token])); @override - List<_i12.ThemeData> getThemes() => - (super.noSuchMethod(Invocation.method(#getThemes, []), returnValue: <_i12.ThemeData>[]) as List<_i12.ThemeData>); @override @@ -1246,10 +1190,8 @@ class MockZuriApi extends _i1.Mock implements _i5.ZuriApi { (super.noSuchMethod(Invocation.method(#handleApiError, [e]), returnValue: _FakeFailure_3()) as _i4.Failure); @override - _i2.Future uploadImage(_i24.File? image, {String? token, String? pluginId}) => - (super.noSuchMethod( Invocation.method( #uploadImage, [image], {#token: token, #pluginId: pluginId}), @@ -1365,7 +1307,6 @@ class MockJumpToApi extends _i1.Mock implements _i28.JumpToApi { <_i29.ChannelsSearch>[])) as _i2.Future>); @override - _i2.Future> fetchListOfMembers() => (super.noSuchMethod( Invocation.method(#fetchListOfMembers, []), returnValue: Future>.value(<_i25.UserSearch>[])) @@ -1375,7 +1316,6 @@ class MockJumpToApi extends _i1.Mock implements _i28.JumpToApi { (super.noSuchMethod(Invocation.method(#fetchList, []), returnValue: Future>.value(<_i25.NewUser>[])) as _i2.Future>); - @override String toString() => super.toString(); } @@ -1396,10 +1336,8 @@ class MockMediaService extends _i1.Mock implements _i30.MediaService { Invocation.method(#getVideo, [], {#fromGallery: fromGallery}), returnValue: Future<_i24.File?>.value()) as _i2.Future<_i24.File?>); @override - _i2.Future uploadImage(_i24.File? file, String? pluginId) => (super.noSuchMethod(Invocation.method(#uploadImage, [file, pluginId]), - returnValue: Future.value()) as _i2.Future); @override String toString() => super.toString(); @@ -1464,14 +1402,12 @@ class MockOrganizationApiService extends _i1.Mock returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i2.Future); @override - _i2.Future> fetchMembersInOrganization(String? orgId) => (super.noSuchMethod( Invocation.method(#fetchMembersInOrganization, [orgId]), returnValue: Future>.value(<_i25.UserSearch>[])) as _i2.Future>); - @override _i2.Future<_i7.OrganizationMemberModelList> getOrganizationMemberList( String? orgId) => From 3140d7841585b38effb1e6be8247f1741aa1f496 Mon Sep 17 00:00:00 2001 From: Lord_Chris Date: Sat, 16 Oct 2021 23:02:46 +0100 Subject: [PATCH 20/20] changes resolved --- lib/ui/shared/text_styles.dart | 3 +++ .../organization_logo.dart | 16 ++++++------ .../organization_name_url.dart | 22 ++++++++-------- .../organization_settings_view.dart | 25 +++++++------------ 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lib/ui/shared/text_styles.dart b/lib/ui/shared/text_styles.dart index a9b0ecea7..422c77a25 100644 --- a/lib/ui/shared/text_styles.dart +++ b/lib/ui/shared/text_styles.dart @@ -58,6 +58,9 @@ class AppTextStyle { static TextStyle blackSize18Bold = _base(_size18, _boldWeight, AppColors.textDark10); + static TextStyle blackSize16Bold = + _base(_size16, _boldWeight, AppColors.textDark10); + static TextStyle darkGreySize20Bold = _base(_size20, _boldWeight, AppColors.textDark10); diff --git a/lib/ui/view/organization/organization_settings/organization_logo.dart b/lib/ui/view/organization/organization_settings/organization_logo.dart index 39a94b98c..32a69bc28 100644 --- a/lib/ui/view/organization/organization_settings/organization_logo.dart +++ b/lib/ui/view/organization/organization_settings/organization_logo.dart @@ -3,7 +3,6 @@ import 'package:zurichat/ui/shared/text_styles.dart'; import 'package:stacked/stacked.dart'; import 'package:zurichat/constants/app_strings.dart'; import 'package:zurichat/models/organization_model.dart'; -import 'package:zurichat/ui/shared/colors.dart'; import 'package:zurichat/ui/shared/long_button.dart'; import 'package:zurichat/ui/shared/zuri_appbar.dart'; import 'package:zurichat/ui/shared/zuri_loader.dart'; @@ -25,8 +24,12 @@ class OrganizationLogo extends StatelessWidget { whiteBackground: true, leading: Icons.close, leadingPress: () => model.back(), - title: OrgIcon, - subtitle: '', + orgTitle: Text( + OrgIcon, + style: TextStyle( + color: Theme.of(context).textTheme.bodyText1!.color, + ), + ), actions: [ TextButton( onPressed: () => model.updateOrgLogo(org.id.toString()), @@ -78,10 +81,9 @@ class OrganizationLogo extends StatelessWidget { const SizedBox(height: 30), Text( OrgIconGuide, - style: AppTextStyle.blackSize18Bold.copyWith( - color: _dark - ? AppColors.whiteColor - : AppColors.blackColor), + style: _dark + ? AppTextStyle.whiteSize18Bold + : AppTextStyle.blackSize18Bold, ), const SizedBox(height: 10), Text( diff --git a/lib/ui/view/organization/organization_settings/organization_name_url.dart b/lib/ui/view/organization/organization_settings/organization_name_url.dart index f2949a53b..dfd10e586 100644 --- a/lib/ui/view/organization/organization_settings/organization_name_url.dart +++ b/lib/ui/view/organization/organization_settings/organization_name_url.dart @@ -29,8 +29,12 @@ class OrganizationNameUrl extends HookWidget { appBar: ZuriAppBar( whiteBackground: true, isDarkMode: _dark, - title: OrgnameUrl, - subtitle: '', + orgTitle: Text( + OrgnameUrl, + style: TextStyle( + color: Theme.of(context).textTheme.bodyText1!.color, + ), + ), leading: Icons.close, leadingPress: () => viewModel.back(), actions: [ @@ -67,10 +71,9 @@ class OrganizationNameUrl extends HookWidget { children: [ Text( OrgName, - style: AppTextStyle.blackSize18Bold.copyWith( - color: _dark - ? AppColors.whiteColor - : AppColors.blackColor), + style: _dark + ? AppTextStyle.whiteSize18Bold + : AppTextStyle.blackSize18Bold, ), const SizedBox(height: 15), Flexible( @@ -102,10 +105,9 @@ class OrganizationNameUrl extends HookWidget { children: [ Text( OrgUrl, - style: AppTextStyle.blackSize18Bold.copyWith( - color: _dark - ? AppColors.whiteColor - : AppColors.blackColor), + style: _dark + ? AppTextStyle.whiteSize18Bold + : AppTextStyle.blackSize18Bold, ), const SizedBox(height: 15), Row( diff --git a/lib/ui/view/organization/organization_settings/organization_settings_view.dart b/lib/ui/view/organization/organization_settings/organization_settings_view.dart index 0ad4b9c56..e523be1e4 100644 --- a/lib/ui/view/organization/organization_settings/organization_settings_view.dart +++ b/lib/ui/view/organization/organization_settings/organization_settings_view.dart @@ -53,10 +53,9 @@ class OrganizationSettingsView extends StatelessWidget { children: [ Text( EditOrgIcon, - style: AppTextStyle.blackSize18Bold.copyWith( - color: _dark - ? AppColors.whiteColor - : AppColors.blackColor), + style: _dark + ? AppTextStyle.whiteSize18Bold + : AppTextStyle.blackSize18Bold, ), const SizedBox(height: 10), Text( @@ -95,12 +94,9 @@ class OrganizationSettingsView extends StatelessWidget { ), TextSpan( text: org.name, - style: AppTextStyle.blackSize18Bold.copyWith( - fontSize: 16, - color: _dark - ? AppColors.whiteColor - : AppColors.blackColor, - ), + style: _dark + ? AppTextStyle.whiteSize16Bold + : AppTextStyle.blackSize16Bold, ), TextSpan( text: EditOrgNameUrlDesc2, @@ -110,12 +106,9 @@ class OrganizationSettingsView extends StatelessWidget { ), TextSpan( text: org.organizationUrl ?? '', - style: AppTextStyle.blackSize18Bold.copyWith( - fontSize: 16, - color: _dark - ? AppColors.whiteColor - : AppColors.blackColor, - ), + style: _dark + ? AppTextStyle.whiteSize16Bold + : AppTextStyle.blackSize16Bold, ), ], ),