cleaning up

This commit is contained in:
esefxdz committed 2026-08-02 00:56:55 +03:00
1 parent c1ec77a075
commit 75cf59f22c
12 files changed
+214 -322

No files matched your search

+3 -3
View File
@@ -65,7 +65,7 @@ class _ConnectButtonState extends State<ConnectButton>
if (vpn.status == VpnStatus.connected || vpn.status == VpnStatus.connecting) {
_busy = false;
timer.stop(); // MUST stop timer BEFORE disconnect — prevents auto-reconnect
timer.stop();
await vpn.disconnect();
return;
}
@@ -116,7 +116,7 @@ class _ConnectButtonState extends State<ConnectButton>
final glowRadius = isConnected ? 18.0 + (pulse * 14) : 0.0;
return Container(
width: 260, // <-- CHANGE ME: circle size
width: 260,
height: 260,
decoration: BoxDecoration(
shape: BoxShape.circle,
@@ -138,7 +138,7 @@ class _ConnectButtonState extends State<ConnectButton>
),
)
: Padding(
padding: const EdgeInsets.all(14), // <-- CHANGE ME: brand.png padding from edge
padding: const EdgeInsets.all(14),
child: Image.asset('assets/brand.png', fit: BoxFit.contain),
),
);
+3 -3
View File
@@ -176,7 +176,7 @@ class _LightningPainter extends CustomPainter {
final baseColor = AppColors.accent.withAlpha((opacity * 255).round());
final glowColor = AppColors.accent.withAlpha((opacity * 0.35 * 255).round());
// ── Glow layer (thick, blurry) ──────────────
// Glow
final glowPaint = Paint()
..color = glowColor
..strokeWidth = 18
@@ -187,7 +187,7 @@ class _LightningPainter extends CustomPainter {
_drawPath(canvas, scaledMain, scaledBranches, glowPaint);
// ── Core bolt (thin, bright) ────────────────
// Core
final corePaint = Paint()
..color = baseColor
..strokeWidth = 5
@@ -197,7 +197,7 @@ class _LightningPainter extends CustomPainter {
_drawPath(canvas, scaledMain, scaledBranches, corePaint);
// ── Hot center (extra white core) ───────────
// Hot center
if (opacity > 0.6) {
final hotPaint = Paint()
..color = Colors.white.withAlpha((opacity * 180).round())
+3 -3
View File
@@ -37,7 +37,7 @@ class _RainEffectState extends State<RainEffect>
final _random = Random();
Duration _last = Duration.zero;
// ── Lifecycle ────────────────────────────────────────────────────────
// Lifecycle
@override
void initState() {
@@ -54,7 +54,7 @@ class _RainEffectState extends State<RainEffect>
super.dispose();
}
// ── Tick — move drops, recycle off-screen ones ──────────────────────
// Tick
void _onTick(Duration now) {
double dt = 0.016; // ~60 fps fallback on first tick
@@ -74,7 +74,7 @@ class _RainEffectState extends State<RainEffect>
setState(() {});
}
// ── Build ────────────────────────────────────────────────────────────
// Build
@override
Widget build(BuildContext context) {
+2 -2
View File
@@ -26,7 +26,7 @@ class StatusBar extends StatelessWidget {
),
child: Row(
children: [
// ── Connection status (left) ─────────────────────────────
// Connection status
if (isConnected) ...[
Image.asset('assets/finland_flag_256.png', width: 20, height: 20),
const SizedBox(width: 8),
@@ -52,7 +52,7 @@ class StatusBar extends StatelessWidget {
const Spacer(),
// ── Server health dot (right) ────────────────────────────
// Server health
OnlineDot(
isOnline: serverHealthy,
label: isConnected
+2 -3
View File
@@ -25,7 +25,7 @@ class TimerBox extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// ── Countdown text (always visible) ──────────────────────
// Countdown
Text(
timer.hasSyncedOnce ? timer.formatted : '00:00:00',
style: TextStyle(
@@ -46,8 +46,7 @@ class TimerBox extends StatelessWidget {
),
),
// ── Syncing indicator (only shown while connecting or
// waiting for the first server poll) ──────────────────
// Syncing indicator
if (showIndicator) ...[
const SizedBox(height: 8),
Row(