Skip to content

Instantly share code, notes, and snippets.

Avatar

Zlati Pehlivanov talamaska

  • Bulgaria
View GitHub Profile
@talamaska
talamaska / text_gradient.dart
Last active Nov 24, 2020
text with gradient
View text_gradient.dart
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,
@talamaska
talamaska / Flutter Vikings Logo Contest
Created Nov 18, 2020
Flutter Vikings Logo Contest
View Flutter Vikings Logo Contest
// 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 {
View navigator_scroll_fade_demo.dart
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
class Destination {
const Destination(this.index, this.title, this.icon, this.color);
final int index;
final String title;
final IconData icon;
final MaterialColor color;
}
@talamaska
talamaska / gist:f537d2fcfcab249efc2dd3893d310a97
Created Nov 11, 2020 — forked from wshaddix/gist:8797934
Gets the week number for a given date
View gist:f537d2fcfcab249efc2dd3893d310a97
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;
View custom bottom bar
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 — forked from ElisePatrikainen/app.component.ts
Simple form with focus and keyboard interaction
View app.component.ts
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>
View webview_ample.dart
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 Apr 7, 2020 — forked from izwebhub/main.dart
Draggable Scrollbar App
View main.dart
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 Feb 21, 2020 — forked from av/main.dart
Flutter: neu
View main.dart
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 Jan 8, 2020 — forked from slightfoot/transitions_fun.dart
Fun with Route Animations - by Simon Lightfoot - #HumpDayQandA - 8th Janurary 2020
View transitions_fun.dart
// 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:
You can’t perform that action at this time.