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'; | |
import 'dart:math'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
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
//This is a single line comment | |
/* | |
* This is a multiline comment | |
* and can span more than one | |
* line | |
*/ | |
//Variables |
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'; | |
//Variables | |
const double pi = 3.14; | |
void main() { | |
showPerimeter();//calling method with no parameters | |
showPerimeterWithRadius(80);//calling method with parameter | |
double result = perimeter(); |
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
void main() { | |
int score1 = 36; | |
int score2 = 85; | |
int score3 = 66; | |
int score4 = 73; | |
int total = score1 + score2 + score3 + score4; | |
var average = total / 4; | |
print("the average score is: $average"); | |
//control statement |
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
void main() { | |
//new instance of class | |
MyNewClass myNewClass = new MyNewClass(); | |
var anotherInstance = new MyNewClass(); | |
print(myNewClass.runtimeType); | |
anotherInstance.sayHello(); | |
Rectangle rectangle1 = new Rectangle(20, 30); | |
print(rectangle1.runtimeType); | |
print(rectangle1.perimeter()); |
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() { | |
//new instance of class | |
MyNewClass myNewClass = new MyNewClass(); | |
var anotherInstance = new MyNewClass(); | |
print(myNewClass.runtimeType); | |
anotherInstance.sayHello(); | |
Shape rectangle1 = new Rectangle(20, 30); |
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() { | |
//new instance of class | |
MyNewClass myNewClass = new MyNewClass(); | |
var anotherInstance = new MyNewClass(); | |
print(myNewClass.runtimeType); | |
anotherInstance.sayHello(); | |
Shape rectangle1 = new Rectangle(20, 30); |
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() { | |
//new instance of class | |
MyNewClass myNewClass = new MyNewClass(); | |
var anotherInstance = new MyNewClass(); | |
print(myNewClass.runtimeType); | |
anotherInstance.sayHello(); | |
Shape rectangle1 = new Rectangle(20, 30); |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
OlderNewer