Skip to content

Instantly share code, notes, and snippets.

View talamaska's full-sized avatar

Zlati Pehlivanov talamaska

View GitHub Profile
import 'package:flutter/material.dart';
class CustomBarItem {
const CustomBarItem({
this.icon,
this.title,
});
final Icon icon;
final String title;
@talamaska
talamaska / app.component.ts
Created May 24, 2020 18:30 — forked from ElisePatrikainen/app.component.ts
Simple form with focus and keyboard interaction
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>
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>
@talamaska
talamaska / main.dart
Created April 7, 2020 20:35 — forked from joramkimata/main.dart
Draggable Scrollbar App
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();
}
@talamaska
talamaska / main.dart
Created February 21, 2020 10:45 — forked from av/main.dart
Flutter: neu
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(
@talamaska
talamaska / transitions_fun.dart
Created January 8, 2020 22:44 — forked from slightfoot/transitions_fun.dart
Fun with Route Animations - by Simon Lightfoot - #HumpDayQandA - 8th Janurary 2020
// 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:
@talamaska
talamaska / main.dart
Created December 18, 2019 13:55 — forked from MarcinusX/main.dart
Ripple effect transition
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',
@talamaska
talamaska / Constructors_in_Dart.dart
Last active November 27, 2019 13:04
Constructors in Dart
class Robot {
Robot();
}
// or if no arguments
class Robot {
}
// normal instanciation
@talamaska
talamaska / streamprovider_example.dart
Created November 21, 2019 11:21 — forked from jtlapp/streamprovider_example.dart
StreamProvider example
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';
import { Injectable } from '@angular/core';
import {
ActivatedRouteSnapshot,
CanActivate,
Router,
RouterStateSnapshot,
} from '@angular/router';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';