#!/bin/bash
# Paths to the pub cache directories
PUB_CACHE_HOSTED_DIRS=("$HOME/.pub-cache/hosted/pub.dev" "$HOME/.pub-cache/hosted/pub.dartlang.org")
PUB_CACHE_HASHES_DIR="$HOME/.pub-cache/hosted-hashes/pub.dev"
PUB_CACHE_GIT_DIR="$HOME/.pub-cache/git"
# Function to clean old versions from a given directory
clean_old_versions() {
๐
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 'package:flutter/material.dart'; | |
import 'package:cached_network_image/cached_network_image.dart'; | |
import 'package:screenshot/screenshot.dart'; | |
import 'dart:io'; | |
import 'dart:async'; | |
import 'package:path_provider/path_provider.dart'; | |
class ImageObject { | |
final String text; | |
final String imageUrl; |
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
class PaystackSetup { | |
private readonly decimalFee: number = 0.015; // 1.5% | |
private readonly feeCap: number = 2000; // Maximum fee per transaction | |
private readonly flatFee: number = 100; // Flat fee applied for transactions >= NGN 2,500 | |
/// Calculates the total price to be charged to the customer, including transaction fees. | |
calculateTotalPrice(price: number): number { | |
if (price < 2500) { | |
return this.calculateBelow2500(price); | |
} |
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
{ | |
"What's your full name?": "Samuel Abada", | |
"Select your sub-team?": "Developer", | |
"YouTube Song": "https://music.youtube.com/watch?v=sjcgg9fSf1o", | |
"What words do you live by? (Give us a quote)": "Surviving is winning. Everything else is bullshit fairy tale.", | |
"Fun Fact": "I blow bubbles and fight crime", | |
"Please share a link to your headshot.": "https://i.ibb.co/C88CpDX/DSC09758.jpg", | |
"LinkedIn Profile URL": "https://www.linkedin.com/in/abada-samuel/", | |
"Instagram Profile URL": "https://www.instagram.com/codefarmer_/", | |
"Twitter Profile URL": "https://x.com/mastersam_", |
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
#!/bin/bash | |
# Function to find the DSYM file | |
find_dsym() { | |
find "$CI_DERIVED_DATA_PATH" -name "*.dSYM" | head -1 | |
} | |
# Function to determine the current flavor | |
get_flavor() { | |
if [[ "$CI_WORKFLOW_NAME" == *"Development"* ]]; then |
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 'package:cave/cave.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:widgetbook/widgetbook.dart'; | |
import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; | |
import 'main.directories.g.dart'; | |
void main() { | |
runApp(const WidgetbookApp()); | |
} |
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
/// A [RestorableProperty] that knows how to store and restore a | |
/// [TabController]. | |
/// | |
/// The [TabController] is accessible via the [value] getter. During | |
/// state restoration, the property will restore [TabController.index] | |
/// to the value it had when the restoration data it is getting restored from | |
/// was collected. | |
class RestorableTabController extends RestorableChangeNotifier<TabController> { | |
/// Creates a [RestorableTabController] to control the tab index of | |
/// [TabBar]. |
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
#!/bin/bash | |
# Directories to exclude | |
EXCLUDE_DIRS=( | |
"/System" | |
"/Library" | |
"/Applications" | |
"/Volumes" | |
"/opt/homebrew" | |
"/opt/homebrew/bin/fvm" |
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 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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 'package:flutter/material.dart'; | |
GlobalKey<_CounterWidgetState> counterKey = GlobalKey<_CounterWidgetState>(); | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
NewerOlder