Skip to content

Instantly share code, notes, and snippets.

View mhadaily's full-sized avatar
🎯
Let's Flutter

Majid Hajian mhadaily

🎯
Let's Flutter
View GitHub Profile
@mhadaily
mhadaily / queue-in-dart.md
Last active August 10, 2020 07:02
What is Queue and Implementing Queue in Dart

A queue implements FIFO (first-in first-out) ordering.

It uses the operations:

  • add(item): Add an item to the end of the list
  • remove(): Remove the first item in the list
  • peek(): Return the top of the queue
  • isEmpty(): Return true if and on if the queue is empty

There are several places that we can use Queue but it may appear in Cache or Breadth-first search the most.

@mhadaily
mhadaily / flutter_webview_oatuh2_screen.dart
Last active April 16, 2020 20:27
Flutter OAuth Web View and parse code from Callback in Flutter widget
// THIS IS JUST AN EXAMPLE AND POSSIBLY ONE SOLUTUON
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
class OauthWebCallBackFlutter extends StatefulWidget {
const OauthWebCallBackFlutter(this.appID);
@mhadaily
mhadaily / keybase.md
Created June 15, 2018 12:27
keybase.md

Keybase proof

I hereby claim:

  • I am mhadaily on github.
  • I am mhadaily (https://keybase.io/mhadaily) on keybase.
  • I have a public key ASD0K2fLxLItjc3LJq1DzZo63zt_flTllNKX4xOed3uFzwo

To claim this, I am signing this object:

@mhadaily
mhadaily / components.parent-component.child-component.js
Last active March 22, 2017 15:56
BUG in Ember nested component - EMBER 2.10.0-beta.2
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
})