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:flutter/services.dart'; | |
class MfaValidatorInput extends StatefulWidget { | |
const MfaValidatorInput({ | |
super.key, | |
required this.length, | |
this.onCompleted, | |
this.onChanged, | |
this.focusNode, |
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
<?php | |
namespace App\Console\Commands; | |
use Anik\Amqp\ConsumableMessage; | |
use Anik\Amqp\Exceptions\AmqpException; | |
use Anik\Amqp\Queues\Queue; | |
use Anik\Laravel\Amqp\Facades\Amqp; | |
use App\Models\Device; | |
use App\Models\DeviceVehicle; |
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
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Contracts\Database\Eloquent\Builder; | |
use Illuminate\Contracts\Pagination\LengthAwarePaginator; | |
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; | |
use Illuminate\Foundation\Bus\DispatchesJobs; | |
use Illuminate\Foundation\Validation\ValidatesRequests; | |
use Illuminate\Routing\Controller as BaseController; |
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
public function pegarValidadeDiaUtil($dias = 30, $finaisDeSemana = [0, 6]): Carbon | |
{ | |
$agora = now(); | |
$anoInicial = $agora->year; | |
$numFinaisDeSemanaParaPular = 0; | |
for ($i = 0; $i < $dias; $i++) { | |
$agora->addDays(); | |
if (in_array($agora->weekday(), $finaisDeSemana)) { | |
$numFinaisDeSemanaParaPular++; | |
} |
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 OrderType { asc, desc, sad } | |
String enumToString(dynamic enumValue) => | |
enumValue.toString().replaceAll(RegExp(r"^.*?\."), ""); | |
E stringToEnum<E>(List<E> values, String target, [E defaultIfNoMatch]) { | |
return values.firstWhere((enm) => enumToString(enm) == target, | |
orElse: () => defaultIfNoMatch); | |
} |
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
[{ | |
"name": "Afghanistan", | |
"dial_code": "+93", | |
"code": "AF" | |
}, | |
{ | |
"name": "Aland Islands", | |
"dial_code": "+358", | |
"code": "AX" | |
}, |
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 AppSwitch extends StatefulWidget { | |
final String firstValue; | |
final String secondValue; | |
final String selectedValue; | |
final Null Function(String) onChange; | |
final Color selectedColor; | |
final Color unselectedColor; | |
final Color selectedTextColor; |
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 AppPageIndicator extends StatefulWidget { | |
final PageController controller; | |
final int numItems; | |
final Color activeColor; | |
final Color inactiveColor; | |
final double dotSize; | |
final bool fillDots; | |
final EdgeInsets padding; |
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
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
choco install dart-sdk androidstudio git | |
cd \ | |
mkdir src | |
cd \src | |
git clone https://github.com/flutter/flutter.git | |
cd flutter | |
start bin/flutter.bat doctor | |
start flutter_console.bat | |
@echo off |
NewerOlder