Smart Cyber Panel – Offline Phone Automation Hacker App (Flutter GUI)
Demo :
Click Video πππ
FEATURES ;
• Offline automation engine
• Battery / Time / Location triggers
• Cyber flow builder
• Premium hacker UI
• No internet required
• Secure & encrypted local system
Code :
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:flutter_animate/flutter_animate.dart';
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// THEME & CONSTANTS
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
class CyberColors {
static const Color background = Color(0xFF0D0D15); // Deep dark background
static const Color cardBg = Color(0xFF1E1E2C); // Slightly lighter for cards
static const Color neonBlue = Color(0xFF00F0FF); // Cyan/Neon Blue
static const Color neonPurple = Color(0xFFBC13FE); // Neon Purple
static const Color neonGreen = Color(0xFF00FF94); // Status OK
static const Color neonRed = Color(0xFFFF0055); // Alert/Error
static const Color textMain = Colors.white;
static const Color textDim = Colors.white54;
static const LinearGradient cyberGradient = LinearGradient(
colors: [neonBlue, neonPurple],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
);
static const LinearGradient glassGradient = LinearGradient(
colors: [
Color(0x1AFFFFFF), // 10% opacity white
Color(0x05FFFFFF), // 2% opacity white
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
);
}
class AppTheme {
static ThemeData get darkTheme {
return ThemeData(
brightness: Brightness.dark,
scaffoldBackgroundColor: CyberColors.background,
primaryColor: CyberColors.neonBlue,
colorScheme: ColorScheme.dark(
primary: CyberColors.neonBlue,
secondary: CyberColors.neonPurple,
surface: CyberColors.cardBg,
background: CyberColors.background,
error: CyberColors.neonRed,
),
textTheme: GoogleFonts.orbitronTextTheme(ThemeData.dark().textTheme).apply(
bodyColor: CyberColors.textMain,
displayColor: CyberColors.textMain,
),
// Enhance inputs for Cyber look
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: CyberColors.cardBg,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: Colors.white12),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: Colors.white12),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: CyberColors.neonBlue),
),
hintStyle: TextStyle(color: Colors.white24),
),
useMaterial3: true,
);
}
}
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// WIDGETS
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
class CyberCard extends StatelessWidget {
final Widget child;
final double? width;
final double? height;
final EdgeInsetsGeometry? padding;
final bool isGlowing;
final VoidCallback? onTap;
const CyberCard({
super.key,
required this.child,
this.width,
this.height,
this.padding,
this.isGlowing = false,
this.onTap,
});
@override
Widget build(BuildContext context) {
Widget content = Container(
width: width,
height: height,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
border: Border.all(
color: isGlowing ? CyberColors.neonBlue.withOpacity(0.5) : Colors.white10,
width: 1,
),
boxShadow: isGlowing ? [
BoxShadow(
color: CyberColors.neonBlue.withOpacity(0.3),
blurRadius: 15,
spreadRadius: 1,
)
] : [
BoxShadow(
color: Colors.black38,
blurRadius: 12,
offset: Offset(0, 6),
)
],
gradient: CyberColors.glassGradient,
),
child: ClipRRect(
borderRadius: BorderRadius.circular(16),
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Padding(
padding: padding ?? const EdgeInsets.all(16),
child: child,
),
),
),
);
if (onTap != null) {
return GestureDetector(
onTap: onTap,
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: content,
),
);
}
return content;
}
}
class CyberButton extends StatelessWidget {
final String text;
final VoidCallback onPressed;
final bool isPrimary;
final IconData? icon;
final double? width;
const CyberButton({
super.key,
required this.text,
required this.onPressed,
this.isPrimary = true,
this.icon,
this.width,
});
@override
Widget build(BuildContext context) {
return Container(
width: width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
gradient: isPrimary ? CyberColors.cyberGradient : null,
border: isPrimary ? null : Border.all(color: CyberColors.neonBlue),
boxShadow: isPrimary
? [
BoxShadow(
color: CyberColors.neonBlue.withOpacity(0.4),
blurRadius: 12,
offset: Offset(0, 4),
)
]
: null,
),
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: onPressed,
borderRadius: BorderRadius.circular(12),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (icon != null) ...[
Icon(icon, color: Colors.white, size: 20),
const SizedBox(width: 8),
],
Text(
text,
style: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
],
),
),
),
),
);
}
}
class StatusLed extends StatelessWidget {
final Color color;
final bool isPulsing;
const StatusLed({super.key, required this.color, this.isPulsing = true});
@override
Widget build(BuildContext context) {
Widget led = Container(
width: 12,
height: 12,
decoration: BoxDecoration(
color: color,
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: color.withOpacity(0.6),
blurRadius: 8,
spreadRadius: 2,
),
],
),
);
if (isPulsing) {
return led.animate(onPlay: (controller) => controller.repeat(reverse: true))
.boxShadow(
end: BoxShadow(
blurRadius: 16,
spreadRadius: 4,
color: color.withOpacity(0.4),
),
duration: 1.seconds
);
}
return led;
}
}
class NeonLine extends StatelessWidget {
final double width;
const NeonLine({super.key, this.width = double.infinity});
@override
Widget build(BuildContext context) {
return Container(
height: 2,
width: width,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Colors.transparent,
CyberColors.neonBlue,
CyberColors.neonPurple,
Colors.transparent,
],
),
boxShadow: [
BoxShadow(
color: CyberColors.neonBlue.withOpacity(0.5),
blurRadius: 10,
spreadRadius: 1,
)
],
),
);
}
}
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// MAIN APP & ROUTES
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Smart Cyber Panel',
debugShowCheckedModeBanner: false,
theme: AppTheme.darkTheme,
initialRoute: '/',
routes: {
'/': (context) => const SplashScreen(),
'/login': (context) => const LoginScreen(),
'/dashboard': (context) => const DashboardScreen(),
'/automation_builder': (context) => const AutomationBuilderScreen(),
// Placeholders and other screens
'/triggers': (context) => const PlaceholderScreen(title: "Triggers"),
'/actions': (context) => const PlaceholderScreen(title: "Actions"),
'/flows': (context) => const PlaceholderScreen(title: "Saved Flows"),
'/live_status': (context) => const LiveStatusScreen(),
'/security': (context) => const PlaceholderScreen(title: "Security Vault"),
'/settings': (context) => const PlaceholderScreen(title: "Settings"),
'/help': (context) => const PlaceholderScreen(title: "Help & Support"),
},
onUnknownRoute: (settings) => MaterialPageRoute(
builder: (context) => const PlaceholderScreen(title: "404 NOT FOUND"),
),
);
}
}
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SCREENS
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
@override
State<SplashScreen> createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
super.initState();
Future.delayed(const Duration(seconds: 3), () {
if (mounted) Navigator.pushReplacementNamed(context, '/login');
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: CyberColors.background,
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.shield_moon, size: 100, color: CyberColors.neonBlue)
.animate(onPlay: (c) => c.repeat())
.shimmer(duration: 2.seconds, color: CyberColors.neonPurple),
const SizedBox(height: 20),
Text(
"SMART CYBER PANEL",
style: TextStyle(
fontSize: 32,
fontFamily: 'Orbitron',
fontWeight: FontWeight.bold,
letterSpacing: 4,
color: Colors.white,
shadows: [
Shadow(blurRadius: 10, color: CyberColors.neonBlue),
]
),
).animate().fadeIn(duration: 1.seconds).slideY(begin: 0.5, end: 0),
const SizedBox(height: 40),
Container(
width: 200,
height: 4,
decoration: BoxDecoration(
color: Colors.white10,
borderRadius: BorderRadius.circular(2),
),
child: Align(
alignment: Alignment.centerLeft,
child: Container(
width: 200,
height: 4,
decoration: BoxDecoration(
color: CyberColors.neonBlue,
borderRadius: BorderRadius.circular(2),
boxShadow: [
BoxShadow(color: CyberColors.neonBlue, blurRadius: 8)
]
),
).animate().custom(
duration: 3.seconds,
builder: (context, value, child) => FractionallySizedBox(
widthFactor: value,
child: child,
),
),
),
),
const SizedBox(height: 10),
Text("INITIALIZING SECURE PROTOCOLS...",
style: TextStyle(color: CyberColors.neonBlue, fontSize: 10, letterSpacing: 2)
).animate(onPlay: (c) => c.repeat(reverse: true)).fade(duration: 500.ms)
],
),
),
);
}
}
class LoginScreen extends StatelessWidget {
const LoginScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
decoration: BoxDecoration(
color: CyberColors.background,
image: DecorationImage(
image: NetworkImage("https://www.transparenttextures.com/patterns/carbon-fibre.png"), // Subtle texture if available
opacity: 0.1,
repeat: ImageRepeat.repeat,
),
),
child: Center(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(24.0),
child: CyberCard(
width: 400,
padding: const EdgeInsets.all(32),
isGlowing: true,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.lock_outline, size: 64, color: CyberColors.neonRed),
const SizedBox(height: 16),
Text("SECURE ACCESS", style: Theme.of(context).textTheme.headlineMedium?.copyWith(
color: Colors.white, fontWeight: FontWeight.bold, letterSpacing: 2
)),
const SizedBox(height: 32),
TextField(
decoration: InputDecoration(
prefixIcon: Icon(Icons.person, color: CyberColors.neonBlue),
hintText: "AGENT ID",
),
style: TextStyle(color: Colors.white),
),
const SizedBox(height: 16),
TextField(
obscureText: true,
decoration: InputDecoration(
prefixIcon: Icon(Icons.key, color: CyberColors.neonBlue),
hintText: "PASSCODE",
),
style: TextStyle(color: Colors.white),
),
const SizedBox(height: 32),
SizedBox(
width: double.infinity,
child: CyberButton(
text: "AUTHENTICATE",
onPressed: () {
Navigator.pushReplacementNamed(context, '/dashboard');
},
),
),
const SizedBox(height: 16),
Text("RESTRICTED AREA // AUTHORIZED PERSONNEL ONLY",
style: TextStyle(color: Colors.white24, fontSize: 10, letterSpacing: 1),
textAlign: TextAlign.center,
),
],
),
),
),
),
),
),
);
}
}
class DashboardScreen extends StatelessWidget {
const DashboardScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("COMMAND CENTER", style: TextStyle(letterSpacing: 2)),
backgroundColor: Colors.transparent,
elevation: 0,
centerTitle: true,
actions: [
IconButton(
icon: Icon(Icons.settings, color: CyberColors.neonBlue),
onPressed: () => Navigator.pushNamed(context, '/settings'),
),
],
),
drawer: _buildDrawer(context),
body: SingleChildScrollView(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_buildStatusHeader(),
const SizedBox(height: 24),
Text("SYSTEM METRICS", style: TextStyle(color: Colors.white54, letterSpacing: 1.5)),
const SizedBox(height: 16),
_buildMetricsGrid(context),
const SizedBox(height: 24),
Text("ACTIVE PROTOCOLS", style: TextStyle(color: Colors.white54, letterSpacing: 1.5)),
const SizedBox(height: 16),
_buildActiveAutomationsList(),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: () => Navigator.pushNamed(context, '/automation_builder'),
backgroundColor: CyberColors.neonBlue,
child: Icon(Icons.add, color: Colors.black),
),
);
}
Widget _buildDrawer(BuildContext context) {
return Drawer(
backgroundColor: CyberColors.background,
child: ListView(
padding: EdgeInsets.zero,
children: [
DrawerHeader(
decoration: BoxDecoration(gradient: CyberColors.cyberGradient),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Icon(Icons.shield, size: 48, color: Colors.white),
SizedBox(height: 10),
Text("CYBER PANEL", style: TextStyle(color: Colors.white, fontSize: 24, fontWeight: FontWeight.bold)),
Text("v1.0.0 [SECURE]", style: TextStyle(color: Colors.white70)),
],
),
),
_drawerItem(context, Icons.dashboard, "Dashboard", '/dashboard'),
_drawerItem(context, Icons.schema, "Automation Builder", '/automation_builder'),
_drawerItem(context, Icons.bolt, "Triggers", '/triggers'),
_drawerItem(context, Icons.play_arrow, "Actions", '/actions'),
_drawerItem(context, Icons.hub, "Flows", '/flows'),
_drawerItem(context, Icons.monitor_heart, "Live Status", '/live_status'),
_drawerItem(context, Icons.security, "Security", '/security'),
Divider(color: Colors.white24),
_drawerItem(context, Icons.settings, "Settings", '/settings'),
_drawerItem(context, Icons.help, "Help", '/help'),
_drawerItem(context, Icons.logout, "Logout", '/login'),
],
),
);
}
Widget _drawerItem(BuildContext context, IconData icon, String title, String route) {
return ListTile(
leading: Icon(icon, color: CyberColors.neonBlue),
title: Text(title, style: TextStyle(color: Colors.white)),
onTap: () {
Navigator.pop(context); // Close drawer
if (ModalRoute.of(context)?.settings.name != route) {
Navigator.pushNamed(context, route);
}
},
hoverColor: CyberColors.neonBlue.withOpacity(0.1),
);
}
Widget _buildStatusHeader() {
return CyberCard(
child: Row(
children: [
Icon(Icons.memory, color: CyberColors.neonPurple, size: 40),
const SizedBox(width: 16),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("CYBER ENGINE", style: TextStyle(color: Colors.white54, fontSize: 12)),
Text("ONLINE", style: TextStyle(color: CyberColors.neonGreen, fontSize: 20, fontWeight: FontWeight.bold, shadows: [Shadow(color: CyberColors.neonGreen, blurRadius: 10)])),
],
),
Spacer(),
StatusLed(color: CyberColors.neonGreen),
],
),
isGlowing: true,
);
}
Widget _buildMetricsGrid(BuildContext context) {
return GridView.count(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
crossAxisCount: MediaQuery.of(context).size.width > 600 ? 4 : 2,
crossAxisSpacing: 16,
mainAxisSpacing: 16,
childAspectRatio: 1.4,
children: [
_metricCard(Icons.play_circle_fill, "Active Automations", "12", CyberColors.neonBlue),
_metricCard(Icons.access_time, "Last Trigger", "2m ago", CyberColors.neonPurple),
_metricCard(Icons.battery_charging_full, "Battery Status", "87%", CyberColors.neonGreen),
_metricCard(Icons.location_on, "Location", "Home Base", Colors.orange),
],
);
}
Widget _metricCard(IconData icon, String label, String value, Color color) {
return CyberCard(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(icon, color: color, size: 32),
SizedBox(height: 8),
Text(value, style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold, color: Colors.white)),
Text(label, style: TextStyle(fontSize: 12, color: Colors.white54), textAlign: TextAlign.center),
],
),
).animate().scale(delay: 200.ms);
}
Widget _buildActiveAutomationsList() {
return Column(
children: [
_automationTile("WiFi Auto-Off", "Triggered when battery < 20%", true),
SizedBox(height: 10),
_automationTile("Secure Home", "Lock screen when leaving Home Base", true),
SizedBox(height: 10),
_automationTile("Night Mode", "Silent mode at 23:00", false),
],
);
}
Widget _automationTile(String title, String subtitle, bool isActive) {
return CyberCard(
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: Row(
children: [
Icon(Icons.bolt, color: isActive ? CyberColors.neonBlue : Colors.white24),
SizedBox(width: 16),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title, style: TextStyle(color: isActive ? Colors.white : Colors.white54, fontWeight: FontWeight.bold)),
Text(subtitle, style: TextStyle(color: Colors.white38, fontSize: 12)),
],
),
),
Switch(
value: isActive,
onChanged: (v) {},
activeColor: CyberColors.neonBlue,
activeTrackColor: CyberColors.neonBlue.withOpacity(0.3),
),
],
),
);
}
}
class AutomationBuilderScreen extends StatefulWidget {
const AutomationBuilderScreen({super.key});
@override
State<AutomationBuilderScreen> createState() => _AutomationBuilderScreenState();
}
class _AutomationBuilderScreenState extends State<AutomationBuilderScreen> {
final List<String> flowNodes = ["Start Process", "Trigger: Battery < 20%"];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("AUTOMATION BUILDER"),
backgroundColor: Colors.transparent,
elevation: 0,
actions: [
IconButton(icon: Icon(Icons.save, color: CyberColors.neonGreen), onPressed: () {}),
],
),
body: Row(
children: [
// Left Panel: Toolbox
Container(
width: 80,
color: Colors.black26,
child: Column(
children: [
SizedBox(height: 20),
_toolIcon(Icons.bolt, "Trigger", CyberColors.neonBlue),
SizedBox(height: 20),
_toolIcon(Icons.play_arrow, "Action", CyberColors.neonPurple),
SizedBox(height: 20),
_toolIcon(Icons.timer, "Delay", Colors.orange),
SizedBox(height: 20),
_toolIcon(Icons.rule, "Condition", Colors.teal),
],
),
),
// Center: Canvas
Expanded(
child: Container(
color: CyberColors.background,
child: Stack(
children: [
Positioned.fill(
child: CustomPaint(
painter: GridPainter(),
),
),
Center(
child: ListView.builder(
padding: EdgeInsets.all(40),
itemCount: flowNodes.length + 1,
itemBuilder: (context, index) {
if (index == flowNodes.length) {
return Center(
child: Padding(
padding: const EdgeInsets.only(top: 20.0),
child: IconButton(
icon: Icon(Icons.add_circle, color: Colors.white24, size: 40),
onPressed: () {
setState(() {
flowNodes.add("Action: Turn Off WiFi");
});
},
),
),
);
}
return _buildNode(flowNodes[index], index);
},
),
),
],
),
),
),
// Right Panel: Properties
if (MediaQuery.of(context).size.width > 800)
Container(
width: 250,
color: Colors.black26,
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("PROPERTIES", style: TextStyle(color: CyberColors.neonBlue, fontWeight: FontWeight.bold)),
SizedBox(height: 20),
Text("Selected Node:", style: TextStyle(color: Colors.white54)),
SizedBox(height: 5),
Text("Trigger Node", style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold)),
Divider(color: Colors.white24, height: 32),
Text("Condition Type", style: TextStyle(color: Colors.white54)),
SizedBox(height: 8),
Container(
padding: EdgeInsets.all(12),
decoration: BoxDecoration(color: Colors.black54, borderRadius: BorderRadius.circular(8)),
child: Row(
children: [
Icon(Icons.battery_alert, color: Colors.white, size: 16),
SizedBox(width: 8),
Text("Battery Level", style: TextStyle(color: Colors.white)),
],
),
),
SizedBox(height: 16),
Text("Threshold", style: TextStyle(color: Colors.white54)),
Slider(value: 0.2, onChanged: (v){}, activeColor: CyberColors.neonBlue),
Text("20%", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
Spacer(),
SizedBox(
width: double.infinity,
child: CyberButton(text: "DELETE NODE", onPressed: () {}, isPrimary: false),
),
],
),
),
],
),
);
}
Widget _toolIcon(IconData icon, String label, Color color) {
return Column(
children: [
Container(
padding: EdgeInsets.all(12),
decoration: BoxDecoration(
color: color.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: color.withOpacity(0.3)),
),
child: Icon(icon, color: color),
),
SizedBox(height: 4),
Text(label, style: TextStyle(color: Colors.white54, fontSize: 10)),
],
);
}
Widget _buildNode(String label, int index) {
return Column(
children: [
CyberCard(
width: 300,
padding: EdgeInsets.all(16),
isGlowing: index == 1,
child: Row(
children: [
Icon(Icons.hexagon, color: index == 0 ? CyberColors.neonGreen : CyberColors.neonBlue),
SizedBox(width: 10),
Expanded(child: Text(label, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold))),
Icon(Icons.drag_indicator, color: Colors.white24),
],
),
),
Container(
height: 40,
width: 2,
color: CyberColors.neonPurple.withOpacity(0.5),
child: Center(
child: Icon(Icons.keyboard_arrow_down, color: CyberColors.neonPurple, size: 20),
),
),
],
);
}
}
class GridPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final paint = Paint()..color = Colors.white.withOpacity(0.03)..strokeWidth = 1;
final step = 40.0;
for (double x = 0; x < size.width; x += step) {
canvas.drawLine(Offset(x, 0), Offset(x, size.height), paint);
}
for (double y = 0; y < size.height; y += step) {
canvas.drawLine(Offset(0, y), Offset(size.width, y), paint);
}
}
@override
bool shouldRepaint(covariant CustomPainter oldDelegate) => false;
}
class LiveStatusScreen extends StatelessWidget {
const LiveStatusScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("LIVE STATUS"), backgroundColor: Colors.transparent),
body: SingleChildScrollView(
padding: EdgeInsets.all(16),
child: Column(
children: [
_buildSystemStatusPanel(),
SizedBox(height: 16),
_buildNetworkGrid(),
SizedBox(height: 16),
_buildLogTerminal(),
],
),
),
);
}
Widget _buildSystemStatusPanel() {
return CyberCard(
isGlowing: true,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("SYSTEM INTEGRITY", style: TextStyle(color: CyberColors.neonBlue, fontWeight: FontWeight.bold)),
StatusLed(color: CyberColors.neonGreen),
],
),
SizedBox(height: 16),
_progressBar("CPU Load", 0.45, CyberColors.neonBlue),
SizedBox(height: 8),
_progressBar("Memory Usage", 0.72, CyberColors.neonPurple),
SizedBox(height: 8),
_progressBar("Network Traffic", 0.28, Colors.orange),
SizedBox(height: 16),
NeonLine(),
],
),
);
}
Widget _progressBar(String label, double value, Color color) {
return Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(label, style: TextStyle(color: Colors.white54, fontSize: 12)),
Text("${(value * 100).toInt()}%", style: TextStyle(color: Colors.white, fontSize: 12)),
],
),
SizedBox(height: 4),
LinearProgressIndicator(
value: value,
color: color,
backgroundColor: Colors.white10,
minHeight: 4,
).animate(onPlay: (c) => c.repeat()).shimmer(duration: 2.seconds, color: Colors.white.withOpacity(0.2)),
],
);
}
Widget _buildNetworkGrid() {
return GridView.count(
crossAxisCount: 2,
crossAxisSpacing: 16,
mainAxisSpacing: 16,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
childAspectRatio: 1.5,
children: [
_statusTile("WiFi Module", "CONNECTED", CyberColors.neonGreen, Icons.wifi),
_statusTile("Bluetooth", "SCANNING", CyberColors.neonBlue, Icons.bluetooth),
_statusTile("Zigbee Gateway", "OFFLINE", CyberColors.neonRed, Icons.hub),
_statusTile("Cloud Sync", "SYNCING", CyberColors.neonPurple, Icons.cloud_sync),
],
);
}
Widget _statusTile(String title, String status, Color color, IconData icon) {
return CyberCard(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(icon, color: color, size: 28),
SizedBox(height: 8),
Text(title, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
SizedBox(height: 4),
Text(status, style: TextStyle(color: color, fontSize: 10, letterSpacing: 1)),
if (status == "SYNCING" || status == "SCANNING")
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: SizedBox(height: 2, width: 20, child: LinearProgressIndicator(color: color)),
).animate().fadeIn()
],
),
);
}
Widget _buildLogTerminal() {
return CyberCard(
child: Container(
height: 150,
width: double.infinity,
padding: EdgeInsets.all(8),
color: Colors.black45,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("EVENT LOG", style: TextStyle(color: Colors.white38, fontSize: 10)),
Divider(color: Colors.white10),
Expanded(
child: ListView(
children: [
_logLine("12:00:01", "System initialized", Colors.green),
_logLine("12:00:05", "Connected to WiFi Home-5G", Colors.blue),
_logLine("12:01:22", "Battery level check: 87%", Colors.white),
_logLine("12:05:00", "WARNING: Zigbee gateway timeout", Colors.orange),
_logLine("12:05:02", "Retrying connection...", Colors.white54),
],
),
),
],
),
),
);
}
Widget _logLine(String time, String msg, Color color) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 2.0),
child: RichText(
text: TextSpan(
style: TextStyle(fontFamily: 'Courier', fontSize: 10),
children: [
TextSpan(text: "[$time] ", style: TextStyle(color: Colors.white38)),
TextSpan(text: msg, style: TextStyle(color: color)),
],
),
),
);
}
}
class PlaceholderScreen extends StatelessWidget {
final String title;
const PlaceholderScreen({super.key, required this.title});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(title.toUpperCase(), style: TextStyle(letterSpacing: 2)),
backgroundColor: Colors.transparent,
elevation: 0,
),
body: Center(
child: CyberCard(
width: 300,
padding: EdgeInsets.all(32),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.construction, size: 64, color: Colors.white24),
SizedBox(height: 20),
Text("MODULE OFFLINE", style: TextStyle(fontSize: 24, color: CyberColors.neonRed, fontWeight: FontWeight.bold)),
SizedBox(height: 10),
Text("This component is currently under development or restricted.",
textAlign: TextAlign.center,
style: TextStyle(color: Colors.white54)
),
SizedBox(height: 20),
LinearProgressIndicator(color: CyberColors.neonBlue, backgroundColor: Colors.white10),
],
),
),
),
);
}
}
I have a text file which is encrypted by a program with gebbirish language so how can we decode it...
ReplyDeletesend me email on sales.rajatkumar@gmail.com or contact on +91 8909759117