chore(app): lint cleanups (const constructors, local function)
This commit is contained in:
1 parent
9d67679fa8
commit
bbc83ea425
7 files changed
+12
-12
No files matched your search
@@ -182,7 +182,7 @@ class _LightningPainter extends CustomPainter {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void paint(Canvas canvas, Size size) {
|
void paint(Canvas canvas, Size size) {
|
||||||
final toScreen = (Offset p) => Offset(p.dx * size.width, p.dy * size.height);
|
Offset toScreen(Offset p) => Offset(p.dx * size.width, p.dy * size.height);
|
||||||
final scaledMain = bolt.mainPath.map(toScreen).toList();
|
final scaledMain = bolt.mainPath.map(toScreen).toList();
|
||||||
final scaledBranches = bolt.branches
|
final scaledBranches = bolt.branches
|
||||||
.map((b) => b.map(toScreen).toList())
|
.map((b) => b.map(toScreen).toList())
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ class DiscordLinkButton extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return IconButton(
|
return const IconButton(
|
||||||
icon: const Icon(Icons.discord, color: AppColors.textWhite, size: 28),
|
icon: Icon(Icons.discord, color: AppColors.textWhite, size: 28),
|
||||||
onPressed: launchDiscord,
|
onPressed: launchDiscord,
|
||||||
tooltip: 'Join Discord',
|
tooltip: 'Join Discord',
|
||||||
splashRadius: 24,
|
splashRadius: 24,
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ class GdprButton extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return IconButton(
|
return const IconButton(
|
||||||
icon: const Icon(Icons.admin_panel_settings_outlined,
|
icon: Icon(Icons.admin_panel_settings_outlined,
|
||||||
color: AppColors.textWhite, size: 28),
|
color: AppColors.textWhite, size: 28),
|
||||||
onPressed: showConsentForm,
|
onPressed: showConsentForm,
|
||||||
tooltip: 'Ad consent & privacy choices',
|
tooltip: 'Ad consent & privacy choices',
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ class InfoButton extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return IconButton(
|
return const IconButton(
|
||||||
icon: const Icon(Icons.help_outline, color: AppColors.textWhite, size: 28),
|
icon: Icon(Icons.help_outline, color: AppColors.textWhite, size: 28),
|
||||||
onPressed: launchGitHub,
|
onPressed: launchGitHub,
|
||||||
tooltip: 'About ReVoltVPN',
|
tooltip: 'About ReVoltVPN',
|
||||||
splashRadius: 24,
|
splashRadius: 24,
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ class PrivacyPolicyButton extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return IconButton(
|
return const IconButton(
|
||||||
icon: const Icon(Icons.privacy_tip_outlined, color: AppColors.textWhite, size: 28),
|
icon: Icon(Icons.privacy_tip_outlined, color: AppColors.textWhite, size: 28),
|
||||||
onPressed: launchPrivacyPolicy,
|
onPressed: launchPrivacyPolicy,
|
||||||
tooltip: 'Privacy Policy',
|
tooltip: 'Privacy Policy',
|
||||||
splashRadius: 24,
|
splashRadius: 24,
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ class WebsiteButton extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return IconButton(
|
return const IconButton(
|
||||||
icon: const Icon(Icons.language, color: AppColors.textWhite, size: 28),
|
icon: Icon(Icons.language, color: AppColors.textWhite, size: 28),
|
||||||
onPressed: launchWebsite,
|
onPressed: launchWebsite,
|
||||||
tooltip: 'Website',
|
tooltip: 'Website',
|
||||||
splashRadius: 24,
|
splashRadius: 24,
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ class Updater {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = await MethodChannel('com.revoltvpn.app/installer')
|
final result = await const MethodChannel('com.revoltvpn.app/installer')
|
||||||
.invokeMethod<String>('getInstallerPackage');
|
.invokeMethod<String>('getInstallerPackage');
|
||||||
_cachedSource = (result == 'com.android.vending')
|
_cachedSource = (result == 'com.android.vending')
|
||||||
? InstallSource.playStore
|
? InstallSource.playStore
|
||||||
|
|||||||
Reference in new issue
Block a user