Skip to content

Instantly share code, notes, and snippets.

View SergioEric's full-sized avatar
:octocat:

Sergio Eric SergioEric

:octocat:
View GitHub Profile
@SergioEric
SergioEric / main.dart
Created May 5, 2021 19:17
Filtro en local de una palabra
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
@SergioEric
SergioEric / genhtml.sh
Last active December 6, 2020 02:31
genhtml for windows
# we need to know the jgenhtml.jar path
# in this case it's static as we know where is located
# we can handle by running:
# echo `pwd`/jgenhtml-1.5.jar -> /c/Portables/jgenhtml/jgenhtml-1.5.jar
# and then copy a paste after the `java jar`
java -jar /c/Portables/jgenhtml/jgenhtml-1.5.jar $1 -o coverage/
# the optimal command should look like:
# java -jar ./jgenhtml-1.5.jar $1 -o $2
// ADD flutter_hooks dependency in pubspec.yaml
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter/services.dart'; //FOR FilteringTextInputFormatter
final List<TextInputFormatter> numberInputFormatters = [
FilteringTextInputFormatter.deny('.'),
FilteringTextInputFormatter.deny('-'),
FilteringTextInputFormatter.deny(' '),
// STATE
class ProductNotifier extends ChangeNotifier{
FormzStatus _status;
NameInput _name;
PriceInput _price;
DescriptionInput _description;
FormzStatus get status => this._status;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
));
runApp(MyApp());
}