App Report 2 - ISIS-3510-Mobiles/Flutter GitHub Wiki

Team 24 - Dart

Highlights

1. Recommendations

We got all 15 points on App report 1 so no changes were made

2. Repo Link

https://github.com/ReVanced

App Report 1

1. Chosen APP

ReVanced is an application designed to enhance the YouTube experience by providing additional features and customizations not available in the official YouTube app. Here’s a thorough description of ReVanced: Core Functionalities

  • Ad Blocking: One of the primary features of ReVanced is its ability to block ads, both pre-roll and mid-roll, which can enhance the viewing experience by eliminating interruptions.
  • Background Playback: The app allows videos to continue playing in the background while users use other apps or when the screen is turned off. This is particularly useful for listening to music or podcasts.
  • Picture-in-Picture (PiP) Mode: Users can watch videos in a small, resizable window while navigating other applications on their device.
  • Customization Options: ReVanced offers a variety of customization options for the user interface and playback settings, such as themes, video quality controls, and gesture-based controls.
  • Enhanced Privacy Controls: The app may include features to improve privacy, such as disabling tracking and analytics.

Revenue Model

ReVanced itself is not a monetized app; instead, it’s often distributed as a free and open-source tool. However, its development and maintenance might be supported through donations or crowdfunding. Since it’s not an official app, it doesn't generate revenue through traditional means such as ads or in-app purchases. The model relies on community support and voluntary contributions.

Downloads and Popularity

ReVanced is not available through traditional app stores like Google Play or the Apple App Store, which can make it harder to gauge exact download numbers. Its distribution typically occurs through third-party sources and forums, and its popularity can vary based on its visibility and user recommendations. Estimates or exact numbers are hard to come by, but it generally attracts a significant user base interested in enhanced features for YouTube.

But just basing off repository follows it has over 19k users and active participants.

Interesting Aspects

  • Community-Driven Development: ReVanced is developed by a community of contributors, which means its features and updates are often driven by user feedback and needs.
  • Open-Source Nature: Being open-source allows users to review and modify the code, fostering transparency and trust.
  • Customization Flexibility: The range of customization options makes it appealing to users who want a more tailored YouTube experience.
  • Enhanced Functionality: It addresses common complaints about the official YouTube app, such as intrusive ads and lack of background playback.
  • Advanced Patch Management: ReVanced offers a robust patch management system, enabling users to apply only the specific features they desire.
  • Privacy Enhancement: ReVanced provides additional privacy features within the ability to block trackers and ads that collect user data.

Overall, ReVanced offers a more personalized and ad-free YouTube experience through a combination of enhanced features and community-driven development.

2. Repo Description

The app itself is split into multiple repositories (CLI, Patcher, Patches, Integrations, Manager, Website and API), for this report we will focus mostly on the Manager, as it is written in Flutter/Dart. Programming Languages

  • Dart (93.8%): The majority of the code is written in Dart, reflecting the use of Flutter for building the cross-platform user interface. Dart is well-suited for developing mobile applications, providing a smooth and responsive user experience.
  • Kotlin (6.0%): A smaller portion of the code is written in Kotlin, which is primarily used for integrating with Android-specific APIs and functionalities. Kotlin’s use indicates that some parts of the app may require native Android capabilities.
  • Ruby (0.2%): A minimal amount of Ruby is present, likely for scripting or automation purposes within the development process.

At the time of writing it has 15 branches that can be seen in the following picture Total number of branches on ReVanced.

Each branch is reflecting different stages of development and focus. The main branch, the default and stable version, was last updated two weeks ago, while the dev branch is actively maintained with updates occurring every 13 hours. Other branches like feat/translations and fix/translation-rejuv are updated regularly, showcasing ongoing enhancements and fixes. Meanwhile, branches such as compose-dev and feat/installer-dialog are updated less frequently but indicate significant updates and feature additions. Some branches, like ci/crowdin, show longer periods of inactivity but still have a substantial number of commits.

We also can see that different branches serve distinct functional purposes, contributing to various aspects of the app's development and maintenance. The main branch acts as the stable, production-ready version of the app, while the dev branch focuses on integrating new features and improvements before they are merged into the main branch. For instance, branches like feat/translations and fix/translation-rejuv are dedicated to specific functionalities such as enhancing translation support and refining translation-related features.

