Repositório contendo os materiais que eu utilizei na palestra.
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
linter: | |
rules: | |
- always_declare_return_types | |
- always_put_control_body_on_new_line | |
- always_put_required_named_parameters_first | |
- always_require_non_null_named_parameters | |
- always_specify_types | |
- annotate_overrides | |
- avoid_annotating_with_dynamic | |
- avoid_as |
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
include: all_lint_rules.yaml | |
analyzer: | |
exclude: | |
- "**/*.g.dart" | |
- "**/*.freezed.dart" | |
# This is generated from the i18n vscode extension | |
- "**/i18n.dart" | |
strong-mode: | |
implicit-casts: false | |
implicit-dynamic: false |
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
/// Finds unused dependencies from pubspec.yaml | |
/// | |
/// Achieves this by parsing pubspec.yaml and recursively | |
/// searching the lib folder for an import statement that | |
/// contains the name of each package. Prints out the results. | |
const fs = require("fs"); | |
const YAML = require("yaml"); | |
const { execSync } = require("child_process"); | |
/// Read pubspec.yaml |
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
enum MyEnum { | |
simple, | |
special, | |
complex, | |
} | |
extension MyEnumUtils on MyEnum { | |
String get description { | |
switch (this) { | |
case MyEnum.simple: |
#dart:core example
How to get a timestamp in Dart.
Main library: dart:core
Main element: DateTime.now
Gist: https://gist.github.com/kasperpeulen/c54b5925019b62843ef9
DartPad: https://dartpad.dartlang.org/c54b5925019b62843ef9
Tags: #datetime #timestamp
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
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
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
/// This interceptor is simplified because is doesn't contemplate | |
/// a refresh token, which you should take care of. | |
/// I haven't tested this code, but I believe it should work. | |
/// If you have some feedback, please leave a comment and I'll review it :) Thanks. | |
class AuthInterceptor extends InterceptorsWrapper { | |
final Dio loggedDio; | |
final Dio tokenDio; |
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
SPC | |
SPC: find file | |
, switch buffer | |
. browse files | |
: MX | |
; EX | |
< switch buffer | |
` eval | |
u universal arg | |
x pop up scratch |
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
### ------------------------- Flutter.gitignore ------------------------ ### | |
# Miscellaneous | |
*.class | |
*.lock | |
*.log | |
*.pyc | |
*.swp | |
.DS_Store | |
.atom/ |