- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or foldersinany application - Add a
Run Shell Scriptaction- your default shell should already be selected, otherwise use
/bin/zshfor macOS 10.15 (”Catalina”) or later - older versions of macOS use
/bin/bash
- your default shell should already be selected, otherwise use
- if you're using something else, you probably know what to do 😉
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:convert'; | |
| import 'package:flutter_secure_storage/flutter_secure_storage.dart'; | |
| import 'package:flutter_test/flutter_test.dart'; | |
| import 'package:mocktail/mocktail.dart'; | |
| import 'package:scoreboard/app/infra/services/local_storage.dart'; | |
| import 'package:scoreboard/app/infra/services/secure_storage_service.dart'; | |
| class _MockFlutterSecureStorage extends Mock implements FlutterSecureStorage {} |
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'; | |
| class GamePage extends StatefulWidget { | |
| const GamePage({Key? key}) : super(key: key); | |
| @override | |
| State<GamePage> createState() => _GamePageState(); | |
| } | |
| class _GamePageState extends State<GamePage> { |
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
| /// Auxiliary method for isar initialization | |
| /// Must be called in setUp method, so the execution can occur before EVERY test | |
| Future<void> initIsar(IsarService isar) async { | |
| TestWidgetsFlutterBinding.ensureInitialized(); | |
| await Isar.initializeIsarCore(download: false); | |
| TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler( | |
| const MethodChannel('plugins.flutter.io/path_provider'), | |
| (MethodCall methodCall) async { | |
| return ""; | |
| }, |
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
| { | |
| "dart.flutterSdkPath": ".fvm/flutter_sdk", | |
| "search.exclude": { | |
| "**/.fvm": true | |
| }, | |
| "files.watcherExclude": { | |
| "**/.fvm": true | |
| }, | |
| "dart.lineLength": 100, | |
| "[dart]": { |
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/sh | |
| if grep -qE "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([[:alnum:]._-]+\))?(!)?: ([[:alnum:]])+([[:space:][:print:]]*)" "$1"; then | |
| echo "✅ This commit follows the Conventional Commits pattern" | |
| else | |
| echo "❌ Commit aborted. Your commit message doesn't follow the Conventional Commits pattern!" | |
| exit 1 | |
| fi |
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:math"; | |
| void main() { | |
| final vector = [1,2,5,3,4,2,5,2,2,5,6,2,2,2,2]; | |
| print("Pesquisa:"); | |
| print("Tamanho do vetor: ${vector.length}"); | |
| print("Tamanho onde 2: ${vector.where((e) => e == 2).length}"); | |
| int trueCount = 0; | |
| int falseCount = 0; |
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
| "$schema" = 'https://starship.rs/config-schema.json' | |
| add_newline = true | |
| palette = "colors" | |
| format = """ | |
| [╭─](bold white)$username\ | |
| $hostname\ | |
| $directory\ | |
| $git_branch\ | |
| $git_commit\ |
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:convert'; | |
| import 'package:flutter_secure_storage/flutter_secure_storage.dart'; | |
| import 'package:flutter_test/flutter_test.dart'; | |
| import 'package:mockito/annotations.dart'; | |
| import 'package:mockito/mockito.dart'; | |
| import './secure_storage_service_test.mocks.dart'; |
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:convert'; | |
| import 'package:flutter_secure_storage/flutter_secure_storage.dart'; | |
| import 'local_storage.dart'; | |
| class SecureStorageService implements LocalStorage { | |
| final FlutterSecureStorage _storage; | |
| SecureStorageService(this._storage); |
NewerOlder