In addition, branches like compose-dev and feat/installer-dialog are centered around significant updates and feature additions. The compose-dev branch, for example, involve extensive changes related to the app’s UI/UX components. Meanwhile, feat/installer-dialog appears to be working on refining the installation process by enhancing dialog features. Other branches, such as docs/readme and ci/next-build, address documentation updates and continuous integration (CI) processes, respectively. These branches ensure that the app’s documentation remains current and that the CI pipeline supports ongoing development.

Commits

Total number of commits on ReVanced.

The repository has a substantial number of commits, indicating an active development cycle with continuous improvements and feature additions. Each commit reflects a change in the codebase, from bug fixes to new features, showcasing the repository's evolution.

Activity

Activity of ReVanced project.

With 17.2k stars showing strong approval and 719 forks indicating extensive use and modification by developers, it seems like the app is very influential. The 198 watchers reflect a solid base of users keeping up with updates.

LOC

Lines of code of the ReVanced project.

The codebase consists of 11,734 lines, with a significant majority written in Dart (85.7%), indicating that the app is mainly developed using Flutter. Other notable components include LICENSE files (4.7%) and Gradle files (1.9%), which handle legal documentation and Android build configurations, respectively. Finally, smaller portions of the codebase are dedicated to various configuration and automation files, such as okt, releaserc, and Fastfile.

3. BQ

Type 2

1. Question: "Are there any new updates or features available for the ReVanced app that the user has not yet installed?"

Possible Data Source: The app’s internal update system or server that tracks the latest available versions and features.

Display on Mobile App: A notification or banner in the app’s settings or home screen that informs users about new updates or features, with an option to install or learn more.

2. Question: "What are the user's most frequent video quality settings, and can they optimize their viewing experience based on these preferences?"

Possible Data Source: The app’s usage data, which tracks video quality settings selected by the user.

Display on Mobile App: A settings or preferences screen where users can view and adjust their most frequently used video quality settings, possibly with recommendations for optimal settings based on their usage patterns.

Type 4 or *

1. Question: "Are there any correlations between the types of content users download using ReVanced and their likelihood to engage with premium features?"

Possible Data Source: Internal usage telemetry on downloaded content, premium feature activation logs, and engagement metrics.

How it benefits the Business/App: By identifying correlations between downloaded content and premium feature engagement, the business can tailor marketing strategies to promote premium features more effectively. This can lead to increased revenue from premium feature sales and better user retention by providing relevant content and features that align with user preferences.

App Report 2

1. Recommendations

We got all 15 points on App report 1 so no changes were made

2. Repo Link

https://github.com/ReVanced

3. 3 design patterns

1. In the provided code for PatchesSelectorView, a clear example of the Repository Pattern can be observed through the interaction with the ManagerAPI service. This service abstracts data access logic (such as checking if patches can be changed or showing warnings) and is used to manage the patch-related data and operations.

Here’s a breakdown of how the Repository Pattern is applied:

Example:

final _managerAPI = locator<ManagerAPI>();

line 19 of the provided code

In the above line, the ManagerAPI is accessed via a Service Locator pattern. This abstracts the underlying details of data retrieval, making the widget unaware of the actual source of the data (e.g., network, database, or cache). It provides methods like:

  • isPatchesChangeEnabled() – Checks whether patch changes are enabled.
  • showPatchesChangeWarning() – Determines if a warning should be shown.
  • showPatchesChangeWarningDialog() – Displays a dialog with the warning.

Repository Pattern Role:

The ManagerAPI acts as a repository, providing a clean API to interact with patches and their state. This pattern allows the PatchesSelectorView to focus on presenting the data rather than handling complex business logic or data source interactions directly. This abstraction helps in maintaining, testing, and scaling the app easily.

2. Observer Pattern (via ViewModel)

In the SettingsViewModel class, the Observer Pattern is used by extending the BaseViewModel from the Stacked architecture (Stacked Documentation). This setup allows the UI to automatically update whenever the state or data changes, without needing to manually refresh anything.

Example:

class SettingsViewModel extends BaseViewModel {
  bool isPatchesAutoUpdate() {
    return _managerAPI.isPatchesAutoUpdate();
  }

