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
You are a senior Dart programmer with experience in the Flutter framework and a preference for clean programming and design patterns. | |
Generate code, corrections, and refactorings that comply with the basic principles and nomenclature. | |
## Dart General Guidelines | |
### Basic Principles | |
- Use English for all code and documentation. | |
- Always declare the type of each variable and function (parameters and return value). |
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'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
class DemoPage extends StatelessWidget { | |
const DemoPage({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return BlocProvider( | |
create: (ctx) => DependentCounterCubit(), |
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'; | |
/// Flutter code sample for [OverlayPortal]. | |
void main() => runApp(const OverlayPortalExampleApp()); | |
class OverlayPortalExampleApp extends StatelessWidget { | |
const OverlayPortalExampleApp({super.key}); | |
@override |
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
// | |
// LabeledStreamLogHandler.swift | |
// WishBag | |
// | |
// Created by ultraon on 15/12/19. | |
// Copyright © 2019 ultraon. All rights reserved. | |
// | |
import Foundation | |
import Logging |
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 android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import okhttp3.internal.io.FileSystem; | |
import okio.BufferedSource; | |
import okio.Okio; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStream; |
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
apply plugin: 'com.android.application' | |
//... | |
//Adds support for splitted Apkes by abi (arch platform) | |
android { | |
//... | |
splits { | |
// Configures multiple APKs based on ABI. | |
abi { |
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 android.os.Handler; | |
import android.os.Looper; | |
import android.support.annotation.NonNull; | |
import io.reactivex.functions.Consumer; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.util.LinkedList; | |
import java.util.Queue; |
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
/** | |
* The {@link IoToMainThreadTransformers} is a factory of convenient Rx transformers to use with {@link | |
* io.reactivex.Observable#compose(ObservableTransformer)} operator to transform observable via | |
* apply {@link io.reactivex.Observable#subscribeOn(Scheduler)} operator with the {@link | |
* Schedulers#io()} and {@link io.reactivex.Observable#observeOn(Scheduler)} operator with the | |
* {@link AndroidSchedulers#mainThread()}. | |
*/ | |
public final class IoToMainThreadTransformers { | |
private IoToMainThreadTransformers() { |
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 | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
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 | |
# Reset routing table on OSX | |
# display current routing table | |
echo "********** BEFORE ****************************************" | |
netstat -r | |
echo "**********************************************************" | |
for i in {0..4}; do | |
sudo route -n flush # several times |
NewerOlder