Browse Source

[update] Update flutter-plugins to 3.13.5 Flutter SDK

merge-requests/31/head
Vitaliy Zarubin 1 year ago
parent
commit
d612b55b2c
  1. 60
      README.md
  2. 4
      example/lib/l10n/app_ru.arb
  3. 5
      example/lib/packages/flutter_secure_storage/model.dart
  4. 4
      example/lib/packages/packages.dart
  5. 2
      example/lib/packages/qr_flutter/page.dart
  6. 20
      example/lib/packages/translator/model.dart
  7. 24
      example/lib/packages/translator/package.dart
  8. 57
      example/lib/packages/translator/page.dart
  9. 42
      example/lib/packages/wakelock/model.dart
  10. 26
      example/lib/packages/wakelock/package.dart
  11. 89
      example/lib/packages/wakelock/page.dart
  12. 155
      example/pubspec.yaml
  13. 2
      packages/battery_plus/battery_plus_aurora/pubspec.yaml
  14. 4
      packages/device_info_plus/device_info_plus_aurora/pubspec.yaml
  15. 2
      packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora/pubspec.yaml
  16. 13
      packages/flutter_local_notifications/flutter_local_notifications_aurora/pubspec.yaml
  17. 4
      packages/flutter_secure_storage/flutter_secure_storage_aurora/README.md
  18. 23
      packages/flutter_secure_storage/flutter_secure_storage_aurora/lib/flutter_secure_storage_aurora_api.dart
  19. 21
      packages/flutter_secure_storage/flutter_secure_storage_aurora/pubspec.yaml
  20. 2
      packages/package_info_plus/package_info_plus_aurora/pubspec.yaml
  21. 26
      packages/path_provider/path_provider_aurora/pubspec.yaml
  22. 16
      packages/shared_preferences/shared_preferences_aurora/pubspec.yaml
  23. 4
      packages/sqflite/sqflite_aurora/pubspec.yaml
  24. 30
      packages/wakelock/wakelock_aurora/.gitignore
  25. 31
      packages/wakelock/wakelock_aurora/README.md
  26. 4
      packages/wakelock/wakelock_aurora/analysis_options.yaml
  27. 10
      packages/wakelock/wakelock_aurora/data/com.nokia.mce.request.xml
  28. 20
      packages/wakelock/wakelock_aurora/lib/com_nokia_mce_request.dart
  29. 40
      packages/wakelock/wakelock_aurora/lib/wakelock_aurora.dart
  30. 28
      packages/wakelock/wakelock_aurora/pubspec.yaml
  31. 2
      packages/xdga_directories/pubspec.yaml

60
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` | | [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) | `8.2.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_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_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) | `8.0.0` | `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) | `3.1.2` | `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.0.15` | `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` | | [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` | | [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` |
| [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` |
| [xdga_directories](https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/xdga_directories) | `0.0.1` | - | - | `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` | | - | - | [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.2.3 | `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) | 4.0.4 | `4.0.2.269` | | - | - | [google_fonts](https://pub.dev/packages/google_fonts) | `6.1.0` | `4.0.2.269` |
## Пакеты Flutter ## Пакеты Flutter
Список проверенных на совместимость и работоспособность в ОС Аврора пакетов Flutter не являющиеся платформо-зависимыми. Список проверенных на совместимость и работоспособность в ОС Аврора пакетов Flutter не являющиеся платформо-зависимыми.
| Внешний плагин | Версия | Версия ОС Аврора | | Внешний плагин | Версия | Версия ОС Аврора |
|-------------------------------------------------------------------------------------|---------|--------------------| |-------------------------------------------------------------------------------------|------------|--------------------|
| [crypto](https://pub.dev/packages/crypto) | 3.0.2 | `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.5 | `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.0 | `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.17.0 | `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` | | [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` | | [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` | | [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` | | [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` | | [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` | | [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.3.3 | `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.2.0 | `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.0 | `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.6.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` | | [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` | | [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` | | [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` |
## Вклад ## Вклад

4
example/lib/l10n/app_ru.arb

@ -190,7 +190,7 @@
"@_HOME_SCREEN": {}, "@_HOME_SCREEN": {},
"homePageTitle": "Flutter ОС Аврора", "homePageTitle": "Flutter ОС Аврора",
"homeWelcomeTitle": "Приветствую!", "homeWelcomeTitle": "Приветствую!",
"homeWelcomeText": "В этом приложении вы можете найти {count} плагинов Flutter, поддерживающих ОС Aurora. Если вдруг вам чего-то не хватает, вы можете написать нам или добавить самостоятельно.", "homeWelcomeText": "В этом приложении вы можете найти {count} плагина Flutter, поддерживающих ОС Aurora. Если вдруг вам чего-то не хватает, вы можете написать нам или добавить самостоятельно.",
"@homeWelcomeText": { "@homeWelcomeText": {
"placeholders": { "placeholders": {
"count": { "count": {
@ -213,6 +213,6 @@
"homeSearchTitle": "Поиск...", "homeSearchTitle": "Поиск...",
"homeSearch": "Поиск пакетов", "homeSearch": "Поиск пакетов",
"homeNotFoundTitle": "Не найдено", "homeNotFoundTitle": "Не найдено",
"homeNotFoundSubtitle": "То что вы искали нет в списке провереных плагинов, но это не означает что он работать не будет, проверьте его и возможно вы захотите добавить его в этот список проверенных плагинов.", "homeNotFoundSubtitle": "То что вы искали нет в списке проверенных плагинов, но это не означает что он работать не будет, проверьте его и возможно вы захотите добавить его в этот список проверенных плагинов.",
"homeFilter": "Фильтр" "homeFilter": "Фильтр"
} }

5
example/lib/packages/flutter_secure_storage/model.dart

@ -48,6 +48,7 @@ class FlutterSecureStorageModel extends Model {
// Read data // Read data
_readValue = await _secureStorage.read(key: key) ?? "Not found"; _readValue = await _secureStorage.read(key: key) ?? "Not found";
} catch (e) { } catch (e) {
debugPrint(e.toString());
_readValue = "Error password"; _readValue = "Error password";
} }
notifyListeners(); notifyListeners();
@ -83,10 +84,6 @@ class FlutterSecureStorageModel extends Model {
void _updateByPassword( void _updateByPassword(
String password, 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( FlutterSecureStorageAurora.setSecret(
_getPasswordFromString(password), _getPasswordFromString(password),
); );

4
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/scoped_model/package.dart';
import 'package:flutter_example_packages/packages/shared_preferences/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/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/universal_io/package.dart';
import 'package:flutter_example_packages/packages/wakelock/package.dart';
import 'package:flutter_example_packages/packages/xdga_directories/package.dart'; import 'package:flutter_example_packages/packages/xdga_directories/package.dart';
/// List app packages /// List app packages
@ -68,8 +66,6 @@ final packages = <Package>[
packageScopedModel, packageScopedModel,
packageSharedPreferences, packageSharedPreferences,
packageSqflite, packageSqflite,
packageTranslator,
packageUniversalIO, packageUniversalIO,
packageWakelock,
packageXdgaDirectories, packageXdgaDirectories,
]; ];

2
example/lib/packages/qr_flutter/page.dart

@ -42,7 +42,7 @@ class _QrFlutterPageState extends AppState<QrFlutterPage> {
children: [ children: [
BlockInfoPackage(widget.package), BlockInfoPackage(widget.package),
Center( Center(
child: QrImage( child: QrImageView(
data: '1234567890', data: '1234567890',
version: QrVersions.auto, version: QrVersions.auto,
size: 200.0, size: 200.0,

20
example/lib/packages/translator/model.dart

@ -1,20 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
// 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<TranslatorModel>(context);
final translator = GoogleTranslator();
Future<Translation> translate(
String value,
) async {
return await translator.translate(value, from: 'en', to: 'ru');
}
}

24
example/lib/packages/translator/package.dart

@ -1,24 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
// 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>(() => TranslatorModel());
},
);

57
example/lib/packages/translator/page.dart

@ -1,57 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
// 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<TranslatorPage> createState() => _TranslatorPageState();
}
class _TranslatorPageState extends AppState<TranslatorPage> {
@override
Widget buildWide(
BuildContext context,
MediaQueryData media,
AppLocalizations l10n,
) {
return BlockLayout<TranslatorModel>(
model: getIt<TranslatorModel>(),
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,
),
],
),
),
);
},
);
}
}

42
example/lib/packages/wakelock/model.dart

@ -1,42 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
// 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<WakelockModel>(context);
/// Error
String? _error;
/// Public error
String? get error => _error;
/// Public is error
bool get isError => _error != null;
/// Check is enable Wakelock
Future<bool?> isEnable() async {
try {
return await Wakelock.enabled;
} catch (e) {
_error = e.toString();
}
notifyListeners();
return null;
}
/// Set state Wakelock
Future<void> setStateWakelock(bool enable) async {
try {
await Wakelock.toggle(enable: enable);
} catch (e) {
_error = e.toString();
}
notifyListeners();
}
}

26
example/lib/packages/wakelock/package.dart

@ -1,26 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
// 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>(() => WakelockModel());
},
);

89
example/lib/packages/wakelock/page.dart

@ -1,89 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
// 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<WakelockPage> createState() => _WakelockPageState();
}
class _WakelockPageState extends AppState<WakelockPage> {
@override
Widget buildWide(
BuildContext context,
MediaQueryData media,
AppLocalizations l10n,
) {
return BlockLayout<WakelockModel>(
model: getIt<WakelockModel>(),
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<bool?>(
future: model.isEnable(),
builder: (
BuildContext context,
AsyncSnapshot<bool?> 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);
},
),
);
},
),
],
),
],
),
),
);
},
);
}
}

