refactor: Pages folder structure

This commit is contained in:
Krille Fear 2021-11-09 21:32:16 +01:00
parent 3342071acf
commit d46667b097
88 changed files with 188 additions and 250 deletions

View File

@ -13,17 +13,15 @@ FluffyChat tries to be as minimal as possible even in the code style. We try to
- handy_function.dart
- ...Helper functions and extensions
- /pages
- /ui
- home_view.dart
- details_view.dart
- settings_view.dart
- home.dart
- details.dart
- settings.dart
- /chat
- chat.dart
- chat_view.dart
- /chat_list
- chat_list.dart
- chat_list_view.dart
- ...The pages of the app separated in Controllers and Views
- /widgets
- /dialogs
- /list_items
- /layouts
- ...Custom widgets created for this project
- main.dart

View File

@ -2,32 +2,32 @@ import 'package:flutter/material.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/archive.dart';
import 'package:fluffychat/pages/chat.dart';
import 'package:fluffychat/pages/chat_details.dart';
import 'package:fluffychat/pages/chat_encryption_settings.dart';
import 'package:fluffychat/pages/chat_list.dart';
import 'package:fluffychat/pages/chat_permissions_settings.dart';
import 'package:fluffychat/pages/device_settings.dart';
import 'package:fluffychat/pages/homeserver_picker.dart';
import 'package:fluffychat/pages/invitation_selection.dart';
import 'package:fluffychat/pages/login.dart';
import 'package:fluffychat/pages/new_group.dart';
import 'package:fluffychat/pages/new_private_chat.dart';
import 'package:fluffychat/pages/new_space.dart';
import 'package:fluffychat/pages/search.dart';
import 'package:fluffychat/pages/settings.dart';
import 'package:fluffychat/pages/settings_3pid.dart';
import 'package:fluffychat/pages/settings_account.dart';
import 'package:fluffychat/pages/settings_chat.dart';
import 'package:fluffychat/pages/settings_emotes.dart';
import 'package:fluffychat/pages/settings_ignore_list.dart';
import 'package:fluffychat/pages/settings_multiple_emotes.dart';
import 'package:fluffychat/pages/settings_notifications.dart';
import 'package:fluffychat/pages/settings_security.dart';
import 'package:fluffychat/pages/settings_style.dart';
import 'package:fluffychat/pages/signup.dart';
import 'package:fluffychat/pages/views/empty_page_view.dart';
import 'package:fluffychat/pages/archive/archive.dart';
import 'package:fluffychat/pages/chat/chat.dart';
import 'package:fluffychat/pages/chat_details/chat_details.dart';
import 'package:fluffychat/pages/chat_encryption_settings/chat_encryption_settings.dart';
import 'package:fluffychat/pages/chat_list/chat_list.dart';
import 'package:fluffychat/pages/chat_permissions_settings/chat_permissions_settings.dart';
import 'package:fluffychat/pages/device_settings/device_settings.dart';
import 'package:fluffychat/pages/homeserver_picker/homeserver_picker.dart';
import 'package:fluffychat/pages/invitation_selection/invitation_selection.dart';
import 'package:fluffychat/pages/login/login.dart';
import 'package:fluffychat/pages/new_group/new_group.dart';
import 'package:fluffychat/pages/new_private_chat/new_private_chat.dart';
import 'package:fluffychat/pages/new_space/new_space.dart';
import 'package:fluffychat/pages/search/search.dart';
import 'package:fluffychat/pages/settings/settings.dart';
import 'package:fluffychat/pages/settings_3pid/settings_3pid.dart';
import 'package:fluffychat/pages/settings_account/settings_account.dart';
import 'package:fluffychat/pages/settings_chat/settings_chat.dart';
import 'package:fluffychat/pages/settings_emotes/settings_emotes.dart';
import 'package:fluffychat/pages/settings_ignore_list/settings_ignore_list.dart';
import 'package:fluffychat/pages/settings_multiple_emotes/settings_multiple_emotes.dart';
import 'package:fluffychat/pages/settings_notifications/settings_notifications.dart';
import 'package:fluffychat/pages/settings_security/settings_security.dart';
import 'package:fluffychat/pages/settings_style/settings_style.dart';
import 'package:fluffychat/pages/sign_up/signup.dart';
import 'package:fluffychat/widgets/layouts/empty_page.dart';
import 'package:fluffychat/widgets/layouts/loading_view.dart';
import 'package:fluffychat/widgets/layouts/side_view_layout.dart';
import 'package:fluffychat/widgets/layouts/two_column_layout.dart';

