Skip to content

Commit

Permalink
fix(lints): prefer_typing_uninitialized_variables rule (#161)
Browse files Browse the repository at this point in the history
* fix(lints): prefer_typing_uninitialized_variables rule

* fix(lints): prefer_typing_uninitialized_variables rule

* Formatted the code
  • Loading branch information
Neha62-lit authored Oct 15, 2021
1 parent fb4df78 commit 83ed9af
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 18 deletions.
11 changes: 0 additions & 11 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,10 @@ linter:

avoid_redundant_argument_values: false

# Unnecessary use of this in constructors should not be done
unnecessary_this: false

leading_newlines_in_multiline_strings: false

type_annotate_public_apis: false

directives_ordering: false

avoid_function_literals_in_foreach_calls: false

join_return_with_assignment: false

non_constant_identifier_names: false

constant_identifier_names: false

prefer_typing_uninitialized_variables: false
4 changes: 2 additions & 2 deletions lib/services/ib_engine_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class IbEngineServiceImpl implements IbEngineService {
bool ignoreIndex = false,
}) async {
/// Fetch response from API for the given id
var _apiResponse;
List<Map<String, dynamic>> _apiResponse;
try {
_apiResponse = await _ibApi.fetchApiPage(id: id);
} catch (_) {
Expand Down Expand Up @@ -138,7 +138,7 @@ class IbEngineServiceImpl implements IbEngineService {
return _ibChapters;
}

var _chapters;
List<IbChapter> _chapters;
try {
_chapters = await _fetchPagesInDir(ignoreIndex: true);
} on Failure catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/groups/add_assignment_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class _AddAssignmentViewState extends State<AddAssignmentView> {
_dialogService.showCustomProgressDialog(title: 'Adding..');

// [ISSUE] [html_editor] Throws error in Tests
var _descriptionEditorText;
String _descriptionEditorText;
try {
_descriptionEditorText =
await _descriptionEditor.currentState.getText();
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/groups/update_assignment_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class _UpdateAssignmentViewState extends State<UpdateAssignmentView> {
_dialogService.showCustomProgressDialog(title: 'Updating..');

// [ISSUE] [html_editor] Throws error in Tests
var _descriptionEditorText;
String _descriptionEditorText;
try {
_descriptionEditorText =
await _descriptionEditor.currentState.getText();
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/ib/syntaxes/ib_liquid_syntax.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class IbLiquidSyntax extends md.BlockSyntax {
md.Node parse(md.BlockParser parser) {
var match = pattern.firstMatch(parser.current);
var tags = match[1].split(' ');
var node;
md.Element node;

// Liquid include tags
if (tags[0] == 'include') {
Expand Down
5 changes: 3 additions & 2 deletions lib/utils/app_exceptions.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class AppException implements Exception {
final _message;
final _prefix;
final String _message;

final String _prefix;

AppException([this._message, this._prefix]);

Expand Down

0 comments on commit 83ed9af

Please sign in to comment.