//void returns nothing
//main() is the first method that dart will look for
void main() {
String greet = "Welcome";
print(greet);
String name = "Flutter Basics";
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(const HorizonsApp()); | |
} | |
class HorizonsApp extends StatelessWidget { | |
const HorizonsApp({super.key}); | |
// This widget is the root of your application. |
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(const SignUpApp()); | |
class SignUpApp extends StatelessWidget { | |
const SignUpApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
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
// Classes are blueprint for an object | |
// user object describried by using properties and methods | |
void main() { | |
// instantiaing a class with the User object | |
print("******************************"); | |
print("To avoid hard codes values inside the class, created a constructor class."); | |
print("Constructor is a spl class"); | |
print("******************************"); | |
print(''); | |
User userOne = User('Andy',30); |
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
// Classes are blueprint for an object | |
// user object describried by using properties and methods | |
void main() { | |
// instantiaing a class with the User object | |
User userOne = User(); | |
print(userOne.username); | |
print(userOne.age); | |
userOne.login(); | |
print("------------------------------------------"); | |
print("Will create the same user with the name for userTwo"); |
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
// Lists are like arrays in JS | |
// void main() { | |
// List names = ['Deepa', 'Andy', 'Stacy']; | |
// names.add('Raj'); | |
// names.remove('Stacy'); | |
// names.add(576); | |
// print(names); |
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
//void returns nothing | |
//main() is the first method that dart will look for | |
void main() { | |
String greet = greetings(); | |
int age = getAge(); | |
print(greet); | |
print(age); |
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
1) justify-content: flex-end; | |
2) justify-content: center; | |
3) justify-content: space-around; | |
4) justify-content: space-between; | |
5) align-items: flex-end; | |
6) align-items: center; | |
justify-content: center; | |
7) justify-content: space-around; | |
8) flex-direction: row-reverse; | |
9) flex-direction: column; |