Skip to content

Commit

Permalink
chore: create common to avoid duplicating
Browse files Browse the repository at this point in the history
  • Loading branch information
sonle-geekyants committed Jan 2, 2024
1 parent 9094b7d commit bd3e6e9
Show file tree
Hide file tree
Showing 43 changed files with 482 additions and 5,365 deletions.
2 changes: 1 addition & 1 deletion lib/data_models/enums/group_card_state.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
enum GroupCardState {disable, expanded, add}
enum GroupCardState { disable, expanded, add }
2 changes: 1 addition & 1 deletion lib/data_models/menu_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ class MenuItem {
this.isUrl,
this.isEmail,
});
}
}
18 changes: 1 addition & 17 deletions lib/desktop_routes/desktop_route_names.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,8 @@ class DesktopRoutes {
static const String DEKSTOP_MYFILES = 'desktop_my_files';
static const String DESKTOP_CATEGORY_FILES = 'desktop_category_files';
static const String DEKSTOP_CONTACTS_SCREEN = 'desktop_contacts_screen';
static const String DEKSTOP_BLOCKED_CONTACTS_SCREEN =
'desktop_blocked_contacts_screen';

static const String DESKTOP_TRUSTED_SENDER = 'desktop_trusted_sender';
static const String DESKTOP_EMPTY_TRUSTED_SENDER =
'desktop_empty_trusted_sender';
static const DESKTOP_GROUP = 'desktop_group';
static const DESKTOP_GROUP_VIEW = 'desktop_group_view';
static const DESKT_FAQ = 'desktop_faq';
static const DESKTOP_DOWNLOAD_ALL = 'desktop_download_all_files';
static const String DESKTOP_SETTINGS = 'desktop_settings';

/// Group left half routes
static const String DESKTOP_GROUP_LEFT_INITIAL = 'desktop_group_left_initial';
static const String DESKTOP_GROUP_LIST = 'desktop_group_list';

/// Group right half routes
static const String DESKTOP_GROUP_RIGHT_INITIAL =
'desktop_group_right_initial';
static const String DESKTOP_NEW_GROUP = 'desktop_new_group';
static const String DESKTOP_GROUP_DETAIL = 'desktop_group_detail';
}
28 changes: 0 additions & 28 deletions lib/desktop_routes/desktop_routes.dart
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
import 'package:at_contacts_group_flutter/services/group_service.dart';
import 'package:atsign_atmosphere_pro/data_models/file_modal.dart';
import 'package:atsign_atmosphere_pro/desktop_routes/desktop_route_names.dart';
import 'package:atsign_atmosphere_pro/desktop_screens/desktop_download_all_files/desktop_download_all_file.dart';
import 'package:atsign_atmosphere_pro/desktop_screens/desktop_home/desktop_home.dart';
import 'package:atsign_atmosphere_pro/desktop_screens/trusted_sender/widgets/desktop_empty_trusted_sender.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/contacts_screen/desktop_contact_screen.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/groups_screen/desktop_groups_screen.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/settings_screen/blocked_contacts.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/settings_screen/settings_desktop.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/my_files_screen/desktop_myfiles.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/my_files_screen/widgets/category_screen.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/history_screen/history_desktop.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/trusted_senders_screen/desktop_trusted.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/transfer_screen/file_transfer_screen.dart';
import 'package:atsign_atmosphere_pro/desktop_screens_new/welcome_screen/desktop_home_screen.dart';
import 'package:atsign_atmosphere_pro/screens/common_widgets/website_webview.dart';
import 'package:flutter/material.dart';
import 'package:atsign_atmosphere_pro/services/navigation_service.dart';
import 'package:provider/provider.dart';
import 'package:atsign_atmosphere_pro/view_models/base_model.dart';
import 'package:atsign_atmosphere_pro/utils/constants.dart';

class DesktopSetupRoutes {
static String initialRoute = DesktopRoutes.DESKTOP_HOME;
Expand All @@ -36,16 +31,6 @@ class DesktopSetupRoutes {
};
}

// // ignore: missing_return
// static MaterialPageRoute<dynamic> nested_routes(name) {
// switch (name) {
// case DesktopRoutes.DESKTOP_HOME_NESTED_INITIAL:
// return MaterialPageRoute(builder: (context) => DesktopWelcomeScreen());
// case DesktopRoutes.DESKTOP_HISTORY:
// return MaterialPageRoute(builder: (context) => DesktopHistoryScreen());
// }
// }

static Map<String, WidgetBuilder> routeBuilders(
BuildContext context, RouteSettings routeSettings) {
return {
Expand All @@ -71,23 +56,10 @@ class DesktopSetupRoutes {
DesktopRoutes.DEKSTOP_CONTACTS_SCREEN: (context) {
return DesktopContactScreen();
},
DesktopRoutes.DESKTOP_DOWNLOAD_ALL: (context) {
return DesktopDownloadAllFiles();
},
DesktopRoutes.DEKSTOP_BLOCKED_CONTACTS_SCREEN: (context) {
return DesktopBlockedContacts();
},
DesktopRoutes.DESKTOP_SETTINGS: (context) => SettingsScreenDesktop(),
DesktopRoutes.DESKTOP_TRUSTED_SENDER: (context) => DesktopTrustedScreen(),
DesktopRoutes.DESKTOP_EMPTY_TRUSTED_SENDER: (context) =>
DesktopEmptySender(),
DesktopRoutes.DESKTOP_GROUP: (context) => DesktopGroupsScreen(),
// => DesktopEmptyGroup(),

DesktopRoutes.DESKT_FAQ: (context) => WebsiteScreen(
title: 'FAQ',
url: '${MixedConstants.WEBSITE_URL}/faqs',
),
};
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit bd3e6e9

Please sign in to comment.