Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter_application_1

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

//----------------------------------

  1. state : is something like that which is where something changes.. ur wah change koh hi hum state kehte hai..
  2. statless: in the same screen there is no change in the data..
  3. statefull: in the same screen there is change in the data.. eg.. if we want to click on login button then the welcome text will change.. .. in a different way..

final name; -> this is public variable.. final _name; -> this is private variable..

private kaa mtlb hai ki.. if that the class is private then us file ke alwaa koi ur nahi excess kr skta hai.. == us class ke alwaa koi ur nahi access kr skta hai..

//----------------------------------

//--------------------------------------------------------------------------

// Widget build(BuildContext context) {
//                 - this is a parementer ..
// There are methods
// Jaise we saying sabji le kar aaao..  -> Methods..
// Ur sabji le kar aane aane kaa ek process ho skta hai..
//        BringVegetables({ @required or bool thaila: false, int rupay = 200}){    //If we remove 200 it'll take 100 default value.. means that this is called in option parameter.. so then we also remove curly braces.. or inside the condent..        // -> So this is a method..
//             // Take Cycle
//             // Go to market
//             // Buy Vegetables
//             // Bring Vegetables
//             // Return to home
//           }
//
// }

// context is a parameter that is used to access the context of the widget. in a simple words it is a parameter that is used to where file is running..
// BuildContext is a parameter that is used to access the context of the widget. in a simple words it is a parameter that is used to where file is running..

// StatelessWidget is a widget that is static. or a widget that is not dynamic.
// StatefulWidget is a widget that is dynamic. or a widget that is dynamic.

// Scaffold is a widget that provides a framework for building a screen.
// AppBar is a widget that provides a bar at the top of the screen.
// Drawer is a widget that provides a drawer at the left of the screen.
// BottomNavigationBar is a widget that provides a bar at the bottom of the screen.
// FloatingActionButton is a widget that provides a button at the bottom of the screen.
// ListView is a widget that provides a list of items.
// ListTile is a widget that provides a list of items.
// Navigator is a widget that provides a navigation to the next screen.
// PopupMenuButton is a widget that provides a popup menu button.
// TabBar is a widget that provides a tab bar.
// TabBarView is a widget that provides a tab bar view.

// Container is a widget that provides a container.
// Center is a widget that provides a center.
// Row is a widget that provides a row.
// Column is a widget that provides a column.
// Expanded is a widget that provides a expanded.
// SizedBox is a widget that provides a sized box.
// Text is a widget that provides a text.
// TextField is a widget that provides a text field.
// ElevatedButton is a widget that provides a elevated button.
// Icon is a widget that provides a icon.
// Image is a widget that provides a image.
// IconButton is a widget that provides a icon button.
// Image.asset is a widget that provides a image from asset.
// Image.network is a widget that provides a image from network.
// Image.file is a widget that provides a image from file.
// Image.memory is a widget that provides a image from memory.

//--------------------------------------------------------------------------

// void means that the function is not returning anything. or empty. or null. or void. or nothing.
// BuildContext is the context of the widget. or  a parameter that is passed to the widget.

// StatelessWidget is a widget that does not change its state. or a widget that is not dynamic.
// StatefulWidget is a widget that changes its state. or a widget that is dynamic.

// Scaffold is a widget that provides a framework for building a screen.
// AppBar is a widget that provides a bar at the top of the screen.
// Drawer is a widget that provides a drawer at the left of the screen.
// BottomNavigationBar is a widget that provides a bar at the bottom of the screen.
// FloatingActionButton is a widget that provides a button at the bottom of the screen.

// ListView is a widget that provides a list of items.
// ListTile is a widget that provides a list of items.
// Navigator is a widget that provides a navigation to the next screen.
// PopupMenuButton is a widget that provides a popup menu button.
// TabBar is a widget that provides a tab bar.
// TabBarView is a widget that provides a tab bar view.

