From b7b88baa2253dd1abc74f96f28ff040420e5ae5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Tu=C5=A1ar?= Date: Sun, 16 Jun 2024 10:41:53 +0100 Subject: [PATCH] refactor: packages/alice --- packages/alice/lib/core/alice_core.dart | 4 ++-- packages/alice/lib/core/alice_logger.dart | 2 +- packages/alice/lib/core/alice_utils.dart | 2 +- packages/alice/lib/helper/alice_save_helper.dart | 5 ++--- packages/alice/lib/model/alice_http_call.dart | 2 +- packages/alice/lib/model/alice_http_request.dart | 2 +- packages/alice/lib/model/alice_menu_item.dart | 7 +++++-- packages/alice/lib/model/alice_tab_item.dart | 5 ++++- 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/packages/alice/lib/core/alice_core.dart b/packages/alice/lib/core/alice_core.dart index def782f1..26b00798 100644 --- a/packages/alice/lib/core/alice_core.dart +++ b/packages/alice/lib/core/alice_core.dart @@ -1,5 +1,5 @@ -import 'dart:async'; -import 'dart:io'; +import 'dart:async' show StreamSubscription; +import 'dart:io' show Platform; import 'package:alice/core/alice_logger.dart'; import 'package:alice/core/alice_utils.dart'; diff --git a/packages/alice/lib/core/alice_logger.dart b/packages/alice/lib/core/alice_logger.dart index c6225b8c..ac585c5c 100644 --- a/packages/alice/lib/core/alice_logger.dart +++ b/packages/alice/lib/core/alice_logger.dart @@ -1,4 +1,4 @@ -import 'dart:io'; +import 'dart:io' show Platform, Process, ProcessResult; import 'package:alice/model/alice_log.dart'; import 'package:flutter/foundation.dart'; diff --git a/packages/alice/lib/core/alice_utils.dart b/packages/alice/lib/core/alice_utils.dart index 176f34fc..ee15a3cf 100644 --- a/packages/alice/lib/core/alice_utils.dart +++ b/packages/alice/lib/core/alice_utils.dart @@ -1,4 +1,4 @@ -import 'package:flutter/foundation.dart'; +import 'package:flutter/foundation.dart' show kReleaseMode, debugPrint; /// Utils used across multiple classes in app. class AliceUtils { diff --git a/packages/alice/lib/helper/alice_save_helper.dart b/packages/alice/lib/helper/alice_save_helper.dart index a553a61e..3e86f876 100644 --- a/packages/alice/lib/helper/alice_save_helper.dart +++ b/packages/alice/lib/helper/alice_save_helper.dart @@ -1,6 +1,5 @@ -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; +import 'dart:convert' show JsonEncoder; +import 'dart:io' show Directory, File, FileMode, IOSink, Platform; import 'package:alice/core/alice_utils.dart'; import 'package:alice/helper/alice_alert_helper.dart'; diff --git a/packages/alice/lib/model/alice_http_call.dart b/packages/alice/lib/model/alice_http_call.dart index 990b13c2..9341850c 100644 --- a/packages/alice/lib/model/alice_http_call.dart +++ b/packages/alice/lib/model/alice_http_call.dart @@ -1,4 +1,4 @@ -import 'dart:io'; +import 'dart:io' show HttpHeaders; import 'package:alice/model/alice_http_error.dart'; import 'package:alice/model/alice_http_request.dart'; diff --git a/packages/alice/lib/model/alice_http_request.dart b/packages/alice/lib/model/alice_http_request.dart index d9298ccb..42c2b7dc 100644 --- a/packages/alice/lib/model/alice_http_request.dart +++ b/packages/alice/lib/model/alice_http_request.dart @@ -1,4 +1,4 @@ -import 'dart:io'; +import 'dart:io' show Cookie; import 'package:alice/model/alice_form_data_file.dart'; import 'package:alice/model/alice_from_data_field.dart'; diff --git a/packages/alice/lib/model/alice_menu_item.dart b/packages/alice/lib/model/alice_menu_item.dart index 7d79d261..f6dd4fff 100644 --- a/packages/alice/lib/model/alice_menu_item.dart +++ b/packages/alice/lib/model/alice_menu_item.dart @@ -1,8 +1,11 @@ import 'package:flutter/material.dart'; class AliceMenuItem { + const AliceMenuItem( + this.title, + this.iconData, + ); + final String title; final IconData iconData; - - const AliceMenuItem(this.title, this.iconData); } diff --git a/packages/alice/lib/model/alice_tab_item.dart b/packages/alice/lib/model/alice_tab_item.dart index 431c7aad..c9a2fdf4 100644 --- a/packages/alice/lib/model/alice_tab_item.dart +++ b/packages/alice/lib/model/alice_tab_item.dart @@ -1,4 +1,7 @@ -enum AliceTabItem { inspector, logger } +enum AliceTabItem { + inspector, + logger, +} extension AliceTabItemExtension on AliceTabItem { String get title => switch (this) {