155
example/pubspec.yaml

@ -9,7 +9,7 @@ publish_to: "none"
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: ">=2.18.6 <3.0.0" sdk: ">=3.1.2 <4.0.0"
dependencies: dependencies:
flutter: flutter:
@ -17,27 +17,27 @@ dependencies:
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
## https://pub.dev/packages/cupertino_icons ## https://pub.dev/packages/cupertino_icons
cupertino_icons: ^1.0.5 cupertino_icons: ^1.0.6
## https://pub.dev/packages/google_fonts ## https://pub.dev/packages/google_fonts
google_fonts: ^4.0.4 google_fonts: ^6.1.0
## https://pub.dev/packages/scoped_model ## https://pub.dev/packages/scoped_model
scoped_model: ^2.0.0 scoped_model: ^2.0.0
## https://pub.dev/packages/get_it ## https://pub.dev/packages/get_it
get_it: ^7.6.0 get_it: ^7.6.4
## https://pub.dev/packages/intl ## https://pub.dev/packages/intl
intl: ^0.17.0 intl: ^0.18.1
## https://pub.dev/packages/universal_io ## https://pub.dev/packages/universal_io
universal_io: ^2.2.0 universal_io: ^2.2.2
## https://pub.dev/packages/crypto ## https://pub.dev/packages/crypto
crypto: ^3.0.2 crypto: ^3.0.3
## https://pub.dev/packages/cached_network_image ## 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 ## 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 ## https://pub.dev/packages/photo_view
photo_view: ^0.14.0 photo_view: ^0.14.0
## https://pub.dev/packages/path ## https://pub.dev/packages/path
path: ^1.8.2 path: ^1.8.3
## https://pub.dev/packages/dartz ## https://pub.dev/packages/dartz
dartz: ^0.10.1 dartz: ^0.10.1
## https://pub.dev/packages/provider ## https://pub.dev/packages/provider
@ -45,127 +45,126 @@ dependencies:
## https://pub.dev/packages/equatable ## https://pub.dev/packages/equatable
equatable: ^2.0.5 equatable: ^2.0.5
## https://pub.dev/packages/qr_flutter ## https://pub.dev/packages/qr_flutter
qr_flutter: ^4.0.0 qr_flutter: ^4.1.0
## https://pub.dev/packages/rxdart ## https://pub.dev/packages/rxdart
rxdart: ^0.27.7 rxdart: ^0.27.7
## https://pub.dev/packages/translator
translator: ^0.1.7
## https://pub.dev/packages/flutter_markdown ## https://pub.dev/packages/flutter_markdown
flutter_markdown: ^0.6.15 flutter_markdown: ^0.6.17+4
## https://pub.dev/packages/freezed_annotation ## https://pub.dev/packages/freezed_annotation
freezed_annotation: ^2.2.0 freezed_annotation: ^2.4.1
## https://pub.dev/packages/json_annotation ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/xdga_directories
xdga_directories: xdga_directories:
git: path: ../packages/xdga_directories
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/xdga_directories # ref: master
# path: packages/xdga_directories
## https://pub.dev/packages/battery_plus ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/battery_plus/battery_plus_aurora
battery_plus_aurora: battery_plus_aurora:
git: path: ../packages/battery_plus/battery_plus_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/battery_plus/battery_plus_aurora # ref: master
# path: packages/battery_plus/battery_plus_aurora
## https://pub.dev/packages/device_info_plus ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/device_info_plus/device_info_plus_aurora
device_info_plus_aurora: device_info_plus_aurora:
git: path: ../packages/device_info_plus/device_info_plus_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/device_info_plus/device_info_plus_aurora # ref: master
# path: packages/device_info_plus/device_info_plus_aurora
## https://pub.dev/packages/flutter_local_notifications ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_local_notifications/flutter_local_notifications_aurora
flutter_local_notifications_aurora: flutter_local_notifications_aurora:
git: path: ../packages/flutter_local_notifications/flutter_local_notifications_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/flutter_local_notifications/flutter_local_notifications_aurora # ref: master
# path: packages/flutter_local_notifications/flutter_local_notifications_aurora
#
## https://pub.dev/packages/flutter_secure_storage ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_secure_storage/flutter_secure_storage_aurora
flutter_secure_storage_aurora: flutter_secure_storage_aurora:
git: path: ../packages/flutter_secure_storage/flutter_secure_storage_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/flutter_secure_storage/flutter_secure_storage_aurora # ref: master
# path: packages/flutter_secure_storage/flutter_secure_storage_aurora
## https://pub.dev/packages/package_info_plus ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/package_info_plus/package_info_plus_aurora
package_info_plus_aurora: package_info_plus_aurora:
git: path: ../packages/package_info_plus/package_info_plus_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/package_info_plus/package_info_plus_aurora # ref: master
# path: packages/package_info_plus/package_info_plus_aurora
## https://pub.dev/packages/path_provider ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/path_provider/path_provider_aurora
path_provider_aurora: path_provider_aurora:
git: path: ../packages/path_provider/path_provider_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/path_provider/path_provider_aurora # ref: master
# path: packages/path_provider/path_provider_aurora
## https://pub.dev/packages/shared_preferences ## https://pub.dev/packages/shared_preferences
shared_preferences: ^2.1.2 shared_preferences: ^2.1.2
## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/shared_preferences/shared_preferences_aurora ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/shared_preferences/shared_preferences_aurora
shared_preferences_aurora: shared_preferences_aurora:
git: path: ../packages/shared_preferences/shared_preferences_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/shared_preferences/shared_preferences_aurora # 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
## https://pub.dev/packages/flutter_keyboard_visibility ## https://pub.dev/packages/flutter_keyboard_visibility
flutter_keyboard_visibility: ^5.4.1 flutter_keyboard_visibility: ^5.4.1
## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora
flutter_keyboard_visibility_aurora: flutter_keyboard_visibility_aurora:
git: path: ../packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora # ref: master
# path: packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora
## https://pub.dev/packages/sqflite ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/sqflite/sqflite_aurora
sqflite_aurora: sqflite_aurora:
git: path: ../packages/sqflite/sqflite_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/sqflite/sqflite_aurora # ref: master
# path: packages/sqflite/sqflite_aurora
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: sdk:
flutter flutter
## https://pub.dev/packages/flutter_lints @todo ## https://pub.dev/packages/flutter_lints
flutter_lints: ^2.0.0 flutter_lints: ^2.0.3
## https://pub.dev/packages/build_runner ## https://pub.dev/packages/build_runner
build_runner: ^2.3.3 build_runner: ^2.4.6
## https://pub.dev/packages/freezed ## https://pub.dev/packages/freezed
freezed: ^2.3.3 freezed: ^2.4.3
## https://pub.dev/packages/json_serializable ## https://pub.dev/packages/json_serializable
json_serializable: ^6.6.1 json_serializable: ^6.7.1
flutter: flutter:
generate: true generate: true

