Skip to content

Instantly share code, notes, and snippets.

const stylelint = require('stylelint');
const valueParser = require('postcss-value-parser');
const ruleName = 'plugin/valid-css-var';
const messages = stylelint.utils.ruleMessages(ruleName, {
expected: (variable) => `Expected "${variable}" to be a valid CSS variable`,
});
module.exports = stylelint.createPlugin(ruleName, (primaryOption, secondaryOptions, context) => {
return (root, result) => {
@willsmanley
willsmanley / widget.dart
Last active June 22, 2024 17:43
Flutter Retell
import 'dart:typed_data';
import 'package:record/record.dart';
import 'package:flutter/material.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
import 'package:http/http.dart' as http;
import 'dart:async';
import 'package:mp_audio_stream/mp_audio_stream.dart';
var apiToken = 'ADD API TOKEN HERE';
@willsmanley
willsmanley / retell_service.dart
Created July 9, 2024 20:30
Retell Flutter Service
import 'package:livekit_client/livekit_client.dart' as livekit;
import 'package:permission_handler/permission_handler.dart';
import 'dart:async';
class RetellService {
livekit.Room? _room;
bool _connected = false;
final StreamController<String> _eventStreamController =
StreamController<String>.broadcast();