Created
December 4, 2023 08:05
-
-
Save davidmigloz/3e8efe98abc4b8cf52558ff11dcdb91f to your computer and use it in GitHub Desktop.
Generated code from pixels2flutter.dev
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
theme: ThemeData( | |
brightness: Brightness.dark, | |
primarySwatch: Colors.blue, | |
visualDensity: VisualDensity.adaptivePlatformDensity, | |
), | |
home: VPNProfileScreen(), | |
); | |
} | |
} | |
class VPNProfileScreen extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Proton VPN'), | |
backgroundColor: Colors.black, | |
actions: [ | |
IconButton( | |
icon: Icon(Icons.percent), | |
onPressed: () {}, | |
), | |
IconButton( | |
icon: Icon(Icons.settings), | |
onPressed: () {}, | |
), | |
], | |
), | |
body: Container( | |
padding: EdgeInsets.all(16.0), | |
decoration: BoxDecoration( | |
gradient: LinearGradient( | |
begin: Alignment.topCenter, | |
end: Alignment.bottomCenter, | |
colors: [Colors.black, Colors.grey.shade900], | |
), | |
), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Card( | |
color: Colors.grey.shade800, | |
child: ListTile( | |
leading: Image.network( | |
'https://corsproxy.io/?https%3A%2F%2Foaidalleapiprodscus.blob.core.windows.net%2Fprivate%2Forg-dtDDtkEGoFccn5xaP5W1p3Rr%2Fuser-3XZA7QXb1LF8ADMIxEZC0Qp4%2Fimg-Qa3H0dLdZLh3t8wLP4Cwsen4.png%3Fst%3D2023-12-04T07%253A05%253A27Z%26se%3D2023-12-04T09%253A05%253A27Z%26sp%3Dr%26sv%3D2021-08-06%26sr%3Db%26rscd%3Dinline%26rsct%3Dimage%2Fpng%26skoid%3D6aaadede-4fb3-4698-a8f6-684d7786b067%26sktid%3Da48cca56-e6da-484e-a814-9c849652bcb3%26skt%3D2023-12-03T22%253A42%253A37Z%26ske%3D2023-12-04T22%253A42%253A37Z%26sks%3Db%26skv%3D2021-08-06%26sig%3DeqC4jQoEFQ5HZ2gMU%252B3u%252Bf4oWKNKP4IVjQ1GcthjU8o%253D', | |
width: 40, | |
height: 40, | |
), | |
title: Text('Georgia GE#07'), | |
subtitle: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Text('IP: 94.137.92.1'), | |
Text('Stealth'), | |
], | |
), | |
trailing: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
Text('17% Load'), | |
SizedBox(height: 4), | |
Row( | |
mainAxisSize: MainAxisSize.min, | |
children: [ | |
Icon(Icons.download, size: 14), | |
Text(' 2.0 KB/s'), | |
SizedBox(width: 4), | |
Icon(Icons.upload, size: 14), | |
Text(' 1.0 KB/s'), | |
], | |
), | |
], | |
), | |
), | |
), | |
SizedBox(height: 16), | |
TextButton( | |
onPressed: () {}, | |
child: Text('Disconnect'), | |
style: TextButton.styleFrom( | |
primary: Colors.white, | |
backgroundColor: Colors.red, | |
), | |
), | |
SizedBox(height: 16), | |
Text('Profiles', style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)), | |
SizedBox(height: 8), | |
ProfileItem(title: 'Fastest', icon: Icons.flash_on), | |
ProfileItem(title: 'Random', icon: Icons.shuffle), | |
ProfileItem(title: 'Fast GE', icon: Icons.circle, color: Colors.blue), | |
ProfileItem(title: 'Romania', icon: Icons.circle, color: Colors.orange), | |
SizedBox(height: 16), | |
Center( | |
child: ElevatedButton( | |
onPressed: () {}, | |
child: Text('Create Profile'), | |
style: ElevatedButton.styleFrom( | |
primary: Colors.purple, | |
padding: EdgeInsets.symmetric(horizontal: 32, vertical: 16), | |
), | |
), | |
), | |
SizedBox(height: 8), | |
Center( | |
child: TextButton( | |
onPressed: () {}, | |
child: Text('Manage Profiles'), | |
style: TextButton.styleFrom( | |
primary: Colors.white, | |
), | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} | |
class ProfileItem extends StatelessWidget { | |
final String title; | |
final IconData icon; | |
final Color? color; | |
const ProfileItem({Key? key, required this.title, required this.icon, this.color}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return ListTile( | |
leading: Icon(icon, color: color ?? Colors.white), | |
title: Text(title), | |
onTap: () {}, | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment