Skip to content

Instantly share code, notes, and snippets.

View exavolt's full-sized avatar

Rezal exavolt

View GitHub Profile
@exavolt
exavolt / material_palette_generator.dart
Last active July 13, 2020 07:16
Generate a palette from an input color similar to the official tool found at https://material.io/inline-tools/color/
// source
// https://github.com/filipeglfw/material-palette-generator/blob/master/src/index.js
import 'dart:math' as math;
// Main API.
//
// generateMaterialPalette(RGBColor.fromInt(0xffe91e63)).map<Color>((c) => Color(c.toInt()));
//
List<RGBColor> generateMaterialPalette(RGBColor rgbColor) {
@exavolt
exavolt / README.md
Last active November 8, 2024 15:24
ChoiceChipBar

Choice Chip Bar for Flutter

While Flutter already provides ChoiceChip, it's a bare-bone component. We would need to wire them ourselves to create a group of choices. This widget, ChoiceChipBar, means to provide a self-contained widget for a group of choice chips, so the ancestor widget won't need to manage the state; just provide the choices and a callback to onChanged.

Screenshot_1594966144 copy

@exavolt
exavolt / Dockerfile
Last active February 26, 2025 04:13
Containerized Hugo (extended) with VSCode devcontainer
FROM golang:1.13-alpine
# VARIANT can be either 'hugo' for the standard version or 'hugo_extended' for the extended version.
ARG VARIANT=hugo_extended
# VERSION can be either 'latest' or a specific version number
ARG VERSION=latest
RUN apk add --update --no-cache ca-certificates openssl git curl && \
case ${VERSION} in \
latest) \
@exavolt
exavolt / modularizing-your-apps.md
Last active December 18, 2023 04:32
Modularizing your apps

Modularizing your apps

Why do we want modularize our apps? Jump to the last section of this article for the rationale.

Imagine we have a two app projects. One of them is a task management app (tasker) while the other is a chat app (messenger).

We have this for the tasker app:

.
├── models