UNIT 2: FLUTTER Flashcards
- compiled, statically typed, object oriented, procedural programming language
- very mainstream structure much like other OO languages, making it easy to pick up folks who have experience with Java, C++, C#
- add some features that developers in those other languages would not expect but are very cool nonetheless
Dart
can store any data type; data type can change anytime
dynamic
data type is inferred from the value on the right side “=”
var
variable once set, cannot be reassigned
final
value set at compile time, not run time
const
variables are initialized to null
- int x
- double y
- bool z
- string s
- dynamic d
the process of inserting variable values into placeholders in a string literal. To concatenate strings in Dart, we can utilize string interpolation. We use the ${} symbol to implement string interpolation in your code.
String interpolation $
multiline strings
create using “””
spread elements into the array
spread operator …
they can be passed down like data, returned from a function, passed into a function as a parameter or set to equal a variable
functions are first-class objects
function that returns a value in one line of code
Big arrow
=>
sendEmail(‘ceo@blue.company’,’Pop’);
to
sendEmail(subject:’Pop’, atAddress: ‘ceo@blue.company’);
named function parameters
Person p = Person();
ommit “new” and “this”
shorter way of dart classess which rceive paramaters
class constructor parameter firsthand
all members of dart are what in default
public