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 'dart:typed_data'; | |
import 'dart:ui' as ui; | |
import 'package:flutter/material.dart'; | |
void main() async => runApp(MaterialApp(home: Root())); | |
/// Waits till [ui.Image] is generated and renders | |
/// it using [CustomPaint] to render it. Allows use of [MediaQuery] | |
class Root extends StatelessWidget { |
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
final colors = [ | |
Color(0xffff0000), Color(0xffffff00), Color(0xff00ff00), | |
Color(0xff00ffff), Color(0xff0000ff), Color(0xffff00ff), Color(0xffff0000), | |
]; | |
final colorStops = [0 / 6, 1 / 6, 2 / 6, 3 / 6, 4 / 6, 5 / 6, 6 / 6]; | |
final gradient = new ui.Gradient.linear( | |
Offset(0.0, 0.0), | |
Offset(0.0, size.height), | |
colors, | |
colorStops, |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
import 'dart:ui' as ui; | |
void main() => runApp(FlutterVikingsLogoApp()); | |
class FlutterVikingsLogoApp extends StatelessWidget { |
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
main () { | |
// get today's date | |
var now = new DateTime.now(); | |
// set it to feb 10th for testing | |
//now = now.add(new Duration(days:7)); | |
int today = now.weekday; |
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 CustomBarItem { | |
const CustomBarItem({ | |
this.icon, | |
this.title, | |
}); | |
final Icon icon; | |
final String title; |
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, ViewChild, ViewChildren, ElementRef, QueryList, HostListener, AfterViewInit } from '@angular/core'; | |
import { FocusTrapFactory, FocusMonitor, ListKeyManager} from '@angular/cdk/a11y' | |
@Component({ | |
selector: 'app-root', | |
template: ` | |
<button (click)="testA11y()"> Test A11y! </button> | |
<div #element role="dialog" hidden=true> | |
<label>Sample field</label> | |
<input #elementChild> |
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 'dart:convert'; | |
import 'package:flutter/material.dart'; | |
import 'package:webview_flutter/webview_flutter.dart'; | |
void main() => runApp(MaterialApp(home: WebViewExample())); | |
const String kNavigationExamplePage = ''' | |
<!DOCTYPE html><html> | |
<head><title>Navigation Delegate Example</title></head> |
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:draggable_scrollbar/draggable_scrollbar.dart'; | |
import 'package:flutter/material.dart'; | |
main() => runApp(MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() { | |
return _MyApp(); | |
} |
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'; | |
void main() => runApp(NeumorphicApp()); | |
class NeumorphicApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Neumorphic App', | |
theme: ThemeData( |