Skip to content

Commit

Permalink
feat: #931 - displaying the history in dialog instead of log print (#983
Browse files Browse the repository at this point in the history
)

Impacted files:
* `smooth_app/pubspec.yaml`: upgraded
* `smooth_ui_library/pubspec.yaml`: upgraded
* `smooth_app/pubspec.lock`: impacted by yaml upgrade
* `smooth_ui_library/pubspec.lock`: impacted by yaml upgrade
* `smooth_ui_library/example/pubspec.lock`: impacted by yaml upgrade
* `user_preferences_dev_mode.dart`: displaying the history in dialog instead of log print
  • Loading branch information
monsieurtanuki authored Jan 19, 2022
1 parent e7ebbb7 commit 76f29c8
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 55 deletions.
37 changes: 36 additions & 1 deletion packages/smooth_app/lib/pages/user_preferences_dev_mode.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,42 @@ class UserPreferencesDevMode extends AbstractUserPreferences {
await DaoProductList(localDatabase).export(
ProductList.history(),
);
debugPrint('exported history: $export', wrapWidth: 80);
final List<Widget> children = <Widget>[];
for (final String barcode in export.keys) {
final bool? exists = export[barcode] as bool?;
children.add(
ListTile(
leading: Icon(exists == null
? Icons.error
: exists
? Icons.check
: Icons.help_outline),
title: Text(barcode),
subtitle: Text(exists == null
? 'exception'
: exists
? 'product found'
: 'product NOT found'),
),
);
}
showDialog<void>(
context: context,
builder: (BuildContext context) => AlertDialog(
title: const Text('export history'),
content: SizedBox(
height: 400,
width: 300,
child: ListView(children: children),
),
actions: <Widget>[
ElevatedButton(
child: Text(AppLocalizations.of(context)!.okay),
onPressed: () => Navigator.pop(context),
),
],
),
);
},
),
];
Expand Down
122 changes: 89 additions & 33 deletions packages/smooth_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "32.0.0"
version: "33.0.0"
after_layout:
dependency: transitive
description:
Expand All @@ -21,7 +21,7 @@ packages:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.1.0"
archive:
dependency: transitive
description:
Expand All @@ -42,7 +42,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.1"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -70,7 +70,7 @@ packages:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.3"
version: "8.1.4"
camera:
dependency: "direct main"
description:
Expand All @@ -84,7 +84,7 @@ packages:
name: camera_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "2.1.4"
camera_web:
dependency: transitive
description:
Expand All @@ -105,7 +105,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -190,6 +190,48 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
device_info_plus:
dependency: "direct main"
description:
name: device_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.1"
device_info_plus_linux:
dependency: transitive
description:
name: device_info_plus_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
device_info_plus_macos:
dependency: transitive
description:
name: device_info_plus_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
device_info_plus_platform_interface:
dependency: transitive
description:
name: device_info_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0+1"
device_info_plus_web:
dependency: transitive
description:
name: device_info_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
device_info_plus_windows:
dependency: transitive
description:
name: device_info_plus_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
device_preview:
dependency: "direct main"
description:
Expand Down Expand Up @@ -269,7 +311,7 @@ packages:
name: flutter_native_splash
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.2"
version: "1.3.3"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
Expand Down Expand Up @@ -325,7 +367,7 @@ packages:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -356,7 +398,7 @@ packages:
name: fwfh_text_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.1"
version: "2.7.2"
glob:
dependency: transitive
description:
Expand Down Expand Up @@ -412,7 +454,7 @@ packages:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
version: "3.1.1"
image_cropper:
dependency: "direct main"
description:
Expand All @@ -433,14 +475,14 @@ packages:
name: image_picker_for_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.5"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.2"
version: "2.4.3"
intl:
dependency: transitive
description:
Expand Down Expand Up @@ -503,7 +545,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
matomo:
dependency: "direct main"
description:
Expand Down Expand Up @@ -552,7 +594,7 @@ packages:
name: openfoodfacts
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
version: "1.11.1"
package_config:
dependency: transitive
description:
Expand Down Expand Up @@ -650,28 +692,28 @@ packages:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.5"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
version: "2.0.5"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.0.3"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
version: "2.0.5"
pedantic:
dependency: transitive
description:
Expand All @@ -686,6 +728,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.4.0"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
url: "https://pub.dartlang.org"
source: hosted
version: "8.3.0"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "3.7.0"
petitparser:
dependency: transitive
description:
Expand Down Expand Up @@ -790,28 +846,28 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
version: "2.0.12"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.9"
version: "2.0.10"
shared_preferences_ios:
dependency: transitive
description:
name: shared_preferences_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.0.9"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "2.0.4"
shared_preferences_macos:
dependency: transitive
description:
Expand All @@ -832,14 +888,14 @@ packages:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.0.3"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "2.0.4"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -907,7 +963,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
version: "0.4.3"
transparent_image:
dependency: transitive
description:
Expand Down Expand Up @@ -963,21 +1019,21 @@ packages:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.13"
version: "6.0.14"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.13"
version: "6.0.14"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.0.3"
url_launcher_macos:
dependency: transitive
description:
Expand All @@ -998,7 +1054,7 @@ packages:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.0.6"
url_launcher_windows:
dependency: transitive
description:
Expand All @@ -1019,7 +1075,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
visibility_detector:
dependency: "direct main"
description:
Expand All @@ -1040,7 +1096,7 @@ packages:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.3"
version: "2.3.6"
wkt_parser:
dependency: transitive
description:
Expand Down Expand Up @@ -1070,5 +1126,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"
dart: ">=2.15.1 <3.0.0"
flutter: ">=2.6.0-0"
Loading

0 comments on commit 76f29c8

Please sign in to comment.