Skip to main content

Flutter से Android App बनाना सीखें: Step-by-Step आसान गाइड!

Flutter से Android App बनाना सीखें: Step-by-Step आसान गाइड! Flutter Google का एक लोकप्रिय UI टूलकिट है जिसकी मदद से आप एक ही कोडबेस (Dart) से Android और iOS दोनों के लिए सुंदर और फ़ास्ट ऐप्स बना सकते हैं। नीचे Flutter में Android App बनाने की पूरी प्रक्रिया को Step-by-Step समझाया गया है: ---

1. आवश्यक टूल्स इंस्टॉल करें (Prerequisites)

सबसे पहले आपको अपने कंप्यूटर में निम्नलिखित टूल्स सेटअप करने होंगे: * **Flutter SDK:** Flutter की आधिकारिक वेबसाइट से डाउनलोड करें। * **Java Development Kit (JDK):** Android डेवलपमेंट के लिए आवश्यक है। * **Android Studio:** कोड लिखने, Emulator सेट करने और Android SDK टूल्स के लिए। * **VS Code (वैकल्पिक):** यदि आप हल्का कोड एडिटर चाहते हैं (Flutter Extension के साथ)। **सेटअप फ्लो डायग्राम:** ```text [डाउनलोड SDK] ──> [Environment Variables सेट करें] ──> [cmd में 'flutter doctor' चलाएं] │ [सक्सेस: सेटअप पूरा] <──────────────────────────────────────────────┘ ``` ---

2. नया Flutter प्रोजेक्ट बनाएं (Create Project)

अपने टर्मिनल (Terminal) या कमांड प्रॉम्प्ट (CMD) को खोलें और जहाँ प्रोजेक्ट बनाना चाहते हैं वहाँ जाकर यह कमांड टाइप करें: ```bash flutter create my_first_app ``` यह कमांड **my_first_app** नाम का एक नया फोल्डर बनाएगी जिसमें सभी जरूरी फाइलें होंगी। **प्रोजेक्ट क्रिएशन डायग्राम:** ```text ┌────────────────────────────────────────────────────────┐ │ Command Prompt │ │ > flutter create my_first_app │ │ │ │ Creating project my_first_app... │ │ [✓] Flutter (Channel stable) │ │ [✓] Android toolchain - develop for Android devices │ └────────────────────────────────────────────────────────┘ ``` ---

3. प्रोजेक्ट स्ट्रक्चर को समझें (Directory Structure)

अपने प्रोजेक्ट को VS Code या Android Studio में खोलें। आपको कई फोल्डर मिलेंगे, जिनमें से मुख्य ये हैं: ```text my_first_app/ ├── android/ <-- (Android स्पेसिफिक सेटिंग्स और फाइल्स) ├── ios/ <-- (iOS स्पेसिफिक सेटिंग्स और फाइल्स) ├── lib/ <-- (यहाँ आपका मुख्य Dart कोड रहेगा) │ └── main.dart <-- (ऐप का एंट्री पॉइंट / Main File) ├── pubspec.yaml <-- (पैकेज, इमेजेस और फोंट्स को मैनेज करने के लिए) ``` ---

4. कोड लिखें (Write Your Code in main.dart)

`lib/main.dart` फाइल को खोलें और पुराने कोड को हटाकर नीचे दिया गया सरल कोड लिखें। यह एक "Hello World" ऐप है: ```dart 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, home: Scaffold( appBar: AppBar( title: const Text('मेरा पहला Flutter App'), backgroundColor: Colors.blue, ), body: const Center( child: Text( 'नमस्ते दुनिया! (Hello World)', style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), ), ), ), ); } } ``` ---

5. ऐप को रन और टेस्ट करें (Run and Test)

