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 com.google.firebase.database.* | |
import com.linkaberto.aproveitafrete.aproveitafrete.data.repositorio.RepoSingleton | |
import com.linkaberto.aproveitafrete.aproveitafrete.model.Anuncio | |
import info.marcussoftware.mschat.interfaces.Message | |
import io.reactivex.Observable | |
import io.reactivex.subjects.BehaviorSubject | |
import io.reactivex.subjects.PublishSubject | |
/** | |
* Created by Marcus Eduardo - [email protected] on 12/02/2018. |
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 AppTextFormField extends StatefulWidget { | |
final String textLabel; | |
final double fontSize; | |
final Color textColor; | |
final Color backgroundColor; | |
final Color shadowColor; | |
final TextEditingController controller; | |
final FocusNode 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
final RegExp email = RegExp( | |
r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]" | |
r"{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a" | |
r"-zA-Z0-9])?)*$", | |
caseSensitive: false, | |
multiLine: false); | |
final RegExp mobileBrazilianPhone = RegExp(r"^\(?0?\d{2}\)? ?9 ?\d{4}-?\d{4}$", | |
caseSensitive: false, multiLine: 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
import 'package:flutter/material.dart'; | |
class AppCheckbox extends StatelessWidget { | |
final String label; | |
final bool value; | |
final ValueChanged<bool> onChanged; | |
final TextStyle labelStyle; | |
const AppCheckbox( | |
{Key key, this.label, this.value, this.onChanged, this.labelStyle}) |
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 |
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
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
[{ | |
"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
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); | |
} |