Skip to content

Instantly share code, notes, and snippets.

View deven98's full-sized avatar
:octocat:
Fluttering away the hours

Deven Joshi deven98

:octocat:
Fluttering away the hours
View GitHub Profile
print("Hello World!")
@deven98
deven98 / HelloWorld.java
Last active April 23, 2018 08:15
HelloWorld Java
class Main{
public static void main(String... args) {
System.out.println("Hello World!");
}
}
//Notice no access specifier (public, private) or static keyword
main() {
//Top-level function
print('Hello World');
}
class DemoClass {
//public function
void printSomething(){
print('Something');
}
class Box {
private int length, width, height;
public Box(int length, int height, int width) {
this.length = length;
this.height = height;
this.width = width;
class Box {
int _length, _width, _height;
Box(this._length, this._width, this._height);
}
class Point {
num x, y;
Point(this.x, this.y);
// Named constructor
Point.origin() {
x = 0;
y = 0;
main() {
Box box1 = new Box();
box1?.destroy();
}
//This is equivalent to
main() {
var number = 5;
var demoString = "The number is $number";
}
@deven98
deven98 / MediumAppStep1.dart
Created July 13, 2018 04:40
Medium App Design with AppBar complete.
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Home',
theme: new ThemeData(