Skip to content

Commit

Permalink
Removed unnecessary imports and casts
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoulbak committed Jun 8, 2022
1 parent 9e4588b commit c917141
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 21 deletions.
2 changes: 0 additions & 2 deletions bin/flutter_i18n.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:flutter_i18n/utils/message_printer.dart';

import 'actions/ActionInterface.dart';
import 'actions/DiffAction.dart';
import 'actions/ValidateAction.dart';
Expand Down
2 changes: 0 additions & 2 deletions example/lib/basic_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:flutter_i18n/widgets/I18nPlural.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

Future main() async {
Expand Down
1 change: 0 additions & 1 deletion example/lib/local_example.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async';
import 'dart:io';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n_delegate.dart';
import 'package:flutter_i18n/loaders/decoders/json_decode_strategy.dart';
Expand Down
1 change: 0 additions & 1 deletion example/lib/namespace_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

Future main() async {
Expand Down
1 change: 0 additions & 1 deletion example/lib/network_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:flutter_i18n/loaders/decoders/json_decode_strategy.dart';
import 'package:flutter_i18n/widgets/I18nText.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

class CustomNetworkFileTranslationLoader extends NetworkFileTranslationLoader {
Expand Down
1 change: 0 additions & 1 deletion example/test/namespace_example_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_i18n_example/main.dart' as appmain;
import 'package:flutter_test/flutter_test.dart';
Expand Down
3 changes: 0 additions & 3 deletions lib/flutter_i18n.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';

import 'package:flutter/foundation.dart' as Foundation;
import 'package:flutter/widgets.dart';
import 'package:flutter_i18n/loaders/file_translation_loader.dart';
import 'package:flutter_i18n/loaders/translation_loader.dart';
Expand All @@ -9,8 +8,6 @@ import 'package:flutter_i18n/utils/plural_translator.dart';
import 'package:flutter_i18n/utils/simple_translator.dart';
import 'package:intl/intl.dart' as intl;

import 'utils/message_printer.dart';

export 'flutter_i18n_delegate.dart';
export 'loaders/e2e_file_translation_loader.dart';
export 'loaders/file_translation_loader.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/flutter_i18n_delegate.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_i18n/loaders/translation_loader.dart';
import 'package:flutter_i18n/utils/message_printer.dart';

import 'flutter_i18n.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/loaders/e2e_file_translation_loader.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:convert';
import 'dart:typed_data';

import 'package:flutter/services.dart';

Expand Down
5 changes: 2 additions & 3 deletions lib/loaders/file_translation_loader.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'package:flutter/widgets.dart';
import 'package:flutter_i18n/loaders/decoders/base_decode_strategy.dart';
import 'package:flutter_i18n/loaders/decoders/json_decode_strategy.dart';
Expand Down Expand Up @@ -87,8 +86,8 @@ class FileTranslationLoader extends TranslationLoader implements IFileContent {
V mapResult;
if (result.containsKey(key)) {
if (p1 is Map && p2 is Map) {
Map map1 = p1 as Map;
Map map2 = p2 as Map;
Map map1 = p1;
Map map2 = p2;
mapResult = _deepMergeMaps(map1, map2) as V;
} else {
mapResult = p2;
Expand Down
1 change: 0 additions & 1 deletion lib/loaders/namespace_file_translation_loader.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/services.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'package:flutter_i18n/loaders/file_translation_loader.dart';
import 'package:flutter_i18n/utils/message_printer.dart';

Expand Down
2 changes: 0 additions & 2 deletions test/loaders/file_translation_loader_test.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:math';

import 'package:flutter/material.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:flutter_test/flutter_test.dart';
Expand Down
2 changes: 0 additions & 2 deletions test/loaders/network_file_translation_loader_test.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:flutter_test/flutter_test.dart';

import '../test_asset_bundle.dart';

class CustomNetworkFileTranslationLoader extends NetworkFileTranslationLoader {
CustomNetworkFileTranslationLoader({required baseUri})
: super(baseUri: baseUri);
Expand Down

0 comments on commit c917141

Please sign in to comment.