  void setPatchesAutoUpdate(bool value) {
    _managerAPI.setPatchesAutoUpdate(value);
    notifyListeners();
  }
}

In this example, the setPatchesAutoUpdate method changes the auto-update setting and then calls notifyListeners(). This kicks off a UI update, meaning any UI components that are keeping an eye on this ViewModel will automatically rebuild to show the latest changes.

Observer Pattern in Action: The SettingsViewModel acts as an observable object. When its state changes (like when setPatchesAutoUpdate() is used), it lets the observing views know, which triggers an update. This helps to separate the UI from the logic behind it, making sure that the interface stays in sync with whatever is going on under the hood.

Key Elements:

  • notifyListeners() – Tells all the listeners (e.g., UI components) that something in the model has changed, which makes them rebuild.
  • The BaseViewModel class from the Stacked package enables this reactive behavior. It's a great way to keep things organized and makes the app more efficient when it comes to updating the UI.

This pattern helps the app update its UI quickly and efficiently, ensuring that any state changes are reflected across the components that depend on it.

3. MVVM Pattern (via SettingsView)

In the provided code for SettingsView, a clear example of the MVVM (Model-View-ViewModel) Pattern is implemented through the ViewModelBuilder from the stacked package. The pattern separates the concerns between the view (SettingsView) and the logic (SettingsViewModel), with the ViewModel handling the business logic and state while the view focuses on rendering UI components.

Here’s a breakdown of how the MVVM Pattern is applied:

Example:

return ViewModelBuilder<SettingsViewModel>.reactive(
   viewModelBuilder: () => SettingsViewModel(),
   builder: (context, model, child) => Scaffold(
      body: CustomScrollView(
         slivers: <Widget>[
            CustomSliverAppBar(...),
            SliverList(...),
         ],
      ),
   ),
);

beginning on line 25 of the provided code

In the above code, the SettingsViewModel is instantiated through ViewModelBuilder and passed to the view (SettingsView). The view reacts to changes in the ViewModel, which handles user actions, manages the state and interacts with other services as needed. The builder callback is used to rebuild the UI when the model changes, ensuring that the view reflects the latest state of the application.

  • viewModelBuilder: () => SettingsViewModel() – Creates the ViewModel for this view.
  • builder: (context, model, child) – Provides access to the ViewModel, allowing the UI to be updated based on its state.

