Skip to content

Instantly share code, notes, and snippets.

View pietervp's full-sized avatar

Pieter Van Parys pietervp

View GitHub Profile
@pietervp
pietervp / animation_example.dart
Created July 11, 2022 09:53
Example Animation
import 'package:flutter/material.dart';
import 'dart:math';
import 'package:flutter/foundation.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/widgets.dart';
const double animationDurationInSeconds = 5.0;
void main() => runApp(ExampleFunvasWidget());
@pietervp
pietervp / sample.dart
Created July 6, 2022 06:46
Sample code
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@pietervp
pietervp / main.dart
Created January 29, 2022 10:01
flutter/issues/97454
import 'package:flutter/material.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({Key? key}) : super(key: key);
static const String _title = 'Flutter Code Sample';
@pietervp
pietervp / transformations.dart
Last active December 21, 2021 14:05
Example of basic transformations in Dart / Flutter
import 'dart:ui';
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
@pietervp
pietervp / main.dart
Last active November 24, 2021 13:01
// 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';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
// ==UserScript==
// @name TML UserScript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description
// @author Pieter Van Parys
// @match http://tickets.tomorrowland.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
public class ActivatableLogic : LogicBase<IActivatableEntity>, IActivatableEntityLogic
{
public void Active()
{
CurrentInstance.IsActive = true;
}
public void DeActivate()
{
CurrentInstance.IsActive = false;
public class ActivatableLogic : LogicBase<IActivatableEntity>
{
public void Active()
{
CurrentInstance.IsActive = true;
}
public void DeActivate()
{
CurrentInstance.IsActive = false;
public interface IConcreteEntityA : IActivatableEntity
{
//...
}
public interface IConcreteEntityB : IActivatableEntity, IAuditEntity //not possible!!!
{
//...
}
public class ConcreteEntityA : ActivatableEntity
{
//...
}
public class ConcreteEntityB : ActivatableEntity, AuditEntity //not possible!!!
{
//...
}