Skip to content

feat: added Software Licenses screen#2697

Merged
AsCress merged 1 commit intofossasia:flutterfrom
Vidhijain20:software_licenses_screen
May 21, 2025
Merged

feat: added Software Licenses screen#2697
AsCress merged 1 commit intofossasia:flutterfrom
Vidhijain20:software_licenses_screen

Conversation

@Vidhijain20
Copy link
Copy Markdown
Contributor

@Vidhijain20 Vidhijain20 commented May 20, 2025

Adds an auto-generated Software Licenses screen using the flutter_oss_licenses package.
oss_licenses.dart is generated by the package.
This example of the package was used to auto generate the screen from the file.

Screenshots / Recordings

Screen_recording_20250520_092936.mp4

Checklist:

  • No hard coding: I have used resources from strings.xml, dimens.xml and colors.xml without hard coding any value.
  • No end of file edits: No modifications done at end of resource files strings.xml, dimens.xml or colors.xml.
  • Code reformatting: I have reformatted code and fixed indentation in every file included in this pull request.
  • No extra space: My code does not contain any extra lines or extra spaces than the ones that are necessary.

cc @CloudyPadmal @AsCress

Summary by Sourcery

Add a dedicated Software Licenses screen using the flutter_oss_licenses package, integrate it into navigation, and manage licenses via an auto-generated oss_licenses.dart file.

New Features:

  • Add Software Licenses screen listing all dependencies and their licenses

Enhancements:

  • Replace hard-coded “Open Source Licenses” label with a constant and refine navigation logic to reuse existing routes

Build:

  • Add flutter_oss_licenses package and auto-generate oss_licenses.dart file

Chores:

  • Register new '/softwareLicenses' route and update navigation drawer entry

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 20, 2025

Reviewer's Guide

This PR integrates the flutter_oss_licenses package to auto-generate an OSS licenses listing, implements a dedicated Software Licenses screen with routing and UI to display licenses, and updates the navigation drawer (and constants) to include and navigate to the new screen.

File-Level Changes

Change Details Files
Integrate OSS license generator
  • Add flutter_oss_licenses dependency in pubspec.yaml
  • Generate oss_licenses.dart via the package tool
  • Commit generated license data file without manual edits
pubspec.yaml
lib/oss_licenses.dart
Implement SoftwareLicensesScreen and routing
  • Create SoftwareLicensesScreen widget with license loading logic
  • Add loadLicenses helper using LicenseRegistry
  • Register '/softwareLicenses' route in main.dart
lib/view/software_licenses_screen.dart
lib/main.dart
Update navigation drawer and constants
  • Import constants and replace hard-coded title with softwareLicenses
  • Enhance onTap to handle pushNamedAndRemoveUntil navigation
  • Define softwareLicenses string in constants.dart
lib/view/widgets/navigation_drawer.dart
lib/constants.dart

Possibly linked issues

  • #0: PR adds a software licenses screen using flutter_oss_licenses to list dependencies and their licenses, directly fixing the issue.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@AsCress AsCress force-pushed the software_licenses_screen branch from 777eb2c to ec40dd0 Compare May 20, 2025 04:09
@AsCress AsCress requested a review from CloudyPadmal May 20, 2025 04:11
@github-actions
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

@AsCress AsCress left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @Vidhijain20 !

@AsCress AsCress merged commit 8fbccb5 into fossasia:flutter May 21, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants