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
|
||||
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 scaledBranches = bolt.branches
|
||||
.map((b) => b.map(toScreen).toList())
|
||||
|
||||
@@ -14,8 +14,8 @@ class DiscordLinkButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.discord, color: AppColors.textWhite, size: 28),
|
||||
return const IconButton(
|
||||
icon: Icon(Icons.discord, color: AppColors.textWhite, size: 28),
|
||||
onPressed: launchDiscord,
|
||||
tooltip: 'Join Discord',
|
||||
splashRadius: 24,
|
||||
|
||||
@@ -76,8 +76,8 @@ class GdprButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.admin_panel_settings_outlined,
|
||||
return const IconButton(
|
||||
icon: Icon(Icons.admin_panel_settings_outlined,
|
||||
color: AppColors.textWhite, size: 28),
|
||||
onPressed: showConsentForm,
|
||||
tooltip: 'Ad consent & privacy choices',
|
||||
|
||||
@@ -14,8 +14,8 @@ class InfoButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.help_outline, color: AppColors.textWhite, size: 28),
|
||||
return const IconButton(
|
||||
icon: Icon(Icons.help_outline, color: AppColors.textWhite, size: 28),
|
||||
onPressed: launchGitHub,
|
||||
tooltip: 'About ReVoltVPN',
|
||||
splashRadius: 24,
|
||||
|
||||
@@ -14,8 +14,8 @@ class PrivacyPolicyButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.privacy_tip_outlined, color: AppColors.textWhite, size: 28),
|
||||
return const IconButton(
|
||||
icon: Icon(Icons.privacy_tip_outlined, color: AppColors.textWhite, size: 28),
|
||||
onPressed: launchPrivacyPolicy,
|
||||
tooltip: 'Privacy Policy',
|
||||
splashRadius: 24,
|
||||
|
||||
@@ -14,8 +14,8 @@ class WebsiteButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return IconButton(
|
||||
icon: const Icon(Icons.language, color: AppColors.textWhite, size: 28),
|
||||
return const IconButton(
|
||||
icon: Icon(Icons.language, color: AppColors.textWhite, size: 28),
|
||||
onPressed: launchWebsite,
|
||||
tooltip: 'Website',
|
||||
splashRadius: 24,
|
||||
|
||||
@@ -189,7 +189,7 @@ class Updater {
|
||||
}
|
||||
|
||||
try {
|
||||
final result = await MethodChannel('com.revoltvpn.app/installer')
|
||||
final result = await const MethodChannel('com.revoltvpn.app/installer')
|
||||
.invokeMethod<String>('getInstallerPackage');
|
||||
_cachedSource = (result == 'com.android.vending')
|
||||
? InstallSource.playStore
|
||||
|
||||
Reference in new issue
Block a user