Skip to content

Commit

Permalink
fix: remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrarafer committed Apr 9, 2024
1 parent 73447ca commit 857966d
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 88 deletions.
9 changes: 4 additions & 5 deletions lib/src/generators/forms/field_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@ class TextFieldConfig extends FieldConfig {
final ExecutableElementData? validatorFunction;
final ExecutableElementData? customTextEditingController;
const TextFieldConfig({
required String name,
required super.name,
this.initialValue,
this.validatorFunction,
this.customTextEditingController,
}) : super(name: name);
});
}

class DateFieldConfig extends FieldConfig {
const DateFieldConfig({required String name}) : super(name: name);
const DateFieldConfig({required super.name});
}

class DropdownFieldConfig extends FieldConfig {
final List<DropdownFieldItem> items;
const DropdownFieldConfig({required String name, required this.items})
: super(name: name);
const DropdownFieldConfig({required super.name, required this.items});
}

class DropdownFieldItem {
Expand Down
20 changes: 7 additions & 13 deletions lib/src/generators/getit/dependency_config/factory_dependency.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@ import 'package:stacked_generator/src/generators/extensions/string_utils_extensi

class FactoryDependency extends DependencyConfig {
const FactoryDependency({
required String import,
required String className,
String? abstractedImport,
String? abstractedTypeClassName,
Set<String>? environments,
String? instanceName,
}) : super(
instanceName: instanceName,
import: import,
className: className,
abstractedImport: abstractedImport,
abstractedTypeClassName: abstractedTypeClassName,
environments: environments);
required super.import,
required super.className,
super.abstractedImport,
super.abstractedTypeClassName,
super.environments,
super.instanceName,
});

@override
String registerDependencies(String locatorName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@ class FactoryParamDependency extends DependencyConfig {
final Set<FactoryParameter>? params;

const FactoryParamDependency({
required String import,
required String className,
String? abstractedImport,
String? abstractedTypeClassName,
Set<String>? environments,
required super.import,
required super.className,
super.abstractedImport,
super.abstractedTypeClassName,
super.environments,
this.params,
String? instanceName,
}) : super(
instanceName: instanceName,
import: import,
className: className,
abstractedImport: abstractedImport,
abstractedTypeClassName: abstractedTypeClassName,
environments: environments);
super.instanceName,
});
Set<String> extraImports() {
if (params == null) return {};
return params!.map((e) => e.imports ?? {}).fold(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@ import 'package:stacked_generator/src/generators/extensions/string_utils_extensi

class InitializableSingletonDependency extends DependencyConfig {
const InitializableSingletonDependency({
required String import,
required String className,
String? abstractedImport,
String? abstractedTypeClassName,
Set<String>? environments,
String? instanceName,
}) : super(
instanceName: instanceName,
import: import,
className: className,
abstractedImport: abstractedImport,
abstractedTypeClassName: abstractedTypeClassName,
environments: environments,
);
required super.import,
required super.className,
super.abstractedImport,
super.abstractedTypeClassName,
super.environments,
super.instanceName,
});

@override
String registerDependencies(String locatorName) {
Expand Down
20 changes: 7 additions & 13 deletions lib/src/generators/getit/dependency_config/lazy_singleton.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@ class LazySingletonDependency extends DependencyConfig {
final String? resolveFunction;

const LazySingletonDependency({
required String import,
required String className,
String? abstractedImport,
String? abstractedTypeClassName,
Set<String>? environments,
required super.import,
required super.className,
super.abstractedImport,
super.abstractedTypeClassName,
super.environments,
this.resolveFunction,
String? instanceName,
}) : super(
instanceName: instanceName,
import: import,
className: className,
abstractedImport: abstractedImport,
abstractedTypeClassName: abstractedTypeClassName,
environments: environments);
super.instanceName,
});

@override
String registerDependencies(String locatorName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@ class PresolveSingletonDependency extends DependencyConfig {
final String? presolveFunction;

const PresolveSingletonDependency({
required String import,
required String className,
String? abstractedImport,
String? abstractedTypeClassName,
Set<String>? environments,
required super.import,
required super.className,
super.abstractedImport,
super.abstractedTypeClassName,
super.environments,
this.presolveFunction,
String? instanceName,
}) : super(
instanceName: instanceName,
import: import,
className: className,
abstractedImport: abstractedImport,
abstractedTypeClassName: abstractedTypeClassName,
environments: environments);
super.instanceName,
});

@override
String registerDependencies(String locatorName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@ class SingletonDependency extends DependencyConfig {
final String? resolveFunction;

const SingletonDependency({
required String import,
required String className,
String? abstractedImport,
String? abstractedTypeClassName,
Set<String>? environments,
required super.import,
required super.className,
super.abstractedImport,
super.abstractedTypeClassName,
super.environments,
this.resolveFunction,
String? instanceName,
}) : super(
instanceName: instanceName,
import: import,
className: className,
abstractedImport: abstractedImport,
abstractedTypeClassName: abstractedTypeClassName,
environments: environments);
super.instanceName,
});

@override
String registerDependencies(String locatorName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,11 @@ class FunctionParamConfig extends ParamConfig {
required super.isOptional,
required super.isNamed,
required super.element,
required bool isRequired,
required super.isRequired,
super.defaultValueCode,
}) : super(
isPathParam: false,
isQueryParam: false,
isRequired: isRequired,
isInheritedPathParam: false,
);

Expand Down
2 changes: 0 additions & 2 deletions test/helpers/config_helper_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ void main() {
group('ConfigHelper -', () {
const String customConfigFilePath =
'/Users/filledstacks/Desktop/stacked.json';
const String xdgConfigFilePath =
'/Users/filledstacks/.config/stacked/stacked.json';

final StackedConfig customConfig = StackedConfig.fromJson({
"bottom_sheet_builder_file_path": "ui/setup/setup_bottom_sheet_ui.dart",
Expand Down

0 comments on commit 857966d

Please sign in to comment.