This file contains 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:developer'; | |
import 'dart:ui' as ui; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/services.dart'; | |
import '../../components/organisms/app_shell.dart'; |
This file contains 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
class OnPlatformVariant extends ContextVariant { | |
final TargetPlatform platform; | |
const OnPlatformVariant(this.platform); | |
@override | |
bool when(BuildContext context) { | |
return defaultTargetPlatform == platform; | |
} |
This file contains 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 isEqual from 'lodash/isEqual'; | |
/** | |
* Listener function type, called when an event has occurred. | |
*/ | |
export interface Listener<T = unknown> { | |
(event: T): void; | |
} | |
/** |
This file contains 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
// Just add class "particle-js" to the elements you would like to load particles.js on. No need to pass each individual ID | |
window.onload = startParticles; | |
window.onresize = startParticles; | |
function startParticles() { | |
var particleEls = document.getElementsByClassName("particles-js"); | |
if (particleEls) { | |
Object.keys(particleEls).forEach(function(key) { |