Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 5 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,54 +21,11 @@
#.vscode/

# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
build/
/pubspec.lock
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
build/

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
.flutter-plugins
.flutter-plugins-dependencies
10 changes: 0 additions & 10 deletions .metadata

This file was deleted.

32 changes: 29 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
## [1.4.8] - 2022-05-13

- Fix: Remove update external dependencies
- Feat: Create a inputs formatter

## [1.4.5] - 2022-02-22

- Chore: Update dependencies
- Fix: removed unused HtmlWidget

## [1.4.3] - 2022-01-11

- Chore: Update dependencies

## [1.4.0] - 2021-10-13

- Feat: add form field

## [1.3.0] - 2021-02-23
- Feat: add export file
- Feat: add analyzer in project
- Feat: created new components

- Feat: add export file
- Feat: add analyzer in project
- Feat: created new components

## [1.2.1] - 2021-02-23

- Fix: homepage url

## [1.2.0] - 2021-02-22

- HtmlWidget

## [1.1.0] - 2020-12-04

- AlwaysDisabledFocusNode

## [1.0.0] - 2020-12-04

Hello World! This version contains:

- HorizontalSpacing
- VerticalSpacing
40 changes: 17 additions & 23 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
include: package:flutter_lints/flutter.yaml

analyzer:
strong-mode:
implicit-dynamic: true
errors:
import_of_legacy_library_into_null_safe: ignore
undefined_prefixed_name: ignore

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
dart_code_metrics:
anti-patterns:
- long-method
- long-parameter-list
metrics:
cyclomatic-complexity: 20
maximum-nesting-level: 5
number-of-parameters: 4
source-lines-of-code: 50
metrics-exclude:
- test/**
rules:
avoid_print: false
prefer_single_quotes: true
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
- newline-before-return
- no-boolean-literal-compare
- no-empty-block
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else
13 changes: 8 additions & 5 deletions lib/cubos_widgets.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export 'always_disabled_focus_node.dart';
export 'horizontal_spacing.dart';
export 'vertical_spacing.dart';
export 'form_fields.dart';
export 'html_widget.dart';
export 'src/components/always_disabled_focus_node.dart';
export 'src/components/horizontal_spacing.dart';
export 'src/components/vertical_spacing.dart';
export 'src/components/form_fields.dart';

export 'src/formatter/money_masked_text_controller.dart';
export 'src/formatter/masked_text_controller.dart';

36 changes: 0 additions & 36 deletions lib/html_widget.dart

This file was deleted.

29 changes: 4 additions & 25 deletions lib/form_fields.dart → lib/src/components/form_fields.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter_masked_text/flutter_masked_text.dart';
import 'package:flutter/material.dart';

import '../../cubos_widgets.dart';

/// A component used to centralize Focus and TextEditingController in one place,
/// And also the possibility to use a mask just using .mask(....)
/// This is useful when a screen has a lot of textFormField
Expand All @@ -19,7 +20,7 @@ class FormFields {
}) : focus = focus ?? FocusNode(),
controller = controller ?? TextEditingController();

factory FormFields.mask({String? mask}) {
factory FormFields.mask({required String mask}) {
return FormFields(
focus: FocusNode(),
controller: MaskedTextController(mask: mask),
Expand All @@ -35,7 +36,7 @@ class FormFields {
bool get isMaskedController =>
controller != null && controller is MaskedTextController;

void updateMask(String? value) {
void updateMask(String value) {
if (isMaskedController) {
(controller as MaskedTextController).updateMask(value);
}
Expand All @@ -46,25 +47,3 @@ class FormFields {
controller?.dispose();
}
}

class FormFieldsMoney extends FormFields {
FormFieldsMoney({
FocusNode? focus,
MoneyMaskedTextController? controller,
}) : super(focus: focus, controller: controller);

factory FormFieldsMoney.money({String? leftSymbol = 'U\$'}) {
return FormFieldsMoney(
focus: FocusNode(),
controller: MoneyMaskedTextController(leftSymbol: leftSymbol),
);
}

double get numberValue {
return (controller as MoneyMaskedTextController).numberValue;
}

void updateValue(double value) {
(controller as MoneyMaskedTextController).updateValue(value);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter_masked_text/flutter_masked_text.dart';
import 'package:flutter/material.dart';

import 'form_fields.dart';
import '../../cubos_widgets.dart';

/// A component used to centralize Focus and TextEditingController in one place,
/// And also the possibility to use a mask just using .mask(....)
Expand All @@ -17,7 +16,7 @@ class FormFieldsMoney extends FormFields {
MoneyMaskedTextController? controller,
}) : super(focus: focus, controller: controller);

factory FormFieldsMoney.money({String? leftSymbol = 'U\$'}) {
factory FormFieldsMoney.money({String leftSymbol = 'U\$'}) {
return FormFieldsMoney(
focus: FocusNode(),
controller: MoneyMaskedTextController(leftSymbol: leftSymbol),
Expand Down
File renamed without changes.
File renamed without changes.
Loading