ऐप को टेस्ट करने के लिए आप दो तरीकों का इस्तेमाल कर सकते हैं: 1. **Android Emulator (Virtual Device):** Android Studio से बनाएं। 2. **Real Device:** अपने असली एंड्रॉइड फोन में USB Debugging ऑन करके कंप्यूटर से कनेक्ट करें। अब टर्मिनल में यह कमांड चलाएं: ```bash flutter run ``` **लाइव डेवलपमेंट डायग्राम (Hot Reload):** Flutter में **Hot Reload (r)** फीचर होता है, जिससे कोड बदलते ही बिना ऐप रीस्टार्ट किए बदलाव तुरंत स्क्रीन पर दिखते हैं। ```text [कोड बदलें (main.dart)] ──> [Save (Ctrl+S)] ──> [Hot Reload (1 सेकंड में स्क्रीन अपडेट)] ``` ---

6. Android के लिए APK जनरेट करें (Build Release APK)

जब आपका ऐप पूरी तरह तैयार हो जाए और आप इसे दूसरों के साथ शेयर करना चाहते हैं या Play Store पर डालना चाहते हैं, तो टर्मिनल में यह कमांड चलाएं: ```bash flutter build apk --release ``` **APK फ़ाइल का स्थान:** बिल्ड पूरा होने के बाद आपकी APK फाइल यहाँ मिलेगी: `/build/app/outputs/flutter-apk/app-release.apk` इस APK को आप किसी भी Android फ़ोन में इंस्टॉल कर सकते हैं!

Comments

Popular posts from this blog

Future devices

    मैं एक   भविष्य के टेक डिवाइस   का लॉजिक / वायर-फ्रेम (circuit block) डायग्राम दे रहा हूँ — तस्वीर नहीं, पर पूरा कनेक्शन-लेआउट, सिग्नल-लेंथ, इंटरफेस और स्टेट-मैशीन लॉजिक लिखकर। आप इसे सीधे पढ़कर सर्किट-डिजाइन या सिस्टम-आर्किटेक्चर में आगे बढ़ा सकते हैं। मैं एक काल्पनिक — पर व्यावहारिक — डिवाइस चुना है: “Personal Ambient AI Hub (PAAH)”  — एक निजी, ऊर्जा-संचालित, edge-AI + multi-sensor, secure neuro & external interface वाला डिवाइस जो AR/ambient services, contextual computing और secure communications उपलब्ध कराता है. नीचे तीन भागों में दिया गया है: (A) ASCII block / wireframe diagram, (B) प्राथमिक सिग्नल/बसर, पावर और प्रोफाइल, (C) लॉजिक फ्लो / स्टेट मशीन + नोट्स और संभावित कंपोनेंट्स। A. Block / Wireframe Diagram (ASCII) pgsql Copy code + -----------------------------+ | External Power / WPT | | (USB-C PD / Resonant WPT) | + ------------...

BUy Product From China

Import Guide China se products kaise khareedein Step-by-step complete guide · Best websites · Precautions in Hindi 8 Steps 10+ Best Websites 12 Precautions ⚠️ Zaroori Savdhaniyan (सावधानियां) China se shopping karte waqt in baaton ka dhyan rakhein Product Buying Guide Laptop (₹30K) Console (₹4K) Website List Website List Filter: Sab websites Retail (1 piece) Wholesale / B2B Fashion Ele...

The Integrated Power Core: A Conceptual Framework for a 20-Year Vehicular Power Source

  The Integrated Power Core: A Conceptual Framework for a 20-Year Vehicular Power Source The Horizon of Power Generation: Defining the Challenge The modern world is built upon the foundation of accessible, dense, and portable energy. For over a century, the internal combustion engine, powered by liquid fossil fuels, has been the undisputed champion of personal mobility. However, the environmental consequences of this paradigm and the inherent limitations of electrochemical storage have catalyzed a search for a revolutionary successor. The challenge is not merely to create a more efficient or cleaner power source, but to fundamentally redefine the relationship between a vehicle and its energy supply. This report outlines a conceptual framework for a vehicular power source designed to meet an exceptionally ambitious performance target: providing sufficient energy for 20 years of typical operation within a volume of just one liter. This goal necessitates a departure from all conventio...