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 'package:flutter/material.dart'; | |
/// [ExpandableBottomSheet] is a BottomSheet with a draggable height like the | |
/// Google Maps App on Android. | |
/// | |
/// __Example:__ | |
/// | |
/// ```dart | |
/// ExpandableBottomSheet( | |
/// background: Container( |
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 'package:collection/collection.dart'; | |
import 'package:meta/meta.dart'; | |
const DeepCollectionEquality _equality = DeepCollectionEquality(); | |
@immutable | |
abstract class Equatable { | |
const Equatable(); | |
List<Object?> get props; |
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 'package:equatable/equatable.dart'; | |
import 'package:meta/meta.dart'; | |
sealed class BaseState<T> extends Equatable { | |
bool get isInitial; | |
bool get isLoading; | |
bool get isSuccessful; | |
bool get hasFailed; | |
T? get data; | |
Exception? get exception; |
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
#!/usr/bin/env bash | |
set -euo pipefail | |
readonly FLUTTER_VERSION="3.19.0" | |
readonly URL="https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_${FLUTTER_VERSION}-stable.zip" | |
readonly DIRECTORY="${HOME}/flutter" | |
# Function to download and extract flutter | |
download_flutter() { | |
local temp_file |
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
#!/bin/bash | |
# Set Locale | |
echo "Setting Locale..." | |
sudo apt update && sudo apt install locales | |
sudo locale-gen en_US en_US.UTF-8 | |
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
# Setup Sources |
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
// Source: https://github.com/thedaviddelta/scope-extensions-js | |
declare global { | |
interface Object { | |
/** | |
* Calls the specified function block with `this` value as its argument and returns its result | |
* @param block - The function to be executed with `this` as argument | |
* @returns `block`'s result | |
*/ | |
let<T, R>(this: T | null | undefined, block: (it: T) => R): R; | |
/** |
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
#!/usr/bin/env bash | |
GREEN="\033[0;32m" | |
BLUE="\033[0;34m" | |
CLEAR="\033[0m" | |
echo -e "${GREEN}Listing global NPM packages...${CLEAR}" | |
npm list -g --depth=0 | |
echo -e "${GREEN}...updating & upgrading global NPM packages...${CLEAR}" | |
sudo npx npm-check --global --update-all |