// Container is a widget that provides a container.
// Center is a widget that provides a center.
// Row is a widget that provides a row.
// Column is a widget that provides a column.
// Expanded is a widget that provides a expanded.
// Flexible is a widget that provides a flexible.
// SizedBox is a widget that provides a sized box.
// Text is a widget that provides a text.
// TextField is a widget that provides a text field.
// TextFormField is a widget that provides a text form field.
// ElevatedButton is a widget that provides a elevated button.
// OutlinedButton is a widget that provides a outlined button.
// Icon is a widget that provides an icon.
// Image is a widget that provides an image.
// Image.asset is a widget that provides an image from the asset.
// Image.network is a widget that provides an image from the network.
// Image.file is a widget that provides an image from the file.
// Image.memory is a widget that provides an image from the memory.
// Stack is a widget that provides a stack.
// Positioned is a widget that provides a positioned.
// AspectRatio is a widget that provides an aspect ratio.
// FractionallySizedBox is a widget that provides a fractionally sized box.
// LayoutBuilder is a widget that provides a layout builder.
// MediaQuery is a widget that provides a media query.
// OrientationBuilder is a widget that provides an orientation builder.
// SizedBox is a widget that provides a sized box.
// Spacer is a widget that provides a spacer.
// Wrap is a widget that provides a wrap.
// Wrap is a widget that provides a wrap.
// Wrap is a widget that provides a wrap.
// Wrap is a widget that provides a wrap.
// Here are the properties of the Scaffold widget:
// appBar: AppBar(
//   title: Text("Home Page"),
// ),
// body: Center(
//   child: Container(
//     child: Text("Welcome to my HomePage"),
//   ),
// ),
// drawer: Drawer(
//   child: ListView(
//     children: [
//       ListTile(
//         title: Text("Home"),
//         onTap: () {
//           // Update the state of the app
//           // ...
//           // Then close the drawer
//           Navigator.pop(context);
//         },
//       ),
//     ],
//   ),
// ),
// bottomNavigationBar: BottomNavigationBar(
//   items: [
//     BottomNavigationBarItem(icon: Icon(Icons.home), label: "Home"),
//     BottomNavigationBarItem(icon: Icon(Icons.settings), label: "Settings"),
//   ],
// ),
// floatingActionButton: FloatingActionButton(
//   onPressed: () {
//     // Add your onPressed code here!
//   },
//   child: Icon(Icons.add),
// ),
// floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
// endDrawer: Drawer(
//   child: ListView(
//     children: [
//       ListTile(
//         title: Text("Home"),
//         onTap: () {
//           // Update the state of the app
//           // ...
//           // Then close the drawer
//           Navigator.pop(context);
//         },
//       ),
//     ],
//   ),
// ),
// And lot more are there.
// Methods are...
// 1. StatelessWidget
// 2. StatefulWidget
// 3. InheritedWidget
// 4. SingleChildScrollView
// 5. ListView
// 6. GridView
// 7. Stack
// 8. Positioned
// 9. AnimatedWidget
// 10. AnimatedBuilder
// 11. AnimatedOpacity
// 12. AnimatedPositioned
// 13. AnimatedContainer
// 14. AnimatedCrossFade
// 15. AnimatedSwitcher
// 16. AnimatedList
// 17. AnimatedModalBarrier
// 18. AnimatedPadding
// 19. AnimatedSize
// 20. AnimatedTheme

// Most of the methods used in the flutter_application are..
// 1. StatelessWidget
// 2. StatefulWidget
// 3. InheritedWidget
// 4. SingleChildScrollView
// 5. ListView
// 6. GridView
// 7. Stack
// 8. Positioned
// 9. AnimatedWidget
// 10. AnimatedBuilder
// 11. AnimatedOpacity
// 12. AnimatedPositioned
// 13. AnimatedContainer
// 14. AnimatedCrossFade
// 15. AnimatedSwitcher
// 16. AnimatedList
// 17. AnimatedModalBarrier
// 18. AnimatedPadding
// 19. AnimatedSize
// 20. AnimatedTheme

// 1. StatelessWidget
// 2. StatefulWidget
// 3. InheritedWidget
// 4. SingleChildScrollView
// 5. ListView
// 6. GridView
// 7. Stack
// 8. Positioned
// 9. AnimatedWidget
// 10. AnimatedBuilder

most powerful widget is...
1. Scaffold
2. AppBar
3. Drawer
4. BottomNavigationBar
5. FloatingActionButton
6. ListView
7. GridView
8. Stack
9. Positioned
10. AnimatedWidget
11. AnimatedBuilder

Dart important keywords are...
1. void
2. const
3. final
4. var
5. dynamic
6. static

//----------------------------------`

// If so many elements are there in a widget so we take Child as a parameter in the widget.. //children are taking list of widgets..

//----------------------------------

