This file contains hidden or 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
// MIT License | |
// | |
// Copyright (c) 2019 Simon Lightfoot | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
This file contains hidden or 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 'package:rect_getter/rect_getter.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Fab overlay transition', |
This file contains hidden or 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
class Robot { | |
Robot(); | |
} | |
// or if no arguments | |
class Robot { | |
} | |
// normal instanciation |
This file contains hidden or 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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:provider/provider.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
const appTitle = 'StreamProvider Demo'; |
This file contains hidden or 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 { Injectable } from '@angular/core'; | |
import { | |
ActivatedRouteSnapshot, | |
CanActivate, | |
Router, | |
RouterStateSnapshot, | |
} from '@angular/router'; | |
import { Observable } from 'rxjs'; | |
import { map } from 'rxjs/operators'; |
This file contains hidden or 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
# Get the latest from GitHub, public repo: | |
$ npm install username/my-new-project --save-dev | |
# GitHub, private repo: | |
$ npm install git+https://token:[email protected]/username/my-new-project.git#master | |
$ npm install git+ssh://[email protected]/username/my-new-project.git#master | |
# … or from Bitbucket, public repo: | |
$ npm install git+ssh://[email protected]/username/my-new-project.git#master --save-dev | |
# Bitbucket, private repo: | |
$ npm install git+https://username:[email protected]/username/my-new-project.git#master |
This file contains hidden or 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
<h1>Angular 2 Recursive List</h1> | |
<ul> | |
<ng-template #recursiveList let-list> | |
<li *ngFor="let item of list"> | |
{{item.title}} | |
<ul *ngIf="item.children.length > 0"> | |
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container> | |
</ul> | |
</li> | |
</ng-template> |
This file contains hidden or 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 { Component, OnInit, ViewChild, Input } from '@angular/core'; | |
import { MatPaginator, MatSort } from '@angular/material'; | |
import { NgxDataTableDataSource } from './ngx-data-table-datasource'; | |
@Component({ | |
selector: 'ngx-data-table', | |
templateUrl: './ngx-data-table.component.html', | |
styleUrls: ['./ngx-data-table.component.css'] | |
}) | |
export class NgxDataTableComponent { |
This file contains hidden or 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 { DataSource } from '@angular/cdk/collections'; | |
import { MatPaginator, MatSort } from '@angular/material'; | |
import { map } from 'rxjs/operators'; | |
import { Observable, of as observableOf, merge } from 'rxjs'; | |
/** | |
* Data source for the NgxDataTable view. This class should | |
* encapsulate all logic for fetching and manipulating the displayed data | |
* (including sorting, pagination, and filtering). |
This file contains hidden or 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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
// See: https://twitter.com/shakil807/status/1042127387515858949 | |
// https://github.com/pchmn/MaterialChipsInput/tree/master/library/src/main/java/com/pchmn/materialchips | |
// https://github.com/BelooS/ChipsLayoutManager | |
void main() => runApp(ChipsDemoApp()); |