2
packages/battery_plus/battery_plus_aurora/pubspec.yaml

@ -6,7 +6,7 @@ description: The Aurora OS implementation of battery_plus.
version: 0.0.1 version: 0.0.1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:

4
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 version: 0.0.1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
dbus: ^0.7.8 dbus: ^0.7.8
device_info_plus: ^8.2.2 device_info_plus: ^9.0.3
plugin_platform_interface: ^2.0.2 plugin_platform_interface: ^2.0.2
device_info_plus_platform_interface: ^7.0.0 device_info_plus_platform_interface: ^7.0.0

2
packages/flutter_keyboard_visibility/flutter_keyboard_visibility_aurora/pubspec.yaml

@ -6,7 +6,7 @@ description: A new Flutter plugin project.
version: 0.0.1 version: 0.0.1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:

13
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 version: 0.0.1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:
@ -16,13 +16,14 @@ dependencies:
plugin_platform_interface: ^2.0.2 plugin_platform_interface: ^2.0.2
flutter_local_notifications_platform_interface: ^7.0.0 flutter_local_notifications_platform_interface: ^7.0.0
## https://pub.dev/packages/package_info_plus ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/package_info_plus/package_info_plus_aurora
package_info_plus_aurora: package_info_plus_aurora:
git: path: ../../package_info_plus/package_info_plus_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/package_info_plus/package_info_plus_aurora # ref: master
# path: packages/package_info_plus/package_info_plus_aurora
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

