Created
October 3, 2024 19:52
-
-
Save hiddify-com/98ca21006c40b62e7b710e8124ef31e9 to your computer and use it in GitHub Desktop.
Generated code from pixels2flutter.dev
This file contains 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(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
useMaterial3: true, | |
), | |
home: const HomePage(), | |
); | |
} | |
} | |
class HomePage extends StatelessWidget { | |
const HomePage({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Center( | |
child: GestureDetector( | |
onTap: () { | |
Navigator.push( | |
context, | |
MaterialPageRoute(builder: (context) => const DetailPage()), | |
); | |
}, | |
child: Container( | |
width: 350, | |
height: 100, | |
decoration: BoxDecoration( | |
color: Colors.white, | |
borderRadius: BorderRadius.circular(20), | |
boxShadow: [ | |
BoxShadow( | |
color: Colors.black.withOpacity(0.1), | |
blurRadius: 10, | |
offset: const Offset(0, 4), | |
), | |
], | |
), | |
child: Row( | |
children: [ | |
Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Image.network( | |
'https://placehold.co/40x40?description=German%20flag', | |
width: 40, | |
height: 40, | |
), | |
), | |
Expanded( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
const Text( | |
'Direct TUIC', | |
style: TextStyle( | |
fontSize: 18, | |
fontWeight: FontWeight.bold, | |
), | |
), | |
const SizedBox(height: 4), | |
Row( | |
children: const [ | |
Text( | |
'IP: 52.87.109.23', | |
style: TextStyle( | |
fontSize: 14, | |
color: Colors.grey, | |
), | |
), | |
SizedBox(width: 8), | |
Icon( | |
Icons.cloud, | |
size: 16, | |
color: Colors.orange, | |
), | |
SizedBox(width: 4), | |
Text( | |
'Cloudflare', | |
style: TextStyle( | |
fontSize: 14, | |
color: Colors.grey, | |
), | |
), | |
], | |
), | |
], | |
), | |
), | |
const Padding( | |
padding: EdgeInsets.all(16.0), | |
child: Icon( | |
Icons.arrow_forward_ios, | |
color: Colors.blue, | |
), | |
), | |
], | |
), | |
), | |
), | |
), | |
); | |
} | |
} | |
class DetailPage extends StatelessWidget { | |
const DetailPage({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: const Text('Detail Page'), | |
), | |
body: const Center( | |
child: Text('This is the detail page.'), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment