Building adaptive apps from Flutter docs
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
import Cocoa | |
import FlutterMacOS | |
import SwiftUI | |
// Relevant blog post: https://blog.whidev.com/menu-bar-extra-flutter-macos-app | |
struct Shortcut { | |
var combination: String | |
var description: String | |
var createdAt: Int |
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
STATE_ABBREVIATIONS = { | |
AB: "Alberta", | |
BC: "British Columbia", | |
MB: "Manitoba", | |
NB: "New Brunswick", | |
NL: "Newfoundland and Labrador", | |
NT: "Northwest Territories", | |
NS: "Nova Scotia", | |
NU: "Nunavut", | |
ON: "Ontario", |
Whenever the topic of Bitcoin's energy usage comes up, there's always a flood of hastily-constructed comments by people claiming that their favourite cryptocurrency isn't like Bitcoin, that their favourite cryptocurrency is energy-efficient and scalable and whatnot.
They're wrong, and are quite possibly trying to scam you. Let's look at why.
There are plenty of intricate and complex articles trying to convince you that cryptocurrencies are the future. They usually heavily use jargon and vague terms, make vague promises, and generally give you a sense that there must be something there, but you always come away from them more confused than you were before.
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
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
// Converts a hex, rgb, or rgba color string to Color object. Works with opacity values as well. | |
// e.g.: | |
// "#000" -> Color(0xff000000) | |
// "#cc3333" -> Color(0xffcc3333) | |
// "#cc3333dd" -> Color(0xddcc3333) | |
// "rgb(204, 44, 81)" -> Color(0xffcc2c51) | |
// "rgba(204, 44, 81, 0.20)" -> Color(0x33cc2c51) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.