View File

@ -5,7 +5,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/pages/views/archive_view.dart';
import 'package:fluffychat/pages/archive/archive_view.dart';
import 'package:fluffychat/widgets/matrix.dart';
class Archive extends StatefulWidget {

View File

@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/pages/archive.dart';
import 'package:fluffychat/widgets/list_items/chat_list_item.dart';
import 'package:fluffychat/pages/archive/archive.dart';
import 'package:fluffychat/pages/chat_list/chat_list_item.dart';
class ArchiveView extends StatelessWidget {
final ArchiveController controller;

View File

@ -12,7 +12,7 @@ import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/adaptive_flat_button.dart';
import 'key_verification_dialog.dart';
import '../key_verification/key_verification_dialog.dart';
class BootstrapDialog extends StatefulWidget {
final bool wipe;

View File

@ -20,17 +20,17 @@ import 'package:url_launcher/url_launcher.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pages/recording_dialog.dart';
import 'package:fluffychat/pages/views/chat_view.dart';
import 'package:fluffychat/pages/chat/chat_view.dart';
import 'package:fluffychat/pages/chat/recording_dialog.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../utils/account_bundles.dart';
import '../utils/localized_exception_extension.dart';
import '../utils/matrix_sdk_extensions.dart/filtered_timeline_extension.dart';
import '../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart';
import 'send_file_dialog.dart';
import 'send_location_dialog.dart';
import '../../utils/account_bundles.dart';
import '../../utils/localized_exception_extension.dart';
import '../../utils/matrix_sdk_extensions.dart/filtered_timeline_extension.dart';
import '../../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart';
import '../new_private_chat/send_file_dialog.dart';
import '../new_private_chat/send_location_dialog.dart';
import 'sticker_picker_dialog.dart';
class Chat extends StatefulWidget {

View File

@ -15,21 +15,21 @@ import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/app_emojis.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/pages/chat.dart';
import 'package:fluffychat/pages/user_bottom_sheet.dart';
import 'package:fluffychat/pages/chat/chat.dart';
import 'package:fluffychat/pages/chat/encryption_button.dart';
import 'package:fluffychat/pages/chat/input_bar.dart';
import 'package:fluffychat/pages/user_bottom_sheet/user_bottom_sheet.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/utils/room_status_extension.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/chat_settings_popup_menu.dart';
import 'package:fluffychat/widgets/connection_status_header.dart';
import 'package:fluffychat/widgets/encryption_button.dart';
import 'package:fluffychat/widgets/event_content/message.dart';
import 'package:fluffychat/widgets/event_content/reply_content.dart';
import 'package:fluffychat/widgets/input_bar.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'package:fluffychat/widgets/unread_badge_back_button.dart';
import '../../utils/stream_extension.dart';
import 'events/message.dart';
import 'events/reply_content.dart';
class ChatView extends StatelessWidget {
final ChatController controller;

View File

@ -8,7 +8,7 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'matrix.dart';
import '../../widgets/matrix.dart';
class EncryptionButton extends StatefulWidget {
final Room room;

View File

@ -10,7 +10,7 @@ import 'package:matrix/matrix.dart';
import 'package:path_provider/path_provider.dart';
import 'package:fluffychat/utils/sentry_controller.dart';
import '../../utils/matrix_sdk_extensions.dart/event_extension.dart';
import '../../../utils/matrix_sdk_extensions.dart/event_extension.dart';
class AudioPlayerWidget extends StatefulWidget {
final Color color;

View File

@ -4,12 +4,12 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_matrix_html/flutter_html.dart';
import 'package:matrix/matrix.dart';
import '../../config/app_config.dart';
import '../../config/setting_keys.dart';
import '../../pages/image_viewer.dart';
import '../../utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import '../../utils/url_launcher.dart';
import '../matrix.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../../../config/app_config.dart';
import '../../../config/setting_keys.dart';
import '../../../pages/image_viewer/image_viewer.dart';
import '../../../utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import '../../../utils/url_launcher.dart';
class HtmlMessage extends StatelessWidget {
final String html;

View File

@ -10,9 +10,9 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:lottie/lottie.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/pages/image_viewer.dart';
import '../../utils/matrix_sdk_extensions.dart/event_extension.dart';
import '../matrix.dart';
import 'package:fluffychat/pages/image_viewer/image_viewer.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../../../utils/matrix_sdk_extensions.dart/event_extension.dart';
class ImageBubble extends StatefulWidget {
final Event event;

View File

@ -6,12 +6,12 @@ import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/utils/date_time_extension.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart';
import 'package:fluffychat/utils/string_color.dart';
import 'package:fluffychat/widgets/event_content/message_content.dart';
import 'package:fluffychat/widgets/event_content/reply_content.dart';
import '../../config/app_config.dart';
import '../avatar.dart';
import '../matrix.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../../../config/app_config.dart';
import 'message_content.dart';
import 'message_reactions.dart';
import 'reply_content.dart';
import 'state_message.dart';
import 'verification_request_content.dart';

View File

@ -7,17 +7,17 @@ import 'package:matrix/matrix.dart';
import 'package:matrix_link_text/link_text.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:fluffychat/pages/key_verification_dialog.dart';
import 'package:fluffychat/pages/key_verification/key_verification_dialog.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import 'package:fluffychat/widgets/event_content/audio_player.dart';
import 'package:fluffychat/widgets/event_content/image_bubble.dart';
import '../../config/app_config.dart';
import '../../pages/video_viewer.dart';
import '../../utils/platform_infos.dart';
import '../../utils/url_launcher.dart';
import '../matrix.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../../../config/app_config.dart';
import '../../../pages/video_viewer/video_viewer.dart';
import '../../../utils/platform_infos.dart';
import '../../../utils/url_launcher.dart';
import 'audio_player.dart';
import 'html_message.dart';
import 'image_bubble.dart';
import 'map_bubble.dart';
import 'message_download_content.dart';
import 'sticker.dart';

View File

@ -8,7 +8,7 @@ import 'package:matrix/matrix.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/avatar.dart';
import '../matrix.dart';
import 'package:fluffychat/widgets/matrix.dart';
class MessageReactions extends StatelessWidget {
final Event event;

View File

@ -4,7 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import '../../config/app_config.dart';
import '../../../config/app_config.dart';
import 'html_message.dart';
class ReplyContent extends StatelessWidget {

View File

@ -4,7 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import '../../config/app_config.dart';
import '../../../config/app_config.dart';
class StateMessage extends StatelessWidget {
final Event event;

View File

@ -4,7 +4,7 @@ import 'package:adaptive_dialog/adaptive_dialog.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import '../../config/app_config.dart';
import '../../../config/app_config.dart';
import 'image_bubble.dart';
class Sticker extends StatefulWidget {

View File

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import '../../config/app_config.dart';
import '../../../config/app_config.dart';
class VerificationRequestContent extends StatelessWidget {
final Event event;

View File

@ -10,8 +10,8 @@ import 'package:slugify/slugify.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'avatar.dart';
import 'matrix.dart';
import '../../widgets/avatar.dart';
import '../../widgets/matrix.dart';
class InputBar extends StatelessWidget {
final Room room;

View File

@ -4,9 +4,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import '../widgets/avatar.dart';
import '../widgets/default_app_bar_search_field.dart';
import '../widgets/event_content/image_bubble.dart';
import '../../widgets/avatar.dart';
import '../../widgets/default_app_bar_search_field.dart';
import 'events/image_bubble.dart';
class StickerPickerDialog extends StatefulWidget {
final Room room;

View File

@ -9,7 +9,7 @@ import 'package:image_picker/image_picker.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/views/chat_details_view.dart';
import 'package:fluffychat/pages/chat_details/chat_details_view.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/matrix.dart';

View File

@ -6,14 +6,14 @@ import 'package:matrix_link_text/link_text.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pages/chat_details.dart';
import 'package:fluffychat/pages/chat_details/chat_details.dart';
import 'package:fluffychat/pages/chat_details/participant_list_item.dart';
import 'package:fluffychat/utils/fluffy_share.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/chat_settings_popup_menu.dart';
import 'package:fluffychat/widgets/content_banner.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/list_items/participant_list_item.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../../utils/url_launcher.dart';

View File

@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import '../../pages/user_bottom_sheet.dart';
import '../avatar.dart';
import '../../widgets/avatar.dart';
import '../user_bottom_sheet/user_bottom_sheet.dart';
class ParticipantListItem extends StatelessWidget {
final User user;

View File

@ -4,9 +4,9 @@ import 'package:matrix/encryption.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/views/chat_encryption_settings_view.dart';
import 'package:fluffychat/pages/chat_encryption_settings/chat_encryption_settings_view.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'key_verification_dialog.dart';
import '../key_verification/key_verification_dialog.dart';
class ChatEncryptionSettings extends StatefulWidget {
const ChatEncryptionSettings({Key key}) : super(key: key);

View File

@ -4,7 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/chat_encryption_settings.dart';
import 'package:fluffychat/pages/chat_encryption_settings/chat_encryption_settings.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/matrix.dart';

View File

@ -15,16 +15,16 @@ import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/setting_keys.dart';
import 'package:fluffychat/pages/views/chat_list_view.dart';
import 'package:fluffychat/pages/chat_list/chat_list_view.dart';
import 'package:fluffychat/utils/fluffy_share.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/flutter_matrix_hive_database.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import '../../utils/account_bundles.dart';
import '../main.dart';
import '../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart';
import '../utils/url_launcher.dart';
import '../widgets/matrix.dart';
import 'bootstrap_dialog.dart';
import '../../../utils/account_bundles.dart';
import '../../main.dart';
import '../../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart';
import '../../utils/url_launcher.dart';
import '../../widgets/matrix.dart';
import '../bootstrap/bootstrap_dialog.dart';
enum SelectMode { normal, share, select }
enum PopupMenuAction {

View File

@ -11,10 +11,10 @@ import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/event_extension.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions.dart/matrix_locals.dart';
import 'package:fluffychat/utils/room_status_extension.dart';
import '../../pages/send_file_dialog.dart';
import '../../utils/date_time_extension.dart';
import '../avatar.dart';
import '../matrix.dart';
import '../../widgets/avatar.dart';
import '../../widgets/matrix.dart';
import '../new_private_chat/send_file_dialog.dart';
enum ArchivedRoomAction { delete, rejoin }

View File

@ -12,10 +12,10 @@ import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/pages/chat_list.dart';
import 'package:fluffychat/pages/chat_list/chat_list.dart';
import 'package:fluffychat/pages/chat_list/chat_list_item.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/connection_status_header.dart';
import 'package:fluffychat/widgets/list_items/chat_list_item.dart';
import '../../utils/account_bundles.dart';
import '../../utils/stream_extension.dart';
import '../../widgets/matrix.dart';

View File

@ -8,9 +8,9 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/permission_slider_dialog.dart';
import 'package:fluffychat/pages/views/chat_permissions_settings_view.dart';
import 'package:fluffychat/pages/chat_permissions_settings/chat_permissions_settings_view.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'package:fluffychat/widgets/permission_slider_dialog.dart';
class ChatPermissionsSettings extends StatefulWidget {
const ChatPermissionsSettings({Key key}) : super(key: key);

View File

@ -4,9 +4,9 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/chat_permissions_settings.dart';
import 'package:fluffychat/pages/chat_permissions_settings/chat_permissions_settings.dart';
import 'package:fluffychat/pages/chat_permissions_settings/permission_list_tile.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/list_items/permission_list_tile.dart';
import 'package:fluffychat/widgets/matrix.dart';
class ChatPermissionsSettingsView extends StatelessWidget {

View File

@ -6,9 +6,9 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/encryption/utils/key_verification.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/pages/key_verification_dialog.dart';
import 'package:fluffychat/pages/views/device_settings_view.dart';
import '../widgets/matrix.dart';
import 'package:fluffychat/pages/device_settings/device_settings_view.dart';
import 'package:fluffychat/pages/key_verification/key_verification_dialog.dart';
import '../../widgets/matrix.dart';
class DevicesSettings extends StatefulWidget {
const DevicesSettings({Key key}) : super(key: key);

View File

@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/pages/device_settings.dart';
import 'package:fluffychat/pages/device_settings/device_settings.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import '../../widgets/list_items/user_device_list_item.dart';
import 'user_device_list_item.dart';
class DevicesSettingsView extends StatelessWidget {
final DevicesSettingsController controller;

View File

@ -6,7 +6,7 @@ import 'package:matrix/matrix.dart';
import '../../utils/date_time_extension.dart';
import '../../utils/matrix_sdk_extensions.dart/device_extension.dart';
import '../matrix.dart';
import '../../widgets/matrix.dart';
enum UserDeviceListItemAction {
rename,

View File

@ -13,12 +13,12 @@ import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/setting_keys.dart';
import 'package:fluffychat/pages/views/homeserver_picker_view.dart';
import 'package:fluffychat/pages/homeserver_picker/homeserver_picker_view.dart';
import 'package:fluffychat/utils/famedlysdk_store.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../main.dart';
import '../utils/localized_exception_extension.dart';
import '../../main.dart';
import '../../utils/localized_exception_extension.dart';
class HomeserverPicker extends StatefulWidget {
const HomeserverPicker({Key key}) : super(key: key);

View File

@ -15,7 +15,7 @@ import 'package:fluffychat/widgets/fluffy_banner.dart';
import 'package:fluffychat/widgets/layouts/one_page_card.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../../utils/localized_exception_extension.dart';
import '../homeserver_picker.dart';
import 'homeserver_picker.dart';
class HomeserverPickerView extends StatelessWidget {
final HomeserverPickerController controller;

View File

@ -3,10 +3,10 @@ import 'package:flutter/material.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/views/image_viewer_view.dart';
import 'package:fluffychat/pages/image_viewer/image_viewer_view.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../utils/matrix_sdk_extensions.dart/event_extension.dart';
import '../../utils/matrix_sdk_extensions.dart/event_extension.dart';
class ImageViewer extends StatefulWidget {
final Event event;

View File

@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/widgets/event_content/image_bubble.dart';
import '../image_viewer.dart';
import 'package:fluffychat/pages/chat/events/image_bubble.dart';
import 'image_viewer.dart';
class ImageViewerView extends StatelessWidget {
final ImageViewerController controller;

View File

@ -7,9 +7,9 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/views/invitation_selection_view.dart';
import 'package:fluffychat/pages/invitation_selection/invitation_selection_view.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../utils/localized_exception_extension.dart';
import '../../utils/localized_exception_extension.dart';
class InvitationSelection extends StatefulWidget {
const InvitationSelection({Key key}) : super(key: key);

View File

@ -4,7 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/invitation_selection.dart';
import 'package:fluffychat/pages/invitation_selection/invitation_selection.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/default_app_bar_search_field.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';

View File

@ -13,8 +13,8 @@ import 'package:matrix/matrix.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/avatar.dart';
import '../utils/beautify_string_extension.dart';
import '../widgets/adaptive_flat_button.dart';
import '../../utils/beautify_string_extension.dart';
import '../../widgets/adaptive_flat_button.dart';
class KeyVerificationDialog extends StatefulWidget {
Future<void> show(BuildContext context) => PlatformInfos.isCupertinoStyle

View File

@ -9,10 +9,10 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../config/app_config.dart';
import '../config/setting_keys.dart';
import '../utils/platform_infos.dart';
import 'views/login_view.dart';
import '../../config/app_config.dart';
import '../../config/setting_keys.dart';
import '../../utils/platform_infos.dart';
import 'login_view.dart';
class Login extends StatefulWidget {
const Login({Key key}) : super(key: key);

View File

@ -4,7 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/widgets/layouts/one_page_card.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../login.dart';
import 'login.dart';
class LoginView extends StatelessWidget {
final LoginController controller;

View File

@ -4,7 +4,7 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart' as sdk;
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/views/new_group_view.dart';
import 'package:fluffychat/pages/new_group/new_group_view.dart';
import 'package:fluffychat/widgets/matrix.dart';
class NewGroup extends StatefulWidget {

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/pages/new_group.dart';
import 'package:fluffychat/pages/new_group/new_group.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
class NewGroupView extends StatelessWidget {

View File

@ -4,8 +4,8 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:fluffychat/pages/qr_scanner_modal.dart';
import 'package:fluffychat/pages/views/new_private_chat_view.dart';
import 'package:fluffychat/pages/new_private_chat/new_private_chat_view.dart';
import 'package:fluffychat/pages/new_private_chat/qr_scanner_modal.dart';
import 'package:fluffychat/utils/fluffy_share.dart';
import 'package:fluffychat/utils/url_launcher.dart';
import 'package:fluffychat/widgets/matrix.dart';

View File

@ -7,7 +7,7 @@ import 'package:qr_flutter/qr_flutter.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pages/new_private_chat.dart';
import 'package:fluffychat/pages/new_private_chat/new_private_chat.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/matrix.dart';

View File

@ -4,9 +4,9 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import '../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart';
import '../utils/resize_image.dart';
import '../utils/room_send_file_extension.dart';
import '../../utils/matrix_sdk_extensions.dart/matrix_file_extension.dart';
import '../../utils/resize_image.dart';
import '../../utils/room_send_file_extension.dart';
class SendFileDialog extends StatefulWidget {
final Room room;

View File

@ -8,8 +8,8 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:geolocator/geolocator.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/pages/chat/events/map_bubble.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import '../widgets/event_content/map_bubble.dart';
class SendLocationDialog extends StatefulWidget {
final Room room;

View File

@ -5,7 +5,7 @@ import 'package:matrix/matrix.dart' as sdk;
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/views/new_space_view.dart';
import 'package:fluffychat/pages/new_space/new_space_view.dart';
import 'package:fluffychat/widgets/matrix.dart';
class NewSpace extends StatefulWidget {

View File

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import '../new_space.dart';
import 'new_space.dart';
class NewSpaceView extends StatelessWidget {
final NewSpaceController controller;

View File

@ -9,7 +9,7 @@ import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'views/search_view.dart';
import 'search_view.dart';
class Search extends StatefulWidget {
const Search({Key key}) : super(key: key);

View File

@ -5,14 +5,14 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/chat_list/chat_list_item.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/contacts_list.dart';
import 'package:fluffychat/widgets/default_app_bar_search_field.dart';
import 'package:fluffychat/widgets/list_items/chat_list_item.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../../utils/localized_exception_extension.dart';
import '../../utils/platform_infos.dart';
import '../search.dart';
import 'search.dart';
class SearchView extends StatelessWidget {
final SearchController controller;

View File

@ -11,8 +11,8 @@ import 'package:matrix/matrix.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/utils/sentry_controller.dart';
import '../widgets/matrix.dart';
import 'views/settings_view.dart';
import '../../widgets/matrix.dart';
import 'settings_view.dart';
class Settings extends StatefulWidget {
const Settings({Key key}) : super(key: key);

View File

@ -8,7 +8,7 @@ import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import '../../config/app_config.dart';
import '../../widgets/content_banner.dart';
import '../settings.dart';
import 'settings.dart';
class SettingsView extends StatelessWidget {
final SettingsController controller;

View File

@ -6,7 +6,7 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'views/settings_3pid_view.dart';
import 'settings_3pid_view.dart';
class Settings3Pid extends StatefulWidget {
static int sendAttempt = 0;

View File

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/pages/settings_3pid.dart';
import 'package:fluffychat/pages/settings_3pid/settings_3pid.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/matrix.dart';

View File

@ -8,7 +8,7 @@ import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/setting_keys.dart';
import 'package:fluffychat/pages/views/settings_account_view.dart';
import 'package:fluffychat/pages/settings_account/settings_account_view.dart';
import 'package:fluffychat/widgets/matrix.dart';
class SettingsAccount extends StatefulWidget {

View File

@ -8,7 +8,7 @@ import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/utils/fluffy_share.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../settings_account.dart';
import 'settings_account.dart';
class SettingsAccountView extends StatelessWidget {
final SettingsAccountController controller;

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'views/settings_chat_view.dart';
import 'settings_chat_view.dart';
class SettingsChat extends StatefulWidget {
const SettingsChat({Key key}) : super(key: key);

View File

@ -8,7 +8,7 @@ import 'package:fluffychat/config/setting_keys.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/settings_switch_list_tile.dart';
import '../settings_chat.dart';
import 'settings_chat.dart';
class SettingsChatView extends StatelessWidget {
final SettingsChatController controller;

View File

@ -8,9 +8,9 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import '../utils/resize_image.dart';
import '../widgets/matrix.dart';
import 'views/settings_emotes_view.dart';
import '../../utils/resize_image.dart';
import '../../widgets/matrix.dart';
import 'settings_emotes_view.dart';
class EmotesSettings extends StatefulWidget {
const EmotesSettings({Key key}) : super(key: key);

View File

@ -9,7 +9,7 @@ import 'package:matrix/matrix.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import '../../widgets/matrix.dart';
import '../settings_emotes.dart';
import 'settings_emotes.dart';
class EmotesSettingsView extends StatelessWidget {
final EmotesSettingsController controller;

View File

@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:future_loading_dialog/future_loading_dialog.dart';
import '../widgets/matrix.dart';
import 'views/settings_ignore_list_view.dart';
import '../../widgets/matrix.dart';
import 'settings_ignore_list_view.dart';
class SettingsIgnoreList extends StatefulWidget {
final String initialUserId;

View File

@ -7,7 +7,7 @@ import 'package:matrix/matrix.dart';
import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import '../../widgets/matrix.dart';
import '../settings_ignore_list.dart';
import 'settings_ignore_list.dart';
class SettingsIgnoreListView extends StatelessWidget {
final SettingsIgnoreListController controller;

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:vrouter/vrouter.dart';
import 'views/settings_multiple_emotes_view.dart';
import 'settings_multiple_emotes_view.dart';
class MultipleEmotesSettings extends StatefulWidget {
const MultipleEmotesSettings({Key key}) : super(key: key);

View File

@ -4,7 +4,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/settings_multiple_emotes.dart';
import 'package:fluffychat/pages/settings_multiple_emotes/settings_multiple_emotes.dart';
import 'package:fluffychat/widgets/matrix.dart';
class MultipleEmotesSettingsView extends StatelessWidget {

View File

@ -7,8 +7,8 @@ import 'package:matrix/matrix.dart';
import 'package:open_noti_settings/open_noti_settings.dart';
import 'package:fluffychat/config/app_config.dart';
import '../widgets/matrix.dart';
import 'views/settings_notifications_view.dart';
import '../../widgets/matrix.dart';
import 'settings_notifications_view.dart';
class NotificationSettingsItem {
final PushRuleKind type;

View File

@ -10,7 +10,7 @@ import 'package:matrix/matrix.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import '../../utils/localized_exception_extension.dart';
import '../../widgets/matrix.dart';
import '../settings_notifications.dart';
import 'settings_notifications.dart';
class SettingsNotificationsView extends StatelessWidget {
final SettingsNotificationsController controller;

View File

@ -8,8 +8,8 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:fluffychat/config/setting_keys.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'bootstrap_dialog.dart';
import 'views/settings_security_view.dart';
import '../bootstrap/bootstrap_dialog.dart';
import 'settings_security_view.dart';
class SettingsSecurity extends StatefulWidget {
const SettingsSecurity({Key key}) : super(key: key);

View File

@ -8,7 +8,7 @@ import 'package:fluffychat/utils/beautify_string_extension.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../settings_security.dart';
import 'settings_security.dart';
class SettingsSecurityView extends StatelessWidget {
final SettingsSecurityController controller;

View File

@ -7,8 +7,8 @@ import 'package:file_picker_cross/file_picker_cross.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/setting_keys.dart';
import '../widgets/matrix.dart';
import 'views/settings_style_view.dart';
import '../../widgets/matrix.dart';
import 'settings_style_view.dart';
class SettingsStyle extends StatefulWidget {
const SettingsStyle({Key key}) : super(key: key);

View File

@ -6,7 +6,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import '../../config/app_config.dart';
import '../../widgets/matrix.dart';
import '../settings_style.dart';
import 'settings_style.dart';
class SettingsStyleView extends StatelessWidget {
final SettingsStyleController controller;

View File

@ -3,10 +3,10 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/views/signup_view.dart';
import 'package:fluffychat/pages/sign_up/signup_view.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/matrix.dart';
import '../utils/localized_exception_extension.dart';
import '../../utils/localized_exception_extension.dart';
class SignupPage extends StatefulWidget {
const SignupPage({Key key}) : super(key: key);

View File

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/widgets/layouts/one_page_card.dart';
import '../signup.dart';
import 'signup.dart';
class SignupPageView extends StatelessWidget {
final SignupPageController controller;

View File

@ -6,9 +6,9 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/permission_slider_dialog.dart';
import '../widgets/matrix.dart';
import 'views/user_bottom_sheet_view.dart';
import 'package:fluffychat/widgets/permission_slider_dialog.dart';
import '../../widgets/matrix.dart';
import 'user_bottom_sheet_view.dart';
class UserBottomSheet extends StatefulWidget {
final User user;

View File

@ -10,7 +10,7 @@ import 'package:fluffychat/utils/fluffy_share.dart';
import '../../utils/matrix_sdk_extensions.dart/presence_extension.dart';
import '../../widgets/content_banner.dart';
import '../../widgets/matrix.dart';
import '../user_bottom_sheet.dart';
import 'user_bottom_sheet.dart';
class UserBottomSheetView extends StatelessWidget {
final UserBottomSheetController controller;

View File

@ -8,10 +8,10 @@ import 'package:path_provider/path_provider.dart';
import 'package:video_player/video_player.dart';
import 'package:vrouter/vrouter.dart';
import '../utils/matrix_sdk_extensions.dart/event_extension.dart';
import '../utils/platform_infos.dart';
import '../widgets/matrix.dart';
import 'views/video_viewer_view.dart';
import '../../utils/matrix_sdk_extensions.dart/event_extension.dart';
import '../../utils/platform_infos.dart';
import '../../widgets/matrix.dart';
import 'video_viewer_view.dart';
class VideoViewer extends StatefulWidget {
final Event event;

View File

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:chewie/chewie.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import '../video_viewer.dart';
import 'video_viewer.dart';
class VideoViewerView extends StatelessWidget {
final VideoViewerController controller;

View File

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/pages/views/empty_page_view.dart';
import 'package:fluffychat/widgets/layouts/empty_page.dart';
import 'package:fluffychat/widgets/matrix.dart';
class LoadingView extends StatelessWidget {

View File

@ -1,60 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:vrouter/vrouter.dart';
import '../avatar.dart';
import '../matrix.dart';
class PublicRoomListItem extends StatelessWidget {
final PublicRoomsChunk publicRoomEntry;
const PublicRoomListItem(this.publicRoomEntry, {Key key}) : super(key: key);
void joinAction(BuildContext context) async {
final success = await showFutureLoadingDialog(
context: context,
future: () => _joinRoomAndWait(context),
);
if (success.error == null) {
VRouter.of(context).toSegments(['rooms', success.result]);
}
}
Future<String> _joinRoomAndWait(BuildContext context) async {
final roomId =
await Matrix.of(context).client.joinRoom(publicRoomEntry.roomId);
if (Matrix.of(context).client.getRoomById(roomId) == null) {
await Matrix.of(context)
.client
.onSync
.stream
.firstWhere((u) => u.rooms?.join?.containsKey(roomId) ?? false);
}
return roomId;
}
@override
Widget build(BuildContext context) {
final hasTopic =
publicRoomEntry.topic != null && publicRoomEntry.topic.isNotEmpty;
return ListTile(
leading: Avatar(publicRoomEntry.avatarUrl, publicRoomEntry.name),
title: Text(hasTopic
? '${publicRoomEntry.name} (${publicRoomEntry.numJoinedMembers})'
: publicRoomEntry.name),
subtitle: Text(
hasTopic
? publicRoomEntry.topic
: publicRoomEntry.numJoinedMembers == null
? L10n.of(context).joinRoom
: L10n.of(context).countParticipants(
publicRoomEntry.numJoinedMembers.toString()),
maxLines: 1,
),
onTap: () => joinAction(context),
);
}
}

View File

@ -24,7 +24,7 @@ import 'package:fluffychat/utils/sentry_controller.dart';
import 'package:fluffychat/utils/uia_request_manager.dart';
import '../config/app_config.dart';
import '../config/setting_keys.dart';
import '../pages/key_verification_dialog.dart';
import '../pages/key_verification/key_verification_dialog.dart';
import '../utils/account_bundles.dart';
import '../utils/background_push.dart';
import '../utils/famedlysdk_store.dart';