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 RangeSliderExample extends StatefulWidget { | |
| @override | |
| _RangeSliderExampleState createState() => _RangeSliderExampleState(); | |
| } | |
| class _RangeSliderExampleState extends State<RangeSliderExample> { | |
| RangeValues _values = RangeValues(0, 10); | |
| @override | |
| Widget build(BuildContext context) { |
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 'dart:html'; | |
| class SelectableTextExample extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return SelectableText( | |
| 'Example Text', | |
| onTap: () { |
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'; | |
| class Example extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| void _handleHover(PointerEvent _) { | |
| print('hover on'); | |
| } | |
| void _handleHoverOff(PointerEvent _) { | |
| print('hover off'); |
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
| // $resource service being mocked | |
| 'use strict'; | |
| (function (angular) { | |
| angular | |
| .module('TestModule') | |
| .service('DataService', DataService); | |
| DataService.$inject = ['$resource']; |
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
| export default function repeatComplete() { | |
| 'ngInject'; | |
| function link(scope, element, attributes) { | |
| var completeExpression = attributes.repeatComplete; | |
| if (scope.$last) { | |
| scope.$evalAsync(completeExpression); | |
| } | |
| } |
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
| $black: #000; | |
| @mixin pseudo-class { | |
| &:hover, | |
| &:focus, | |
| &:active, | |
| &.active, | |
| &.selected { | |
| @content; | |
| } |
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
| <!-- This markup is typical of WordPress menus --> | |
| <nav class="nav"> | |
| <ul> | |
| <li><a href="">Link One</a> | |
| <ul class="children"> | |
| <li><a href="">Child 1</a></li> | |
| <li><a href="">Child 2</a></li> | |
| <li><a href="">Child 3</a></li> | |
| <li><a href="">Child 4</a></li> | |
| </ul> |
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
| .cover-wrapper { | |
| /* height gets set w/JS to allow for a bit of space below the banner no need to set width, it's always as wide as the page */ | |
| overflow: hidden; | |
| position: relative; | |
| } | |
| .cover-img { | |
| /* height and width are set w/JS but we use CSS to center */ | |
| left: 50%; | |
| position: absolute; |
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
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |
NewerOlder