In general terms, for this part the ViewModel (SettingsViewModel``) manages the logic of the view and its state, whereas the view (SettingsView, which extends StatelessWidget) is on charge of the visual representation to the user. The MVVM model is facilitated through the package stacked` that is imported via the following line.

Example:

import 'package:stacked/stacked.dart';

line 15 of the provided code

4. 3 views

1. Patcher View

PatcherView of the ReVanced interface.

The PatchesSelectorView is a Flutter widget that provides users with a user-friendly interface for selecting patches. The view is built using the ViewModelBuilder from the Stacked architecture, which promotes a separation of concerns by managing the logic through the PatchesSelectorViewModel. This approach allows the UI to focus on rendering the appropriate elements based on the current state, such as displaying available patches, handling user actions, and managing selections.

The UI consists of a floating action button that is dynamically visible based on the patches selected by the user. When patches are available, users can interact with the button to confirm their choices. The main content of the view is a CustomScrollView, which includes a SliverAppBar with a search bar for filtering patches. It also features different UI elements for handling patch categories like "new patches" or "universal patches." The view also integrates actions for selecting default or clearing patches through ActionChips, providing quick controls. The interaction with the ManagerAPI service ensures that patch-related functionalities (such as enabling/disabling patch changes) are abstracted from the UI layer, creating a clean and maintainable architecture.

2. Settings View

SettingsView of the ReVanced interface.

The SettingsView in the ReVanced App showcases a clean UI, utilizing a palette that enhances usability. The design emphasizes clarity, with straightforward navigation that allows users to access settings and features efficiently. Key components include a well-structured layout, intuitive buttons, and consistent typography that aligns with the app's functionality. The use of modal dialogs for warnings and confirmations contributes to an engaging user experience by keeping users informed without overwhelming them.

However, there are areas for improvement, particularly in enhancing visual feedback during interactions and providing more distinct visual cues for actionable items. While the overall look is appealing and familiar, introducing more contrast in certain elements could make critical functions stand out better. Additionally, incorporating subtle animations could improve the overall flow and user engagement.

3. Dashboard View

DashboardView of the ReVanced interface.

The DashboardView in the ReVanced app features a clean and functional design focused on providing users with quick access to updates and installed apps. The dark theme helps reduce eye stress especially in dim light environments. The layout is simple, with clearly defined sections that organize information in a clear way. The color scheme is predominantly dark, with light purple buttons that stand out against the background, making key actions like Show changelog and Info easily recognizable. The sans-serif typography is clear and consistent, ensuring that it is easy to read across the interface.

The design is well-structured into three main sections: Updates, Last patched app, and Installed apps. These sections are evenly spaced allowing users to process information quickly without feeling overwhelmed. Interactive elements like buttons are placed next to relevant information making navigation intuitive and easy for any user to try it out from the beginning. The rectangular rounded buttons are part of an appealing and familiar interface while keeping everything simple.

Some areas for improvement include adding subtle animations as elevation effects when interacting with buttons to enhance user engagement. Additionally, the Info buttons could be a bit different in design or color to emphasize their importance compared to other elements.

5. 3 quality attributes

Usability

Usability encompasses how easy and intuitive the interface is for users to navigate, understand, and interact with the available options. In this view, usability is enhanced through features such as:

  • Clear Navigation: The use of a SliverAppBar with a back button allows users to easily return to the previous screen.
  • Search Functionality: The integrated search bar enables users to quickly filter patches, improving the efficiency of finding relevant options.
  • Dynamic Feedback: The floating action button's visibility changes based on the selection state, providing immediate feedback on available actions.
  • Informative Labels and Tooltips: ActionChips include descriptive labels and tooltips, guiding users on their functions.

By focusing on usability, the view ensures that users can efficiently select and manage patches, leading to a more satisfying overall experience.

Responsiveness

Responsiveness in the ReVanced App is a critical quality attribute that enhances user experience by providing immediate feedback when users interact with settings. This is achieved through efficient state management, allowing for quick updates to the UI. Key aspects include:

  • Immediate State Updates: Changes made to settings, such as enabling auto-update, trigger instant updates in the UI without lag, ensuring users see the effects of their actions right away.

  • Visual Feedback: Elements of the interface, such as toggles and buttons, change their state visibly when interacted with, making it clear to users that their input has been recognized.

  • Consistent Performance: The app maintains smooth transitions and animations, which helps users feel that their interactions are fluid and responsive, rather than disjointed or slow.

  • Efficient Resource Management: Background operations, such as importing and exporting files, are handled seamlessly, ensuring that the UI remains responsive even during potentially resource-intensive tasks.

By prioritizing responsiveness, the ReVanced App ensures that users remain satisfied, as they experience a seamless interaction with the app.

Maintainability

Maintainability is a key quality attribute in the ReVanced app, ensuring that the app can be easily updated and adapted over time. This is achieved through several design choices that make the system adaptable and reduce complexity for future modifications:

  • Modular Design: The settings, dashboard, and patching functions are separated into distinct views with clear, isolated roles. This separation allows developers to update or modify individual sections without affecting the entire system, improving the maintainability of the app.

  • Version Compatibility Checks: By integrating automatic compatibility checks and version suggestions, the app ensures that only the appropriate patches and updates are applied, preventing errors or conflicts that could arise from incompatible versions reducing the need for troubleshooting and long-term maintenance.

  • Simplified Update Process: The ability to view changelogs and update patches directly from the dashboard supports maintainability by giving users and developers clear visibility into changes, which helps developers track issues and implement fixes efficiently.

By focusing on maintainability, the ReVanced app ensures long-term stability and ease of updates, making it easier for developers to improve and extend functionality while minimizing the risk of system degradation over time.

6. Libraries

Here’s a description of the libraries and dependencies used in the ReVanced Manager app, along with their purposes:

Libraries and Dependencies

  1. animations: Provides pre-built animations for Flutter applications, enhancing the visual experience with transitions and effects.

  2. collection: Offers additional collection types and utilities, such as sets and maps, for easier data manipulation.

  3. connectivity_plus: Checks the device's network connectivity status, allowing the app to respond to changes in connectivity.

  4. device_apps: A plugin that interacts with installed applications on the device, enabling features like launching and managing other apps.

  5. device_info_plus: Retrieves information about the device, such as operating system version and hardware details.

  6. dio: A powerful HTTP client for Dart, used for making network requests, including support for interceptors and global configuration.

  7. dio_cache_interceptor: Adds caching capabilities to Dio, enabling responses to be stored and retrieved to improve performance.

  8. dynamic_color: Provides tools for creating dynamic color themes based on user preferences or system settings.

  9. dynamic_themes: Allows the app to support multiple themes that can be switched at runtime, enhancing user customization.

  10. expandable: A widget for creating expandable and collapsible content, useful for displaying information in a compact format.

  11. file_picker: Facilitates file selection from the device’s storage, allowing users to upload or choose files easily.

  12. flutter_background: Enables the app to run tasks in the background, crucial for functionalities that need to persist even when the app is not in the foreground.

  13. flutter_cache_manager: Manages caching of files for better performance and offline access, especially for network resources.

  14. flutter_file_dialog: Provides a platform-native file dialog to pick files, enhancing the user experience with a familiar interface.

  15. flutter_local_notifications: Allows scheduling and displaying notifications, keeping users informed about app-related events.

  16. flutter_localizations: Supports localization, enabling the app to provide content in multiple languages.

  17. flutter_markdown: Renders Markdown text within the app, useful for displaying formatted content.

  18. fluttertoast: Displays simple toast messages for quick feedback to the user.

  19. font_awesome_flutter: Provides access to Font Awesome icons, enriching the UI with a variety of icons.

  20. google_fonts: Offers a collection of Google Fonts for use in the app, enhancing typography.

  21. injectable: A dependency injection library that simplifies the management of service instances within the app.

  22. intl: Provides internationalization and localization support, making it easier to format dates, numbers, and messages.

  23. json_annotation: Facilitates JSON serialization and deserialization, helping in handling API responses and data storage.

  24. language_code: A utility for working with language codes, essential for localization features.

  25. logcat: A library for logging and debugging, useful for capturing and displaying log messages.

  26. package_info_plus: Retrieves information about the app package, such as version and build number.

  27. path_provider: Provides access to commonly used locations on the filesystem, like temporary and application directories.

  28. permission_handler: Manages app permissions, allowing the app to request and check the status of permissions.

  29. root: A library for managing root access on devices, critical for advanced patching features.

  30. screenshot_callback: Enables capturing screenshots and reacting to screenshot events.

  31. share_plus: Facilitates sharing content from the app to other applications, enhancing user interaction.

  32. shared_preferences: A simple key-value store for saving user preferences and app settings.

  33. skeletons: Provides skeleton loading screens, improving perceived performance during content loading.

  34. slang: A library for parsing and handling slang in strings, enhancing the user experience in text handling.

  35. stacked: An architecture library that provides tools for managing state and dependency injection in Flutter apps.

  36. synchronized: Provides synchronization utilities for managing access to shared resources, enhancing concurrency control.

  37. timeago: Displays time intervals in a human-readable format (e.g., "2 hours ago"), improving content presentation.

  38. timezone: Handles time zone conversions and manipulations, essential for time-related features.

  39. url_launcher: Allows launching URLs in a browser or other applications, providing external navigation options.

  40. wakelock_plus: Keeps the device awake during specific operations, ensuring that the app can complete tasks without interruption.

Development Dependencies

  • analyzer: Analyzes Dart code for issues, helping maintain code quality.
  • build_runner: Facilitates code generation for Dart projects, used in conjunction with other generators.
  • flutter_lints: Provides linting rules for Flutter projects, promoting best practices in code style and quality.
  • injectable_generator: Generates code for dependency injection, reducing boilerplate code.
  • json_serializable: Automatically generates JSON serialization code based on data classes, simplifying data handling.

This collection of libraries and dependencies enables ReVanced Manager to provide a robust, feature-rich experience for users looking to patch their favorite apps seamlessly.

⚠️ **GitHub.com Fallback** ⚠️