#!/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 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 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 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 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 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}); |
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'; | |
typedef FutureGenerator<T> = Future<T> Function(); | |
class FutureController<T> { | |
Future<T>? _future; | |
VoidCallback? _onUpdate; | |
final FutureGenerator<T>? _futureGenerator; | |
FutureController({FutureGenerator<T>? futureGenerator}) |
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
// Copyright 2015 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
import 'dart:async'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/widgets.dart'; |
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
name: CI | |
on: | |
push: | |
branches: [master, staging] | |
paths: | |
- 'lib/**' | |
- 'pubspec.yaml' | |
- '.github/**' | |
- 'android/**' |
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
name: Automated Responses | |
on: | |
issues: | |
types: [opened] | |
pull_request: | |
types: [opened] | |
jobs: | |
respond: |
NewerOlder