Skip to content

Instantly share code, notes, and snippets.

View narenarjun's full-sized avatar

narenarjun

View GitHub Profile
@narenarjun
narenarjun / scopes.dart
Created February 19, 2020 14:17
dart iterators , scopes and functional programming
import 'dart:math' as Math;
void main() {
// List<int> x = [1,2,3,4];
var numbers = Iterable.generate(10000, (i) => i);
print(numbers.reduce(Math.min));
print(numbers.reduce(Math.max));
@narenarjun
narenarjun / classes-2.dart
Created February 19, 2020 07:15
explains about abstract classes,interfaces, mixins and castings in dart
import 'dart:math';
void main() {
A c = C("tokyo");
c.hello();
(c as B).goodBye();
(c as C).hi();
(c as C).printStamp();
}
@narenarjun
narenarjun / classes.dart
Created February 18, 2020 14:26
explains about dart classes - methods, final,static and basic inheritance
void main() {
var n1 = Complex(3, -2);
var n2 = Complex(1, 4);
print(n1 + n2);
print(n1.multiply(n2));
print(Complex.substract(n1, n2));
print(Complex.counter);
print(Quaternion(1,-2,-3));
}
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}