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
extension Paddings on Widget { | |
Widget paddingAll(double padding) => Padding( | |
padding: EdgeInsets.all(padding), | |
child: this, | |
); | |
} | |
extension TextStyles on Text { | |
Text h1() { | |
if (this is Text) { |
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'; | |
class NameInitialsWidget extends StatelessWidget { | |
final double width; | |
final double height; | |
final String text; | |
final double fontSize; | |
final double margin; | |
const NameInitialsWidget( |
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
extension TextExtension on Text { | |
Text h1({TextStyle style}) { | |
TextStyle defaultStyle = TextStyle( | |
fontFamily: 'Nunito_Sans', | |
fontSize: 36, | |
fontWeight: FontWeight.w900, | |
fontStyle: FontStyle.normal, | |
letterSpacing: -0.02, | |
color: SoulphiaTheme.defaultGraySwatch[50], | |
); |
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
showModalBottomSheet( | |
isScrollControlled: true, | |
context: context, | |
builder: (context) { | |
return SingleChildScrollView( | |
child:Container( | |
padding: | |
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), | |
child: AnyChild(), | |
) |
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
//To get your devideId follow this steps: | |
//1 - Open your emulator/simulator (Android/iOS/Browser) | |
//2 - Run on terminal "flutter devices" | |
//3 - Get de deviceId (second param: https://i.imgur.com/dZHsyrc.png) | |
// More infos: https://github.com/flutter/flutter/wiki/Multi-device-debugging-in-VS-Code | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Android", |
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build_web: |
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/foundation.dart'; | |
import 'dart:io'; | |
bool get isWeb => kIsWeb; | |
bool get isMobile => !isWeb && (Platform.isIOS || Platform.isAndroid); | |
bool get isDesktop => | |
!isWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux); | |
bool get isApple => !isWeb && (Platform.isIOS || Platform.isMacOS); | |
bool get isGoogle => !isWeb && (Platform.isAndroid || Platform.isFuchsia); |
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'; | |
class AppTheme { | |
AppTheme._(); | |
static final Color _iconColor = Colors.redAccent.shade200; | |
static const Color _lightPrimaryColor = Colors.white; | |
static const Color _lightPrimaryVariantColor = Color(0xFFE1E1E1); | |
static const Color _lightSecondaryColor = Colors.green; |
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 | |
if [[ `git status --porcelain` ]]; then | |
printf "\e[31;1m%s\e[0m\n" 'This script needs to run against committed code only. Please commit or stash you changes.' | |
exit 1 | |
fi | |
printf "\e[33;1m%s\e[0m\n" 'Running the Flutter analyzer' | |
flutter analyze | |
if [ $? -ne 0 ]; then | |
printf "\e[31;1m%s\e[0m\n" 'Flutter analyzer error' | |
exit 1 |
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 | |
printf "\e[33;1m%s\e[0m\n" 'Running the Flutter formatter' | |
flutter format . | |
printf "\e[33;1m%s\e[0m\n" 'Finished running the Flutter formatter' |
OlderNewer