//gesture detector ... and inkwell difference -> gesture detector is used to detect gestures like tap, swipe, etc. and inkwell is used to detect inkwell gestures like tap, swipe, etc. width: 200, // in inkwell.. -> isme thoda sa effect dikhata hai ki aap daaba rahe ho rahe ho. isko hum dabaate hai splash effect.. dikhta hai ripple krte hue.. // Gesture detector is not giving any feedback to the user... koi aisha kuch nhi lagega ki aap daaba rahe ho rahe ho. bas tap hoga ur usko perform kr dega..
//----------------------------------

day7..../ ink and container.. -> both are working on the same way.. but ink is giving more effect than container..

// ----------------------------------

// BoxConstraints is a widget that provides a box constraints. //-- container ko constraints diye hai.. jo children koh follow krna hoga.. //-- Parents sets postions.. //-- Sizes go ups.. means that .. .. eg..

 body: Container(
        height: 400,
        width: 400,
        child: Container(
          height: 100,
          width: 100,
          color: Colors.red,
        ),
      ),

      here what's the sizes will be.. increasing according to the parent.. body wala conatiner kaa size nahi ki.. child wala container kaa size hoga.. ..

but in different senario..

body: Container(
        constraints: BoxConstraints(
          maxHeight: 200,
          minHeight: 70,
          maxWidth: 200,
          minWidth: 70,
        ),
        color: Colors.green,
        child: Container(
          height: 100,
          width: 100,
          color: Colors.red,
        ),
      ),

      Ab hum size set kr skte hai maximum height and minimum width size tak or minimum height and minimum width tak hi kr skte hai.. .. by using box constraints.. ..

// ---------------------------------- yeh jo widgets hote hai .. yeh immutable hote hai.. means ki hum usko change nahi kr skte.. . and in simple definition.. immutable means jo muttable nahi hai... and mutable means jo change kr skte hai.. . mutation mtlb change honaa... // ----------------------------------

We have three widgets tree..// How Does the Flutter Work.. Widget tree.. -> Element tree.. -> Render tree..

--//  FLUTTER EK  gaming engine ki tarah hai.. jisme sab kuch khud se draw krta hai.. ek like canvas par... Jo drawing kaa part hai nah wah.. widget tree se information jaatihai element tree ke paas.. element tree attach hoti hai Render tree ke sath.. ur jo drawing kaa kaa kaam hota hai wah hota hai Render tree ke paas.. -> hum likhte hai widget tree ur drawing krta hai Render tree .. par aishe kyuh hai .. Element tree kyuh hai.. So we discuss about ki widget are immutable.. par kya change ho skta hai element.. ur Render tree kaa kaam hi draw krna .. SO basically kyaa hota hai. ki  widget information pass krta hai.. Element tree ke paas phir element tree .. Render tree koh bolta hai ki humaare yeh information ise draw kr do.. widget tree toh change nhi ho skta hai.. par element tree kyaa karega ek apna homePage banaaega.. jab kuch change krna hoga toh ur element tree apne element koh bolega ki.. build method koh call karo.. ur usko bolo redraw krne ke liye.. ur jis particular widget koh change krna hai.. ur color change krna hai wah destroy ho jaaega aur dusra aa jaaega by the help of element tree .. and Render tree phir se draw kr dega..  //--
--// Jo build context hota hai wah location bananta hai.. aapki widget ki kyaa location us tree ke andar.. so basically jo loaction hai .. actually yehi context hai.. // jo context hai.. wahi aapiki location hai ur wahi element hai. element kuch nahi hai bas yehi context hai..     //--

--// flutter and reactNative... what are the difference between them.... //-- ReactNative is using Native widgets use krti hai jo operating system kaa part hai.. .. //-- flutter is using custom widgets use krti hai jo operating system kaa part nahi hai.. ..

//-------------------------------------------------------------------------------------------

Encoding means that.. in different format .. conversion into string.. ,like..
and I in Decoding means .. Conversion string into different Format.. { map means Key or value.. }

//---------------------------------------------------------------------- Center(child: CircularProgressIndicator(),) -> when we wanted to show reloader .. until the data load properly..

//-----------------------------------------------------------------------------------------------------------------

//-- SliverGridDeleGate => Means that whatever we scrolling.. from by the scene is is sliver are existing..

//--------------------------------------------------------------------------------

FittedBox -> means that the widget is fitting into the parent widget.. SizedBox -> means that the widget is giving the size to the widget..

//--------------------------------------------------------------------------------

//-- Demo of the flutter application.. alt text alt text alt text alt text alt text

//----------------------------------

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages