Created
March 5, 2025 14:08
-
-
Save up1/cd53c0e0a5e7a6704504c0f02f9e8e67 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, | |
theme: ThemeData( | |
useMaterial3: true, | |
), | |
home: const HomePage(), | |
); | |
} | |
} | |
class HomePage extends StatelessWidget { | |
const HomePage({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.grey[200], | |
appBar: AppBar( | |
backgroundColor: const Color(0xFFB8004C), | |
title: Row( | |
children: [ | |
Image.network( | |
'https://corsproxy.io/?I+couldn%27t+generate+an+image+for+you.+I+got+this+error%3A+OpenAIClientException%28%7B%0A++%22uri%22%3A+%22https%3A%2F%2Fapi.openai.com%2Fv1%2Fimages%2Fgenerations%22%2C%0A++%22method%22%3A+%22POST%22%2C%0A++%22code%22%3A+429%2C%0A++%22message%22%3A+%22Unsuccessful+response%22%2C%0A++%22body%22%3A+%7B%0A++++%22error%22%3A+%7B%0A++++++%22code%22%3A+%22rate_limit_exceeded%22%2C%0A++++++%22message%22%3A+%22Rate+limit+exceeded+for+images+per+minute+in+organization+org-i80sUbnZfz5TGxVwKgB1u919.+Limit%3A+5%2F1min.+Current%3A+8%2F1min.+Please+visit+https%3A%2F%2Fplatform.openai.com%2Fdocs%2Fguides%2Frate-limits+to+learn+how+to+increase+your+rate+limit.%22%2C%0A++++++%22param%22%3A+null%2C%0A++++++%22type%22%3A+%22requests%22%0A++++%7D%0A++%7D%0A%7D%29', | |
width: 40, | |
height: 40, | |
), | |
const SizedBox(width: 8), | |
const Text( | |
'สวัสดี, 0863816736\nบิ๊กซี รัชดาภิเษก - prom condo 122/64 prom con', | |
style: TextStyle(color: Colors.white, fontSize: 14), | |
), | |
const Spacer(), | |
const Icon(Icons.keyboard_arrow_down, color: Colors.white), | |
], | |
), | |
), | |
body: SingleChildScrollView( | |
child: Column( | |
children: [ | |
Container( | |
color: const Color(0xFFB8004C), | |
padding: const EdgeInsets.all(16), | |
child: Column( | |
children: [ | |
Row( | |
children: [ | |
Expanded( | |
child: TextField( | |
decoration: InputDecoration( | |
filled: true, | |
fillColor: Colors.white, | |
prefixIcon: const Icon(Icons.search), | |
hintText: 'ค้นหาสินค้า', | |
border: OutlineInputBorder( | |
borderRadius: BorderRadius.circular(8), | |
borderSide: BorderSide.none, | |
), | |
), | |
), | |
), | |
const SizedBox(width: 8), | |
Container( | |
padding: const EdgeInsets.all(8), | |
decoration: BoxDecoration( | |
color: const Color(0xFFB3E500), | |
borderRadius: BorderRadius.circular(8), | |
), | |
child: const Icon(Icons.qr_code_scanner, color: Colors.white), | |
), | |
const SizedBox(width: 8), | |
Stack( | |
children: [ | |
const Icon(Icons.notifications, color: Colors.white), | |
Positioned( | |
right: 0, | |
child: Container( | |
padding: const EdgeInsets.all(2), | |
decoration: const BoxDecoration( | |
color: Colors.red, | |
shape: BoxShape.circle, | |
), | |
child: const Text( | |
'New', | |
style: TextStyle(color: Colors.white, fontSize: 8), | |
), | |
), | |
), | |
], | |
), | |
const SizedBox(width: 8), | |
const Icon(Icons.shopping_cart, color: Colors.white), | |
], | |
), | |
const SizedBox(height: 16), | |
Image.network( | |
'https://corsproxy.io/?https%3A%2F%2Foaidalleapiprodscus.blob.core.windows.net%2Fprivate%2Forg-i80sUbnZfz5TGxVwKgB1u919%2Fuser-pCtLOxVNRM4KtX64wx3hUJyv%2Fimg-q4NaNA8oUXWtkewqN3PIuDN4.png%3Fst%3D2025-03-05T13%253A08%253A32Z%26se%3D2025-03-05T15%253A08%253A32Z%26sp%3Dr%26sv%3D2024-08-04%26sr%3Db%26rscd%3Dinline%26rsct%3Dimage%2Fpng%26skoid%3Dd505667d-d6c1-4a0a-bac7-5c84a87759f8%26sktid%3Da48cca56-e6da-484e-a814-9c849652bcb3%26skt%3D2025-03-05T02%253A28%253A48Z%26ske%3D2025-03-06T02%253A28%253A48Z%26sks%3Db%26skv%3D2024-08-04%26sig%3DxtOUE%2FKf3Xh657fG%2FykEvBeLfcUz5d2kPIMVSrDdfyM%253D', | |
fit: BoxFit.cover, | |
), | |
], | |
), | |
), | |
const SizedBox(height: 16), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceAround, | |
children: [ | |
_buildCategoryItem('บิ๊กพอยต์\nเริ่มใช้งาน', Icons.card_giftcard), | |
_buildCategoryItem('คูปองของฉัน\nเริ่มต้นใช้งาน', Icons.confirmation_number), | |
], | |
), | |
const SizedBox(height: 16), | |
SingleChildScrollView( | |
scrollDirection: Axis.horizontal, | |
child: Row( | |
children: [ | |
_buildIconItem('ส่งฟรี\nสั่งเลย!', 'https://corsproxy.io/?https%3A%2F%2Foaidalleapiprodscus.blob.core.windows.net%2Fprivate%2Forg-i80sUbnZfz5TGxVwKgB1u919%2Fuser-pCtLOxVNRM4KtX64wx3hUJyv%2Fimg-d4JfH6vaY9Cuq0wTp21qjAHD.png%3Fst%3D2025-03-05T13%253A08%253A30Z%26se%3D2025-03-05T15%253A08%253A30Z%26sp%3Dr%26sv%3D2024-08-04%26sr%3Db%26rscd%3Dinline%26rsct%3Dimage%2Fpng%26skoid%3Dd505667d-d6c1-4a0a-bac7-5c84a87759f8%26sktid%3Da48cca56-e6da-484e-a814-9c849652bcb3%26skt%3D2025-03-05T02%253A10%253A06Z%26ske%3D2025-03-06T02%253A10%253A06Z%26sks%3Db%26skv%3D2024-08-04%26sig%3DrYuIIjjiZxoHlNaflw3CP2363QMd0q5aIXrSwsRnDR4%253D'), | |
_buildIconItem('ส่วนลด\nออนไลน์', 'https://corsproxy.io/?https%3A%2F%2Foaidalleapiprodscus.blob.core.windows.net%2Fprivate%2Forg-i80sUbnZfz5TGxVwKgB1u919%2Fuser-pCtLOxVNRM4KtX64wx3hUJyv%2Fimg-G42nd4ZEctsmz6kGJ8NXaHFS.png%3Fst%3D2025-03-05T13%253A08%253A31Z%26se%3D2025-03-05T15%253A08%253A31Z%26sp%3Dr%26sv%3D2024-08-04%26sr%3Db%26rscd%3Dinline%26rsct%3Dimage%2Fpng%26skoid%3Dd505667d-d6c1-4a0a-bac7-5c84a87759f8%26sktid%3Da48cca56-e6da-484e-a814-9c849652bcb3%26skt%3D2025-03-05T02%253A13%253A17Z%26ske%3D2025-03-06T02%253A13%253A17Z%26sks%3Db%26skv%3D2024-08-04%26sig%3Dz3ASdxVUVFFAr%252B%252BRfL4nWhM3hmU8X7FIg2YzVRfyyzc%253D'), | |
_buildIconItem('ภารกิจบิ๊กซี', 'https://corsproxy.io/?https%3A%2F%2Foaidalleapiprodscus.blob.core.windows.net%2Fprivate%2Forg-i80sUbnZfz5TGxVwKgB1u919%2Fuser-pCtLOxVNRM4KtX64wx3hUJyv%2Fimg-k8nqx6i5zRbNvi97P7LBlVc4.png%3Fst%3D2025-03-05T13%253A08%253A32Z%26se%3D2025-03-05T15%253A08%253A32Z%26sp%3Dr%26sv%3D2024-08-04%26sr%3Db%26rscd%3Dinline%26rsct%3Dimage%2Fpng%26skoid%3Dd505667d-d6c1-4a0a-bac7-5c84a87759f8%26sktid%3Da48cca56-e6da-484e-a814-9c849652bcb3%26skt%3D2025-03-05T02%253A45%253A10Z%26ske%3D2025-03-06T02%253A45%253A10Z%26sks%3Db%26skv%3D2024-08-04%26sig%3D8tcu2LmxmM3GAIbrc6a%252BG16wXB12iJKZoFbt2k1E2bs%253D'), | |
_buildIconItem('พาร์ทเนอร์', 'https://corsproxy.io/?https%3A%2F%2Foaidalleapiprodscus.blob.core.windows.net%2Fprivate%2Forg-i80sUbnZfz5TGxVwKgB1u919%2Fuser-pCtLOxVNRM4KtX64wx3hUJyv%2Fimg-93WJZcbuFjAqNi1wzwU4gBip.png%3Fst%3D2025-03-05T13%253A08%253A32Z%26se%3D2025-03-05T15%253A08%253A32Z%26sp%3Dr%26sv%3D2024-08-04%26sr%3Db%26rscd%3Dinline%26rsct%3Dimage%2Fpng%26skoid%3Dd505667d-d6c1-4a0a-bac7-5c84a87759f8%26sktid%3Da48cca56-e6da-484e-a814-9c849652bcb3%26skt%3D2025-03-05T02%253A55%253A34Z%26ske%3D2025-03-06T02%253A55%253A34Z%26sks%3Db%26skv%3D2024-08-04%26sig%3D%2F16OU1CkgBPQ0pMxiC1xfHCgKVAe1LrWwpIAVMgmjSU%253D'), | |
_buildIconItem('ประกันภัย\nออนไลน์', 'https://corsproxy.io/?https%3A%2F%2Foaidalleapiprodscus.blob.core.windows.net%2Fprivate%2Forg-i80sUbnZfz5TGxVwKgB1u919%2Fuser-pCtLOxVNRM4KtX64wx3hUJyv%2Fimg-SPsOEV3uCYp30PRIo4UZ88nz.png%3Fst%3D2025-03-05T13%253A08%253A30Z%26se%3D2025-03-05T15%253A08%253A30Z%26sp%3Dr%26sv%3D2024-08-04%26sr%3Db%26rscd%3Dinline%26rsct%3Dimage%2Fpng%26skoid%3Dd505667d-d6c1-4a0a-bac7-5c84a87759f8%26sktid%3Da48cca56-e6da-484e-a814-9c849652bcb3%26skt%3D2025-03-04T21%253A19%253A34Z%26ske%3D2025-03-05T21%253A19%253A34Z%26sks%3Db%26skv%3D2024-08-04%26sig%3Dd17Sp6KLFl9xTFIRcZFN71RH0LDQzLFnKCTycMMUzLw%253D'), | |
], | |
), | |
), | |
const SizedBox(height: 16), | |
Image.network( | |
'https://corsproxy.io/?https%3A%2F%2Foaidalleapiprodscus.blob.core.windows.net%2Fprivate%2Forg-i80sUbnZfz5TGxVwKgB1u919%2Fuser-pCtLOxVNRM4KtX64wx3hUJyv%2Fimg-iNOI4GodZXCY50LHvLQbTAWN.png%3Fst%3D2025-03-05T13%253A08%253A32Z%26se%3D2025-03-05T15%253A08%253A32Z%26sp%3Dr%26sv%3D2024-08-04%26sr%3Db%26rscd%3Dinline%26rsct%3Dimage%2Fpng%26skoid%3Dd505667d-d6c1-4a0a-bac7-5c84a87759f8%26sktid%3Da48cca56-e6da-484e-a814-9c849652bcb3%26skt%3D2025-03-05T03%253A17%253A40Z%26ske%3D2025-03-06T03%253A17%253A40Z%26sks%3Db%26skv%3D2024-08-04%26sig%3DQ8rmAe05ewNFlQmbGfD5SuVG6wyfTE8iBLV9mJNOnNg%253D', | |
fit: BoxFit.cover, | |
), | |
], | |
), | |
), | |
bottomNavigationBar: BottomNavigationBar( | |
items: const [ | |
BottomNavigationBarItem( | |
icon: Icon(Icons.home), | |
label: 'หน้าหลัก', | |
), | |
BottomNavigationBarItem( | |
icon: Icon(Icons.card_giftcard), | |
label: 'บิ๊กพอยต์', | |
), | |
BottomNavigationBarItem( | |
icon: Icon(Icons.grid_view), | |
label: 'สินค้า', | |
), | |
BottomNavigationBarItem( | |
icon: Icon(Icons.favorite), | |
label: 'ลิสต์ของฉัน', | |
), | |
BottomNavigationBarItem( | |
icon: Icon(Icons.person), | |
label: 'บัญชี', | |
), | |
], | |
), | |
); | |
} | |
Widget _buildCategoryItem(String text, IconData icon) { | |
return Column( | |
children: [ | |
Icon(icon, size: 40, color: const Color(0xFFB8004C)), | |
const SizedBox(height: 4), | |
Text( | |
text, | |
textAlign: TextAlign.center, | |
style: const TextStyle(fontSize: 12, color: Colors.black), | |
), | |
], | |
); | |
} | |
Widget _buildIconItem(String text, String imageUrl) { | |
return Padding( | |
padding: const EdgeInsets.symmetric(horizontal: 8), | |
child: Column( | |
children: [ | |
Image.network(imageUrl, width: 60, height: 60), | |
const SizedBox(height: 4), | |
Text( | |
text, | |
textAlign: TextAlign.center, | |
style: const TextStyle(fontSize: 12, color: Colors.black), | |
), | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment