This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Purpose Add licenses attribution. ## Changes - Added a button for displaying app about page ( + license page), from the material library. - Added a script that can check licenses in dependencies. - Added check to CI that only approved licenses are being used. ## Checklist - [x] My code follows the style of this project. - [x] The code compiles without warnings. - [x] I have performed a self-review of the changes. - [x] I have documented my code, in particular the intent of the hard-to-understand areas. - [ ] (If necessary) I have updated the CHANGELOG.
- Loading branch information
Showing
9 changed files
with
276 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_svg/flutter_svg.dart'; | ||
import 'package:package_info_plus/package_info_plus.dart'; | ||
|
||
/// Button that when pressed shows the about page for the app, including the license page. | ||
class AboutButton extends StatelessWidget { | ||
const AboutButton({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ElevatedButton( | ||
onPressed: () { | ||
PackageInfo.fromPlatform().then((packageInfo) { | ||
showAboutDialog( | ||
context: context, | ||
applicationName: packageInfo.appName, | ||
applicationVersion: packageInfo.version, | ||
applicationIcon: SvgPicture.asset( | ||
'assets/graphics/CCD.svg', | ||
semanticsLabel: 'CCD Logo', | ||
), | ||
); | ||
}); | ||
}, | ||
child: const Text('Show About'), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.