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
.
This file contains hidden or 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
// 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) { |
This file contains hidden or 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
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) \ |
OlderNewer