diff --git a/README.md b/README.md index cfe77b3..e81c286 100644 --- a/README.md +++ b/README.md @@ -27,45 +27,43 @@ | Плагин ОС Аврора | Версия | Внешний плагин | Версия | Версия ОС Аврора | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|-------------------------------------------------------------------------------------|----------|--------------------| -| [battery_plus_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/battery_plus/battery_plus_aurora) | `0.0.1` | [battery_plus](https://pub.dev/packages/battery_plus) | `4.0.1` | `4.0.2.269` | -| [device_info_plus_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/device_info_plus/device_info_plus_aurora) | `0.0.1` | [device_info_plus](https://pub.dev/packages/device_info_plus) | `8.2.2` | `4.0.2.269` | +| [battery_plus_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/battery_plus/battery_plus_aurora) | `0.0.1` | [battery_plus](https://pub.dev/packages/battery_plus) | `4.0.2` | `4.0.2.269` | +| [device_info_plus_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/device_info_plus/device_info_plus_aurora) | `0.0.1` | [device_info_plus](https://pub.dev/packages/device_info_plus) | `9.0.3` | `4.0.2.269` | | [flutter_keyboard_visibility_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora) | `0.0.1` | [flutter_keyboard_visibility](https://pub.dev/packages/flutter_keyboard_visibility) | `5.4.1` | `4.0.2.269` | -| [flutter_local_notifications_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_local_notifications/flutter_local_notifications_aurora) | `0.0.1` | [flutter_local_notifications](https://pub.dev/packages/flutter_local_notifications) | `14.1.1` | `4.0.2.269` | -| [flutter_secure_storage_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_secure_storage/flutter_secure_storage_aurora) | `0.0.1` | [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage) | `8.0.0` | `4.0.2.269` | -| [package_info_plus_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/package_info_plus/package_info_plus_aurora) | `0.0.1` | [package_info_plus](https://pub.dev/packages/package_info_plus) | `3.1.2` | `4.0.2.269` | -| [path_provider_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/path_provider/path_provider_aurora) | `0.0.1` | [path_provider](https://pub.dev/packages/path_provider) | `2.0.15` | `4.0.2.269` | +| [flutter_local_notifications_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_local_notifications/flutter_local_notifications_aurora) | `0.0.1` | [flutter_local_notifications](https://pub.dev/packages/flutter_local_notifications) | `15.1.1` | `4.0.2.269` | +| [flutter_secure_storage_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_secure_storage/flutter_secure_storage_aurora) | `0.0.1` | [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage) | `9.0.0` | `4.0.2.269` | +| [package_info_plus_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/package_info_plus/package_info_plus_aurora) | `0.0.1` | [package_info_plus](https://pub.dev/packages/package_info_plus) | `4.1.0` | `4.0.2.269` | +| [path_provider_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/path_provider/path_provider_aurora) | `0.0.1` | [path_provider](https://pub.dev/packages/path_provider) | `2.1.1` | `4.0.2.269` | | [shared_preferences_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/shared_preferences/shared_preferences_aurora) | `0.0.1` | [shared_preferences](https://pub.dev/packages/shared_preferences) | `2.1.2` | `4.0.2.269` | -| [sqflite_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/sqflite/sqflite_aurora) | `0.0.1` | [sqflite](https://pub.dev/packages/sqflite) | `2.2.6` | `4.0.2.269` | -| [wakelock_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/wakelock/wakelock_aurora) | `0.0.1` | [wakelock](https://pub.dev/packages/wakelock) | `0.6.2` | `4.0.2.269` | +| [sqflite_aurora](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/sqflite/sqflite_aurora) | `0.0.1` | [sqflite](https://pub.dev/packages/sqflite) | `2.3.0` | `4.0.2.269` | | [xdga_directories](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/xdga_directories) | `0.0.1` | - | - | `4.0.2.269` | -| - | - | [flutter_cache_manager](https://pub.dev/packages/flutter_cache_manager) | 3.3.0 | `4.0.2.269` | -| - | - | [cached_network_image](https://pub.dev/packages/cached_network_image) | 3.2.3 | `4.0.2.269` | -| - | - | [google_fonts](https://pub.dev/packages/google_fonts) | 4.0.4 | `4.0.2.269` | +| - | - | [flutter_cache_manager](https://pub.dev/packages/flutter_cache_manager) | `3.3.1` | `4.0.2.269` | +| - | - | [cached_network_image](https://pub.dev/packages/cached_network_image) | `3.3.0` | `4.0.2.269` | +| - | - | [google_fonts](https://pub.dev/packages/google_fonts) | `6.1.0` | `4.0.2.269` | ## Пакеты Flutter Список проверенных на совместимость и работоспособность в ОС Аврора пакетов Flutter не являющиеся платформо-зависимыми. -| Внешний плагин | Версия | Версия ОС Аврора | -|-------------------------------------------------------------------------------------|---------|--------------------| -| [crypto](https://pub.dev/packages/crypto) | 3.0.2 | `4.0.2.269` | -| [cupertino_icons](https://pub.dev/packages/cupertino_icons) | 1.0.5 | `4.0.2.269` | -| [get_it](https://pub.dev/packages/get_it) | 7.6.0 | `4.0.2.269` | -| [intl](https://pub.dev/packages/intl) | 0.17.0 | `4.0.2.269` | -| [photo_view](https://pub.dev/packages/photo_view) | 0.14.0 | `4.0.2.269` | -| [scoped_model](https://pub.dev/packages/scoped_model) | 2.0.0 | `4.0.2.269` | -| [dartz](https://pub.dev/packages/dartz) | 0.10.1 | `4.0.2.269` | -| [freezed](https://pub.dev/packages/freezed) | 2.3.3 | `4.0.2.269` | -| [equatable](https://pub.dev/packages/equatable) | 2.0.5 | `4.0.2.269` | -| [flutter_markdown](https://pub.dev/packages/flutter_markdown) | 0.6.15 | `4.0.2.269` | -| [build_runner](https://pub.dev/packages/build_runner) | 2.3.3 | `4.0.2.269` | -| [freezed_annotation](https://pub.dev/packages/freezed_annotation) | 2.2.0 | `4.0.2.269` | -| [json_annotation](https://pub.dev/packages/json_annotation) | 4.8.0 | `4.0.2.269` | -| [json_serializable](https://pub.dev/packages/json_serializable) | 6.6.1 | `4.0.2.269` | -| [provider](https://pub.dev/packages/provider) | 6.0.5 | `4.0.2.269` | -| [qr_flutter](https://pub.dev/packages/qr_flutter) | 4.0.0 | `4.0.2.269` | -| [rxdart](https://pub.dev/packages/rxdart) | 0.27.7 | `4.0.2.269` | -| [translator](https://pub.dev/packages/translator) | 0.1.7 | `4.0.2.269` | +| Внешний плагин | Версия | Версия ОС Аврора | +|-------------------------------------------------------------------------------------|------------|--------------------| +| [crypto](https://pub.dev/packages/crypto) | `3.0.3` | `4.0.2.269` | +| [cupertino_icons](https://pub.dev/packages/cupertino_icons) | `1.0.6` | `4.0.2.269` | +| [get_it](https://pub.dev/packages/get_it) | `7.6.4` | `4.0.2.269` | +| [intl](https://pub.dev/packages/intl) | `0.18.1` | `4.0.2.269` | +| [photo_view](https://pub.dev/packages/photo_view) | `0.14.0` | `4.0.2.269` | +| [scoped_model](https://pub.dev/packages/scoped_model) | `2.0.0` | `4.0.2.269` | +| [dartz](https://pub.dev/packages/dartz) | `0.10.1` | `4.0.2.269` | +| [freezed](https://pub.dev/packages/freezed) | `2.4.3` | `4.0.2.269` | +| [equatable](https://pub.dev/packages/equatable) | `2.0.5` | `4.0.2.269` | +| [flutter_markdown](https://pub.dev/packages/flutter_markdown) | `0.6.17+4` | `4.0.2.269` | +| [build_runner](https://pub.dev/packages/build_runner) | `2.4.6` | `4.0.2.269` | +| [freezed_annotation](https://pub.dev/packages/freezed_annotation) | `2.4.1` | `4.0.2.269` | +| [json_annotation](https://pub.dev/packages/json_annotation) | `4.8.1` | `4.0.2.269` | +| [json_serializable](https://pub.dev/packages/json_serializable) | `6.7.1` | `4.0.2.269` | +| [provider](https://pub.dev/packages/provider) | `6.0.5` | `4.0.2.269` | +| [qr_flutter](https://pub.dev/packages/qr_flutter) | `4.1.0` | `4.0.2.269` | +| [rxdart](https://pub.dev/packages/rxdart) | `0.27.7` | `4.0.2.269` | ## Вклад diff --git a/example/lib/l10n/app_ru.arb b/example/lib/l10n/app_ru.arb index b8bd5e4..89c7f69 100644 --- a/example/lib/l10n/app_ru.arb +++ b/example/lib/l10n/app_ru.arb @@ -190,7 +190,7 @@ "@_HOME_SCREEN": {}, "homePageTitle": "Flutter ОС Аврора", "homeWelcomeTitle": "Приветствую!", - "homeWelcomeText": "В этом приложении вы можете найти {count} плагинов Flutter, поддерживающих ОС Aurora. Если вдруг вам чего-то не хватает, вы можете написать нам или добавить самостоятельно.", + "homeWelcomeText": "В этом приложении вы можете найти {count} плагина Flutter, поддерживающих ОС Aurora. Если вдруг вам чего-то не хватает, вы можете написать нам или добавить самостоятельно.", "@homeWelcomeText": { "placeholders": { "count": { @@ -213,6 +213,6 @@ "homeSearchTitle": "Поиск...", "homeSearch": "Поиск пакетов", "homeNotFoundTitle": "Не найдено", - "homeNotFoundSubtitle": "То что вы искали нет в списке провереных плагинов, но это не означает что он работать не будет, проверьте его и возможно вы захотите добавить его в этот список проверенных плагинов.", + "homeNotFoundSubtitle": "То что вы искали нет в списке проверенных плагинов, но это не означает что он работать не будет, проверьте его и возможно вы захотите добавить его в этот список проверенных плагинов.", "homeFilter": "Фильтр" } diff --git a/example/lib/packages/flutter_secure_storage/model.dart b/example/lib/packages/flutter_secure_storage/model.dart index c87ab45..e06f1e6 100644 --- a/example/lib/packages/flutter_secure_storage/model.dart +++ b/example/lib/packages/flutter_secure_storage/model.dart @@ -48,6 +48,7 @@ class FlutterSecureStorageModel extends Model { // Read data _readValue = await _secureStorage.read(key: key) ?? "Not found"; } catch (e) { + debugPrint(e.toString()); _readValue = "Error password"; } notifyListeners(); @@ -83,10 +84,6 @@ class FlutterSecureStorageModel extends Model { void _updateByPassword( String password, ) { - // https://pub.dev/packages/encrypt - // Encrypter(AES(key)) - // secure-random --length 16 --base 16 - // You can generate a secret key based on user data, as an example of a hash pin-code FlutterSecureStorageAurora.setSecret( _getPasswordFromString(password), ); diff --git a/example/lib/packages/packages.dart b/example/lib/packages/packages.dart index f590335..1d41e86 100644 --- a/example/lib/packages/packages.dart +++ b/example/lib/packages/packages.dart @@ -31,9 +31,7 @@ import 'package:flutter_example_packages/packages/rxdart/package.dart'; import 'package:flutter_example_packages/packages/scoped_model/package.dart'; import 'package:flutter_example_packages/packages/shared_preferences/package.dart'; import 'package:flutter_example_packages/packages/sqflite/package.dart'; -import 'package:flutter_example_packages/packages/translator/package.dart'; import 'package:flutter_example_packages/packages/universal_io/package.dart'; -import 'package:flutter_example_packages/packages/wakelock/package.dart'; import 'package:flutter_example_packages/packages/xdga_directories/package.dart'; /// List app packages @@ -68,8 +66,6 @@ final packages = [ packageScopedModel, packageSharedPreferences, packageSqflite, - packageTranslator, packageUniversalIO, - packageWakelock, packageXdgaDirectories, ]; diff --git a/example/lib/packages/qr_flutter/page.dart b/example/lib/packages/qr_flutter/page.dart index 559f9ca..7ab406e 100644 --- a/example/lib/packages/qr_flutter/page.dart +++ b/example/lib/packages/qr_flutter/page.dart @@ -42,7 +42,7 @@ class _QrFlutterPageState extends AppState { children: [ BlockInfoPackage(widget.package), Center( - child: QrImage( + child: QrImageView( data: '1234567890', version: QrVersions.auto, size: 200.0, diff --git a/example/lib/packages/translator/model.dart b/example/lib/packages/translator/model.dart deleted file mode 100644 index 924f419..0000000 --- a/example/lib/packages/translator/model.dart +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -// SPDX-License-Identifier: BSD-3-Clause -import 'package:flutter/widgets.dart'; -import 'package:scoped_model/scoped_model.dart'; -import 'package:translator/translator.dart'; - -/// Model for [TranslatorPage] -class TranslatorModel extends Model { - /// Get [ScopedModel] - static TranslatorModel of(BuildContext context) => - ScopedModel.of(context); - - final translator = GoogleTranslator(); - - Future translate( - String value, - ) async { - return await translator.translate(value, from: 'en', to: 'ru'); - } -} diff --git a/example/lib/packages/translator/package.dart b/example/lib/packages/translator/package.dart deleted file mode 100644 index 414cb44..0000000 --- a/example/lib/packages/translator/package.dart +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -// SPDX-License-Identifier: BSD-3-Clause -import 'package:flutter_example_packages/base/package/package_page.dart'; -import 'package:get_it/get_it.dart'; - -import 'model.dart'; -import 'page.dart'; - -/// Package values -final packageTranslator = PackagePage( - key: 'translator', - descEN: ''' - Free Google Translate API for Dart. - ''', - descRU: ''' - Бесплатный API Google Translate для Dart. - ''', - version: '0.1.7', - isPlatformDependent: false, - page: () => TranslatorPage(), - init: () { - GetIt.instance.registerFactory(() => TranslatorModel()); - }, -); diff --git a/example/lib/packages/translator/page.dart b/example/lib/packages/translator/page.dart deleted file mode 100644 index 7d2fafd..0000000 --- a/example/lib/packages/translator/page.dart +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -// SPDX-License-Identifier: BSD-3-Clause -import 'package:flutter/material.dart'; -import 'package:flutter_example_packages/base/di/app_di.dart'; -import 'package:flutter_example_packages/base/package/package.dart'; -import 'package:flutter_example_packages/widgets/base/export.dart'; -import 'package:flutter_example_packages/widgets/blocks/block_info_package.dart'; -import 'package:flutter_example_packages/widgets/blocks/block_item.dart'; -import 'package:flutter_example_packages/widgets/layouts/block_layout.dart'; -import 'package:flutter_gen/gen_l10n/app_localizations.dart'; - -import 'model.dart'; -import 'package.dart'; - -class TranslatorPage extends AppStatefulWidget { - TranslatorPage({ - super.key, - }); - - final Package package = packageTranslator; - - @override - State createState() => _TranslatorPageState(); -} - -class _TranslatorPageState extends AppState { - @override - Widget buildWide( - BuildContext context, - MediaQueryData media, - AppLocalizations l10n, - ) { - return BlockLayout( - model: getIt(), - title: widget.package.key, - builder: (context, child, model) { - return SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - BlockInfoPackage(widget.package), - BlockItem( - title: l10n.translatorTitle, - desc: l10n.translatorSubtitle, - future: model.translate(l10n.translatorText), - builder: (value) => value.text, - ), - ], - ), - ), - ); - }, - ); - } -} diff --git a/example/lib/packages/wakelock/model.dart b/example/lib/packages/wakelock/model.dart deleted file mode 100644 index 40aae9c..0000000 --- a/example/lib/packages/wakelock/model.dart +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -// SPDX-License-Identifier: BSD-3-Clause -import 'package:flutter/widgets.dart'; -import 'package:scoped_model/scoped_model.dart'; -import 'package:wakelock/wakelock.dart'; - -/// Model for [WakelockPage] -class WakelockModel extends Model { - /// Get [ScopedModel] - static WakelockModel of(BuildContext context) => - ScopedModel.of(context); - - /// Error - String? _error; - - /// Public error - String? get error => _error; - - /// Public is error - bool get isError => _error != null; - - /// Check is enable Wakelock - Future isEnable() async { - try { - return await Wakelock.enabled; - } catch (e) { - _error = e.toString(); - } - notifyListeners(); - return null; - } - - /// Set state Wakelock - Future setStateWakelock(bool enable) async { - try { - await Wakelock.toggle(enable: enable); - } catch (e) { - _error = e.toString(); - } - notifyListeners(); - } -} diff --git a/example/lib/packages/wakelock/package.dart b/example/lib/packages/wakelock/package.dart deleted file mode 100644 index 8fdae46..0000000 --- a/example/lib/packages/wakelock/package.dart +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -// SPDX-License-Identifier: BSD-3-Clause -import 'package:flutter_example_packages/base/package/package_page.dart'; -import 'package:flutter_example_packages/packages/wakelock/page.dart'; -import 'package:get_it/get_it.dart'; - -import 'model.dart'; - -/// Package values -final packageWakelock = PackagePage( - key: 'wakelock', - descEN: ''' - Plugin that allows you to keep the device screen awake, i.e. - prevent the screen from sleeping. - ''', - descRU: ''' - Плагин, который позволяет держать экран устройства в активном состоянии, - т. е. предотвращать переход экрана в спящий режим. - ''', - version: '0.6.2', - isPlatformDependent: true, - page: () => WakelockPage(), - init: () { - GetIt.instance.registerFactory(() => WakelockModel()); - }, -); diff --git a/example/lib/packages/wakelock/page.dart b/example/lib/packages/wakelock/page.dart deleted file mode 100644 index 2493763..0000000 --- a/example/lib/packages/wakelock/page.dart +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -// SPDX-License-Identifier: BSD-3-Clause -import 'package:flutter/material.dart'; -import 'package:flutter_example_packages/base/di/app_di.dart'; -import 'package:flutter_example_packages/base/package/package.dart'; -import 'package:flutter_example_packages/packages/wakelock/model.dart'; -import 'package:flutter_example_packages/packages/wakelock/package.dart'; -import 'package:flutter_example_packages/theme/colors.dart'; -import 'package:flutter_example_packages/widgets/base/export.dart'; -import 'package:flutter_example_packages/widgets/blocks/block_alert.dart'; -import 'package:flutter_example_packages/widgets/blocks/block_info_package.dart'; -import 'package:flutter_example_packages/widgets/layouts/block_layout.dart'; -import 'package:flutter_example_packages/widgets/texts/export.dart'; -import 'package:flutter_gen/gen_l10n/app_localizations.dart'; - -class WakelockPage extends AppStatefulWidget { - WakelockPage({ - super.key, - }); - - final Package package = packageWakelock; - - @override - State createState() => _WakelockPageState(); -} - -class _WakelockPageState extends AppState { - @override - Widget buildWide( - BuildContext context, - MediaQueryData media, - AppLocalizations l10n, - ) { - return BlockLayout( - model: getIt(), - title: widget.package.key, - builder: (context, child, model) { - return SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - BlockInfoPackage(widget.package), - BlockAlert(model.error), - if (!model.isError) - Row( - children: [ - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - TextTitleLarge(l10n.wakelockTitle), - const SizedBox(height: 8), - TextBodyMedium(l10n.wakelockDesc), - ], - ), - ), - FutureBuilder( - future: model.isEnable(), - builder: ( - BuildContext context, - AsyncSnapshot snapshot, - ) { - final value = snapshot.data ?? false; - return Expanded( - flex: 0, - child: Switch( - // This bool value toggles the switch. - value: value, - activeColor: AppColors.secondary, - onChanged: (bool value) { - model.setStateWakelock(value); - }, - ), - ); - }, - ), - ], - ), - ], - ), - ), - ); - }, - ); - } -} diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 75b0f29..5ee9b10 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -9,7 +9,7 @@ publish_to: "none" version: 1.0.0+1 environment: - sdk: ">=2.18.6 <3.0.0" + sdk: ">=3.1.2 <4.0.0" dependencies: flutter: @@ -17,27 +17,27 @@ dependencies: flutter_localizations: sdk: flutter ## https://pub.dev/packages/cupertino_icons - cupertino_icons: ^1.0.5 + cupertino_icons: ^1.0.6 ## https://pub.dev/packages/google_fonts - google_fonts: ^4.0.4 + google_fonts: ^6.1.0 ## https://pub.dev/packages/scoped_model scoped_model: ^2.0.0 ## https://pub.dev/packages/get_it - get_it: ^7.6.0 + get_it: ^7.6.4 ## https://pub.dev/packages/intl - intl: ^0.17.0 + intl: ^0.18.1 ## https://pub.dev/packages/universal_io - universal_io: ^2.2.0 + universal_io: ^2.2.2 ## https://pub.dev/packages/crypto - crypto: ^3.0.2 + crypto: ^3.0.3 ## https://pub.dev/packages/cached_network_image - cached_network_image: ^3.2.3 + cached_network_image: ^3.3.0 ## https://pub.dev/packages/flutter_cache_manager - flutter_cache_manager: ^3.3.0 + flutter_cache_manager: ^3.3.1 ## https://pub.dev/packages/photo_view photo_view: ^0.14.0 ## https://pub.dev/packages/path - path: ^1.8.2 + path: ^1.8.3 ## https://pub.dev/packages/dartz dartz: ^0.10.1 ## https://pub.dev/packages/provider @@ -45,127 +45,126 @@ dependencies: ## https://pub.dev/packages/equatable equatable: ^2.0.5 ## https://pub.dev/packages/qr_flutter - qr_flutter: ^4.0.0 + qr_flutter: ^4.1.0 ## https://pub.dev/packages/rxdart rxdart: ^0.27.7 - ## https://pub.dev/packages/translator - translator: ^0.1.7 ## https://pub.dev/packages/flutter_markdown - flutter_markdown: ^0.6.15 + flutter_markdown: ^0.6.17+4 ## https://pub.dev/packages/freezed_annotation - freezed_annotation: ^2.2.0 + freezed_annotation: ^2.4.1 ## https://pub.dev/packages/json_annotation - json_annotation: ^4.8.0 + json_annotation: ^4.8.1 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/xdga_directories xdga_directories: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/xdga_directories + path: ../packages/xdga_directories +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/xdga_directories ## https://pub.dev/packages/battery_plus - battery_plus: ^4.0.1 + battery_plus: ^4.0.2 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/battery_plus/battery_plus_aurora battery_plus_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/battery_plus/battery_plus_aurora + path: ../packages/battery_plus/battery_plus_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/battery_plus/battery_plus_aurora ## https://pub.dev/packages/device_info_plus - device_info_plus: ^8.2.2 + device_info_plus: ^9.0.3 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/device_info_plus/device_info_plus_aurora device_info_plus_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/device_info_plus/device_info_plus_aurora + path: ../packages/device_info_plus/device_info_plus_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/device_info_plus/device_info_plus_aurora ## https://pub.dev/packages/flutter_local_notifications - flutter_local_notifications: ^14.1.1 + flutter_local_notifications: ^15.1.1 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_local_notifications/flutter_local_notifications_aurora flutter_local_notifications_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/flutter_local_notifications/flutter_local_notifications_aurora - + path: ../packages/flutter_local_notifications/flutter_local_notifications_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/flutter_local_notifications/flutter_local_notifications_aurora +# ## https://pub.dev/packages/flutter_secure_storage - flutter_secure_storage: ^8.0.0 + flutter_secure_storage: ^9.0.0 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_secure_storage/flutter_secure_storage_aurora flutter_secure_storage_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/flutter_secure_storage/flutter_secure_storage_aurora + path: ../packages/flutter_secure_storage/flutter_secure_storage_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/flutter_secure_storage/flutter_secure_storage_aurora ## https://pub.dev/packages/package_info_plus - package_info_plus: 3.1.2 + package_info_plus: 4.1.0 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/package_info_plus/package_info_plus_aurora package_info_plus_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/package_info_plus/package_info_plus_aurora + path: ../packages/package_info_plus/package_info_plus_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/package_info_plus/package_info_plus_aurora ## https://pub.dev/packages/path_provider - path_provider: ^2.0.15 + path_provider: ^2.1.1 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/path_provider/path_provider_aurora path_provider_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/path_provider/path_provider_aurora + path: ../packages/path_provider/path_provider_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/path_provider/path_provider_aurora ## https://pub.dev/packages/shared_preferences shared_preferences: ^2.1.2 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/shared_preferences/shared_preferences_aurora shared_preferences_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/shared_preferences/shared_preferences_aurora - - ## https://pub.dev/packages/wakelock - wakelock: ^0.6.2 - ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/wakelock/wakelock_aurora - wakelock_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/wakelock/wakelock_aurora + path: ../packages/shared_preferences/shared_preferences_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/shared_preferences/shared_preferences_aurora ## https://pub.dev/packages/flutter_keyboard_visibility flutter_keyboard_visibility: ^5.4.1 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora flutter_keyboard_visibility_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora + path: ../packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora ## https://pub.dev/packages/sqflite - sqflite: ^2.2.6 + sqflite: ^2.3.0 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/sqflite/sqflite_aurora sqflite_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/sqflite/sqflite_aurora + path: ../packages/sqflite/sqflite_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/sqflite/sqflite_aurora dev_dependencies: flutter_test: sdk: flutter - ## https://pub.dev/packages/flutter_lints @todo - flutter_lints: ^2.0.0 + ## https://pub.dev/packages/flutter_lints + flutter_lints: ^2.0.3 ## https://pub.dev/packages/build_runner - build_runner: ^2.3.3 + build_runner: ^2.4.6 ## https://pub.dev/packages/freezed - freezed: ^2.3.3 + freezed: ^2.4.3 ## https://pub.dev/packages/json_serializable - json_serializable: ^6.6.1 + json_serializable: ^6.7.1 flutter: generate: true diff --git a/packages/battery_plus/battery_plus_aurora/pubspec.yaml b/packages/battery_plus/battery_plus_aurora/pubspec.yaml index 26aec4c..b25481c 100644 --- a/packages/battery_plus/battery_plus_aurora/pubspec.yaml +++ b/packages/battery_plus/battery_plus_aurora/pubspec.yaml @@ -6,7 +6,7 @@ description: The Aurora OS implementation of battery_plus. version: 0.0.1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: diff --git a/packages/device_info_plus/device_info_plus_aurora/pubspec.yaml b/packages/device_info_plus/device_info_plus_aurora/pubspec.yaml index 05499d2..fe0e2a9 100644 --- a/packages/device_info_plus/device_info_plus_aurora/pubspec.yaml +++ b/packages/device_info_plus/device_info_plus_aurora/pubspec.yaml @@ -6,14 +6,14 @@ description: The Aurora OS implementation of flutter_local_notifications. version: 0.0.1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: flutter: sdk: flutter dbus: ^0.7.8 - device_info_plus: ^8.2.2 + device_info_plus: ^9.0.3 plugin_platform_interface: ^2.0.2 device_info_plus_platform_interface: ^7.0.0 diff --git a/packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora/pubspec.yaml b/packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora/pubspec.yaml index eaf81b7..bd5c633 100644 --- a/packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora/pubspec.yaml +++ b/packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora/pubspec.yaml @@ -6,7 +6,7 @@ description: A new Flutter plugin project. version: 0.0.1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: diff --git a/packages/flutter_local_notifications/flutter_local_notifications_aurora/pubspec.yaml b/packages/flutter_local_notifications/flutter_local_notifications_aurora/pubspec.yaml index 76fa4e5..3c907ac 100644 --- a/packages/flutter_local_notifications/flutter_local_notifications_aurora/pubspec.yaml +++ b/packages/flutter_local_notifications/flutter_local_notifications_aurora/pubspec.yaml @@ -6,7 +6,7 @@ description: The Aurora OS implementation of flutter_local_notifications. version: 0.0.1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: @@ -16,13 +16,14 @@ dependencies: plugin_platform_interface: ^2.0.2 flutter_local_notifications_platform_interface: ^7.0.0 ## https://pub.dev/packages/package_info_plus - package_info_plus: 3.1.2 + package_info_plus: 4.1.0 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/package_info_plus/package_info_plus_aurora package_info_plus_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/package_info_plus/package_info_plus_aurora + path: ../../package_info_plus/package_info_plus_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/package_info_plus/package_info_plus_aurora dev_dependencies: flutter_test: diff --git a/packages/flutter_secure_storage/flutter_secure_storage_aurora/README.md b/packages/flutter_secure_storage/flutter_secure_storage_aurora/README.md index a278678..7836dc2 100644 --- a/packages/flutter_secure_storage/flutter_secure_storage_aurora/README.md +++ b/packages/flutter_secure_storage/flutter_secure_storage_aurora/README.md @@ -25,10 +25,6 @@ dependencies: import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage_aurora/flutter_secure_storage_aurora.dart'; -// https://pub.dev/packages/encrypt -// Encrypter(AES(key)) -// secure-random --length 16 --base 16 -// You can generate a secret key based on user data, as an example of a hash pincode FlutterSecureStorageAurora.setSecret('5872747ed1ceda363808efb8b2b18b20'); final storage = const FlutterSecureStorage(); diff --git a/packages/flutter_secure_storage/flutter_secure_storage_aurora/lib/flutter_secure_storage_aurora_api.dart b/packages/flutter_secure_storage/flutter_secure_storage_aurora/lib/flutter_secure_storage_aurora_api.dart index 07fd74c..54800be 100644 --- a/packages/flutter_secure_storage/flutter_secure_storage_aurora/lib/flutter_secure_storage_aurora_api.dart +++ b/packages/flutter_secure_storage/flutter_secure_storage_aurora/lib/flutter_secure_storage_aurora_api.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:path/path.dart' as p; import 'package:path_provider/path_provider.dart'; import 'package:encrypt/encrypt.dart' as encrypt; +import 'package:crypto/crypto.dart' as crypto; class FlutterSecureStorageAuroraApi { final JsonDecoder decoder = const JsonDecoder(); @@ -87,15 +88,25 @@ class FlutterSecureStorageAuroraApi { /// Encrypt data in file String _encrypt(String value) { - final key = encrypt.Key.fromUtf8(_secret); - final iv = encrypt.IV.fromLength(16); - return encrypt.Encrypter(encrypt.AES(key)).encrypt(value, iv: iv).base64; + var ivStr = crypto.sha256.convert(utf8.encode(_secret)).toString().substring(0, 16); + var keyStr = crypto.sha256.convert(utf8.encode(_secret)).toString().substring(0, 32); + + encrypt.IV iv = encrypt.IV.fromUtf8(ivStr); + encrypt.Key key = encrypt.Key.fromUtf8(keyStr); + final encrypter = encrypt.Encrypter(encrypt.AES(key)); + + return encrypter.encrypt(value, iv: iv).base64; } /// Decrypt data in file String _decrypt(String value) { - final key = encrypt.Key.fromUtf8(_secret); - final iv = encrypt.IV.fromLength(16); - return encrypt.Encrypter(encrypt.AES(key)).decrypt64(value, iv: iv); + var ivStr = crypto.sha256.convert(utf8.encode(_secret)).toString().substring(0, 16); + var keyStr = crypto.sha256.convert(utf8.encode(_secret)).toString().substring(0, 32); + + encrypt.IV iv = encrypt.IV.fromUtf8(ivStr); + encrypt.Key key = encrypt.Key.fromUtf8(keyStr); + final encrypter = encrypt.Encrypter(encrypt.AES(key)); + + return encrypter.decrypt64(value, iv: iv); } } diff --git a/packages/flutter_secure_storage/flutter_secure_storage_aurora/pubspec.yaml b/packages/flutter_secure_storage/flutter_secure_storage_aurora/pubspec.yaml index f3d9218..fdb37cd 100644 --- a/packages/flutter_secure_storage/flutter_secure_storage_aurora/pubspec.yaml +++ b/packages/flutter_secure_storage/flutter_secure_storage_aurora/pubspec.yaml @@ -6,24 +6,29 @@ description: The Aurora OS implementation of flutter_secure_storage. version: 0.0.1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: flutter: sdk: flutter - encrypt: ^5.0.1 plugin_platform_interface: ^2.0.2 flutter_secure_storage_platform_interface: ^1.0.1 - path: ^1.8.2 + ## https://pub.dev/packages/crypto + crypto: ^3.0.3 + ## https://pub.dev/packages/encrypt + encrypt: ^5.0.3 + ## https://pub.dev/packages/encrypt + path: ^1.8.3 ## https://pub.dev/packages/path_provider - path_provider: ^2.0.15 + path_provider: ^2.1.1 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/path_provider/path_provider_aurora path_provider_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/path_provider/path_provider_aurora + path: ../../path_provider/path_provider_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/path_provider/path_provider_aurora dev_dependencies: flutter_test: diff --git a/packages/package_info_plus/package_info_plus_aurora/pubspec.yaml b/packages/package_info_plus/package_info_plus_aurora/pubspec.yaml index 6e311b6..f50fcee 100644 --- a/packages/package_info_plus/package_info_plus_aurora/pubspec.yaml +++ b/packages/package_info_plus/package_info_plus_aurora/pubspec.yaml @@ -6,7 +6,7 @@ description: A new Flutter plugin project. version: 0.0.1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: diff --git a/packages/path_provider/path_provider_aurora/pubspec.yaml b/packages/path_provider/path_provider_aurora/pubspec.yaml index 62cdc3d..c251fa2 100644 --- a/packages/path_provider/path_provider_aurora/pubspec.yaml +++ b/packages/path_provider/path_provider_aurora/pubspec.yaml @@ -6,31 +6,33 @@ description: The Aurora OS implementation of path_provider. version: 0.0.1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: flutter: sdk: flutter - path: ^1.8.2 + path: ^1.8.3 plugin_platform_interface: ^2.0.2 - path_provider_platform_interface: ^2.0.6 + path_provider_platform_interface: ^2.1.0 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/xdga_directories xdga_directories: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/xdga_directories + path: ../../xdga_directories +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/xdga_directories ## https://pub.dev/packages/package_info_plus - package_info_plus: 3.1.2 + package_info_plus: 4.1.0 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/package_info_plus/package_info_plus_aurora package_info_plus_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/package_info_plus/package_info_plus_aurora + path: ../../package_info_plus/package_info_plus_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/package_info_plus/package_info_plus_aurora dev_dependencies: flutter_test: diff --git a/packages/shared_preferences/shared_preferences_aurora/pubspec.yaml b/packages/shared_preferences/shared_preferences_aurora/pubspec.yaml index 9473877..ffe01fc 100644 --- a/packages/shared_preferences/shared_preferences_aurora/pubspec.yaml +++ b/packages/shared_preferences/shared_preferences_aurora/pubspec.yaml @@ -6,7 +6,7 @@ description: The Aurora OS implementation of shared_preferences. version: 0.0.1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: @@ -15,16 +15,16 @@ dependencies: plugin_platform_interface: ^2.0.2 shared_preferences: ^2.1.1 shared_preferences_platform_interface: ^2.2.0 - path: ^1.8.2 - + path: ^1.8.3 ## https://pub.dev/packages/path_provider - path_provider: ^2.0.15 + path_provider: ^2.1.1 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/path_provider/path_provider_aurora path_provider_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/path_provider/path_provider_aurora + path: ../../path_provider/path_provider_aurora +# git: +# url: https://gitlab.com/omprussia/flutter/flutter-plugins.git +# ref: master +# path: packages/path_provider/path_provider_aurora dev_dependencies: flutter_test: diff --git a/packages/sqflite/sqflite_aurora/pubspec.yaml b/packages/sqflite/sqflite_aurora/pubspec.yaml index 4300372..458c75d 100644 --- a/packages/sqflite/sqflite_aurora/pubspec.yaml +++ b/packages/sqflite/sqflite_aurora/pubspec.yaml @@ -6,13 +6,13 @@ description: The Aurora OS implementation of sqflite. version: 2.2.6+aurora1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: flutter: sdk: flutter - sqflite: ^2.2.6 + sqflite: ^2.3.0 flutter: plugin: diff --git a/packages/wakelock/wakelock_aurora/.gitignore b/packages/wakelock/wakelock_aurora/.gitignore deleted file mode 100644 index 96486fd..0000000 --- a/packages/wakelock/wakelock_aurora/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock -**/doc/api/ -.dart_tool/ -.packages -build/ diff --git a/packages/wakelock/wakelock_aurora/README.md b/packages/wakelock/wakelock_aurora/README.md deleted file mode 100644 index bc68e60..0000000 --- a/packages/wakelock/wakelock_aurora/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# wakelock_aurora - -The Aurora implementation of [`wakelock`](https://pub.dev/packages/wakelock). - -## Usage -This package is not an _endorsed_ implementation of `wakelock`. -Therefore, you have to include `wakelock_aurora` alongside `wakelock` as dependencies in your `pubspec.yaml` file. - -**pubspec.yaml** - -```yaml -dependencies: - wakelock: ^0.6.2 - wakelock_aurora: - git: - url: https://gitlab.com/omprussia/flutter/flutter-plugins.git - ref: master - path: packages/wakelock/wakelock_aurora -``` - -***.dart** - -```dart -import 'package:wakelock/wakelock.dart'; - -// The following line will enable wakelock. -Wakelock.enable(); - -// The next line disables the wakelock again. -Wakelock.disable(); -``` diff --git a/packages/wakelock/wakelock_aurora/analysis_options.yaml b/packages/wakelock/wakelock_aurora/analysis_options.yaml deleted file mode 100644 index 8a1fdc6..0000000 --- a/packages/wakelock/wakelock_aurora/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -# SPDX-License-Identifier: BSD-3-Clause - -include: package:flutter_lints/flutter.yaml diff --git a/packages/wakelock/wakelock_aurora/data/com.nokia.mce.request.xml b/packages/wakelock/wakelock_aurora/data/com.nokia.mce.request.xml deleted file mode 100644 index ee47a8a..0000000 --- a/packages/wakelock/wakelock_aurora/data/com.nokia.mce.request.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/packages/wakelock/wakelock_aurora/lib/com_nokia_mce_request.dart b/packages/wakelock/wakelock_aurora/lib/com_nokia_mce_request.dart deleted file mode 100644 index 8120726..0000000 --- a/packages/wakelock/wakelock_aurora/lib/com_nokia_mce_request.dart +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -// SPDX-License-Identifier: BSD-3-Clause -import 'package:dbus/dbus.dart'; - -class ComNokiaMceRequest extends DBusRemoteObject { - ComNokiaMceRequest(DBusClient client, String destination, - {DBusObjectPath path = - const DBusObjectPath.unchecked('/com/nokia/mce/request')}) - : super(client, name: destination, path: path); - - /// Invokes com.nokia.mce.request.req_display_blanking_pause() - Future callreq_display_blanking_pause( - {bool noAutoStart = false, - bool allowInteractiveAuthorization = false}) async { - await callMethod('com.nokia.mce.request', 'req_display_blanking_pause', [], - replySignature: DBusSignature(''), - noAutoStart: noAutoStart, - allowInteractiveAuthorization: allowInteractiveAuthorization); - } -} diff --git a/packages/wakelock/wakelock_aurora/lib/wakelock_aurora.dart b/packages/wakelock/wakelock_aurora/lib/wakelock_aurora.dart deleted file mode 100644 index d254985..0000000 --- a/packages/wakelock/wakelock_aurora/lib/wakelock_aurora.dart +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -// SPDX-License-Identifier: BSD-3-Clause -import 'dart:async'; - -import 'package:dbus/dbus.dart'; -import 'package:wakelock_platform_interface/wakelock_platform_interface.dart'; -import 'com_nokia_mce_request.dart'; - -class WakelockAurora extends WakelockPlatformInterface { - bool _enable = false; - Timer? _timer; - - static void registerWith() { - WakelockPlatformInterface.instance = WakelockAurora(); - } - - @override - Future toggle({required bool enable}) async { - if (_enable != enable) { - _enable = enable; - final client = DBusClient.system(); - final request = ComNokiaMceRequest(client, 'com.nokia.mce'); - if (_timer == null) { - request.callreq_display_blanking_pause(); - _timer = Timer.periodic(const Duration(seconds: 60), (timer) { - request.callreq_display_blanking_pause(); - }); - } else { - _timer?.cancel(); - _timer = null; - } - await client.close(); - } - } - - @override - Future get enabled async { - return _enable; - } -} diff --git a/packages/wakelock/wakelock_aurora/pubspec.yaml b/packages/wakelock/wakelock_aurora/pubspec.yaml deleted file mode 100644 index 7e030cd..0000000 --- a/packages/wakelock/wakelock_aurora/pubspec.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC -# SPDX-License-Identifier: BSD-3-Clause - -name: wakelock_aurora -description: A new Flutter plugin project. -version: 0.0.1 - -environment: - sdk: '>=2.18.6 <3.0.0' - flutter: ">=3.0.0" - -dependencies: - flutter: - sdk: flutter - dbus: ^0.7.8 - plugin_platform_interface: ^2.0.2 - wakelock_platform_interface: ^0.3.0 - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^2.0.0 - -flutter: - plugin: - platforms: - aurora: - dartPluginClass: WakelockAurora diff --git a/packages/xdga_directories/pubspec.yaml b/packages/xdga_directories/pubspec.yaml index 52cfebe..af31efa 100644 --- a/packages/xdga_directories/pubspec.yaml +++ b/packages/xdga_directories/pubspec.yaml @@ -6,7 +6,7 @@ description: Plugin for Aurora OS like xdg_directories version: 0.0.1 environment: - sdk: '>=2.18.6 <3.0.0' + sdk: '>=2.18.6 <4.0.0' flutter: ">=3.0.0" dependencies: