Skip to content

Instantly share code, notes, and snippets.

View orestesgaolin's full-sized avatar
🍪
hello worlds

Dominik Roszkowski orestesgaolin

🍪
hello worlds
View GitHub Profile
@orestesgaolin
orestesgaolin / main.dart
Last active April 21, 2020 07:55
Animated Icon in Flutter
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Animated Icon',

In your console

key=$( base64 ./key.json )

echo $key

On codemagic:

  1. Add new env variable KEY eqaul to above
  2. Add new env variable KEY_PATH e.g. ./lib/key.json
// 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 'dart:math' as math;
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
final time1 = DateTime.now();
for (int i = 0; i < 1000000; i++) {
final order = (log(69123.65) / log(10) + 1).floor();
final val = (69123.56 - 215.34) / pow(10, (order - 3));
final fin = val.round();
}
final time1end = DateTime.now();
print(time1end.difference(time1));
void main() {
DateTime currentDate = DateTime.now();
DateTime date = currentDate.add(Duration(days: -13));
print(date);
DateTime date1 = currentDate.add(Duration(days: -14));
print(date1);
print(date.difference(date1));
}
{
// Place your snippets for dart here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@orestesgaolin
orestesgaolin / tasks.json
Last active February 18, 2020 21:58
Custom shell task in VS Code
{
"version": "2.0.0",
"tasks": [
{
"label": "Download translations from Localizely",
"type": "shell",
"command": "./scripts/localizely.sh",
"problemMatcher": []
}
]
@orestesgaolin
orestesgaolin / always_scrollbar.dart
Created January 17, 2020 23:13 — forked from slightfoot/always_scrollbar.dart
Always Visible Scrollbar for Flutter - 4th March 2019
import 'package:flutter/gestures.dart' show DragStartBehavior;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
primaryColor: Colors.indigo,
@orestesgaolin
orestesgaolin / .zshrc
Created December 5, 2019 08:02
.zshrc for fvm version in prompt
# place it somewhere in your .zshrc file e.g. just after setting the theme
# this is how I set powerlevel9k theme
# source /usr/local/opt/powerlevel9k/powerlevel9k.zsh-theme
# ZSH_THEME="powerlevel9k/powerlevel9k"
prompt_flutter() {
local flutter_version
flutter_version=$(command fvm flutter --version 2>/dev/null)
# Remove "Flutter " (including the whitespace) from the beginning
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',