4
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/flutter_secure_storage.dart';
import 'package:flutter_secure_storage_aurora/flutter_secure_storage_aurora.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'); FlutterSecureStorageAurora.setSecret('5872747ed1ceda363808efb8b2b18b20');
final storage = const FlutterSecureStorage(); final storage = const FlutterSecureStorage();

23
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/path.dart' as p;
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:encrypt/encrypt.dart' as encrypt; import 'package:encrypt/encrypt.dart' as encrypt;
import 'package:crypto/crypto.dart' as crypto;
class FlutterSecureStorageAuroraApi { class FlutterSecureStorageAuroraApi {
final JsonDecoder decoder = const JsonDecoder(); final JsonDecoder decoder = const JsonDecoder();
@ -87,15 +88,25 @@ class FlutterSecureStorageAuroraApi {
/// Encrypt data in file /// Encrypt data in file
String _encrypt(String value) { String _encrypt(String value) {
final key = encrypt.Key.fromUtf8(_secret); var ivStr = crypto.sha256.convert(utf8.encode(_secret)).toString().substring(0, 16);
final iv = encrypt.IV.fromLength(16); var keyStr = crypto.sha256.convert(utf8.encode(_secret)).toString().substring(0, 32);
return encrypt.Encrypter(encrypt.AES(key)).encrypt(value, iv: iv).base64;
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 /// Decrypt data in file
String _decrypt(String value) { String _decrypt(String value) {
final key = encrypt.Key.fromUtf8(_secret); var ivStr = crypto.sha256.convert(utf8.encode(_secret)).toString().substring(0, 16);
final iv = encrypt.IV.fromLength(16); var keyStr = crypto.sha256.convert(utf8.encode(_secret)).toString().substring(0, 32);
return encrypt.Encrypter(encrypt.AES(key)).decrypt64(value, iv: iv);
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);
} }
} }

21
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 version: 0.0.1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
encrypt: ^5.0.1
plugin_platform_interface: ^2.0.2 plugin_platform_interface: ^2.0.2
flutter_secure_storage_platform_interface: ^1.0.1 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 ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/path_provider/path_provider_aurora
path_provider_aurora: path_provider_aurora:
git: path: ../../path_provider/path_provider_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/path_provider/path_provider_aurora # ref: master
# path: packages/path_provider/path_provider_aurora
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

2
packages/package_info_plus/package_info_plus_aurora/pubspec.yaml

@ -6,7 +6,7 @@ description: A new Flutter plugin project.
version: 0.0.1 version: 0.0.1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:

26
packages/path_provider/path_provider_aurora/pubspec.yaml

@ -6,31 +6,33 @@ description: The Aurora OS implementation of path_provider.
version: 0.0.1 version: 0.0.1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
path: ^1.8.2 path: ^1.8.3
plugin_platform_interface: ^2.0.2 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/xdga_directories
xdga_directories: xdga_directories:
git: path: ../../xdga_directories
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/xdga_directories # ref: master
# path: packages/xdga_directories
## https://pub.dev/packages/package_info_plus ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/package_info_plus/package_info_plus_aurora
package_info_plus_aurora: package_info_plus_aurora:
git: path: ../../package_info_plus/package_info_plus_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/package_info_plus/package_info_plus_aurora # ref: master
# path: packages/package_info_plus/package_info_plus_aurora
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

16
packages/shared_preferences/shared_preferences_aurora/pubspec.yaml

@ -6,7 +6,7 @@ description: The Aurora OS implementation of shared_preferences.
version: 0.0.1 version: 0.0.1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:
@ -15,16 +15,16 @@ dependencies:
plugin_platform_interface: ^2.0.2 plugin_platform_interface: ^2.0.2
shared_preferences: ^2.1.1 shared_preferences: ^2.1.1
shared_preferences_platform_interface: ^2.2.0 shared_preferences_platform_interface: ^2.2.0
path: ^1.8.2 path: ^1.8.3
## https://pub.dev/packages/path_provider ## 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 ## https://gitlab.com/omprussia/flutter/flutter-plugins/-/tree/master/packages/path_provider/path_provider_aurora
path_provider_aurora: path_provider_aurora:
git: path: ../../path_provider/path_provider_aurora
url: https://gitlab.com/omprussia/flutter/flutter-plugins.git # git:
ref: master # url: https://gitlab.com/omprussia/flutter/flutter-plugins.git
path: packages/path_provider/path_provider_aurora # ref: master
# path: packages/path_provider/path_provider_aurora
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

4
packages/sqflite/sqflite_aurora/pubspec.yaml

@ -6,13 +6,13 @@ description: The Aurora OS implementation of sqflite.
version: 2.2.6+aurora1 version: 2.2.6+aurora1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
sqflite: ^2.2.6 sqflite: ^2.3.0
flutter: flutter:
plugin: plugin:

30
packages/wakelock/wakelock_aurora/.gitignore vendored

@ -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/

31
packages/wakelock/wakelock_aurora/README.md

@ -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();
```

4
packages/wakelock/wakelock_aurora/analysis_options.yaml

@ -1,4 +0,0 @@
# SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
# SPDX-License-Identifier: BSD-3-Clause
include: package:flutter_lints/flutter.yaml

10
packages/wakelock/wakelock_aurora/data/com.nokia.mce.request.xml

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE node PUBLIC
"-//freedesktop//DTD D-Bus Object Introspection 1.0//EN"
"http://standards.freedesktop.org/dbus/1.0/introspect.dtd">
<node name="/com/nokia/mce/request">
<interface name="com.nokia.mce.request">
<method name="req_display_blanking_pause">
</method>
</interface>
</node>

20
packages/wakelock/wakelock_aurora/lib/com_nokia_mce_request.dart

@ -1,20 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
// 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<void> 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);
}
}

40
packages/wakelock/wakelock_aurora/lib/wakelock_aurora.dart

@ -1,40 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
// 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<void> 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<bool> get enabled async {
return _enable;
}
}

28
packages/wakelock/wakelock_aurora/pubspec.yaml

@ -1,28 +0,0 @@
# SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
# 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

2
packages/xdga_directories/pubspec.yaml

@ -6,7 +6,7 @@ description: Plugin for Aurora OS like xdg_directories
version: 0.0.1 version: 0.0.1
environment: environment:
sdk: '>=2.18.6 <3.0.0' sdk: '>=2.18.6 <4.0.0'
flutter: ">=3.0.0" flutter: ">=3.0.0"
dependencies: dependencies:

Loading…
Cancel
Save