Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Deprecated warnings fixed #942

Draft
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion packages/at_common_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,91 @@
## 2.0.15

- **FIX**: Replace depreciated `withOpacity` method with `withValues`

## 2.0.14

- **CHORE**: Addressed static analysis info and warning messages to improve code quality and reduce noise during analysis.
- **FIX**: Replace depreciated items with up-to-date-ones

## 2.0.13:

- **CHORE**: Major version increase of at_commons from ^3.0.55 to ^4.0.1

## 2.0.12

- **CHORE**: Updated repository URL

## 2.0.11

- **CHORE**: Updated dependencies and android gradle versions

## 2.0.10

- **CHORE**: Updated readme

## 2.0.9

- **FIX**: Minor UI updates
- **CHORE**: Updated dependency

## 2.0.8

- **FIX**: Lint Fixes according to flutter 3.0

## 2.0.7

- **FIX**: Added missing fontWeight

## 2.0.6

- **DOCS**: Documentation updated

## 2.0.5

- **DOCS**: Updated Readme.md and example.md
- **CHORE**: Updated example to demonstrate inheriting theme from calling app

## 2.0.4

- **FEAT**: Added check for mobile, tablet and desktop in SizeConfig

## 2.0.3

- **FEAT**: Added `isDesktop` check in CustomAppBar

## 2.0.2

- **FEAT**: borderRadius option added in CustomButton

## 2.0.1

- **UPDATE**: Updated description, repository link
- **FEAT**: More options in CustomInputField

## 2.0.0

- **UPDATE**: Null safety support

## 1.0.1

- **DOCS**: Updated documentation

## 1.0.0

- **CHORE**: Updated authentication in example app

## 0.0.4

- **CHORE**: Updated example app

## 0.0.3

- **CHORE**: Updated with example app

## 0.0.2

- **BREAKING CHANGES**: This release consists of parameter change in custom button and custom input field

## 0.0.1

- The initial release consists of custom appBar, custom button and custom input field
4 changes: 2 additions & 2 deletions packages/at_common_flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ class _MyHomePageState extends State<MyHomePage> {
log('Current value of input field: $val');
},
inputFieldColor: Theme.of(context).brightness == Brightness.light
? Colors.black.withOpacity(0.2)
: Colors.white.withOpacity(0.2),
? Colors.black.withValues(alpha: 0.2)
: Colors.white.withValues(alpha: 0.2),
),
const Divider(
color: Color(0xFFBEC0C8),
Expand Down
2 changes: 1 addition & 1 deletion packages/at_common_flutter/example/macos/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :osx, '10.11'
platform :osx, '10.14'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXAggregateTarget section */
Expand Down Expand Up @@ -182,7 +182,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
Expand Down Expand Up @@ -235,6 +235,7 @@
/* Begin PBXShellScriptBuildPhase section */
3399D490228B24CF009A79C7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -344,7 +345,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -423,7 +424,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -470,7 +471,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Cocoa
import FlutterMacOS

@NSApplicationMain
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
2 changes: 1 addition & 1 deletion packages/at_common_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: at_common_flutter
description: A Flutter package to provide common widgets used by other atPlatform Flutter packages.
version: 2.0.14
version: 2.0.15
homepage: https://docs.atsign.com/
repository: https://github.com/atsign-foundation/at_widgets/tree/trunk/packages/at_common_flutter
issue_tracker: https://github.com/atsign-foundation/at_widgets/issues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import share_plus
import shared_preferences_foundation
import sqflite
import url_launcher_macos
import webview_flutter_wkwebview

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileSaverPlugin.register(with: registry.registrar(forPlugin: "FileSaverPlugin"))
Expand All @@ -29,4 +30,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin"))
}
6 changes: 6 additions & 0 deletions packages/at_onboarding_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
## 6.1.10

- **FIX** Replace depreciated `withOpacity` method with `withValues`.

## 6.1.9

- build[deps]: Upgraded dependencies for the following packages:
- at_client: 3.2.2
- at_client_mobile: 3.2.19
- at_auth: 2.0.7
- at_commons: 5.0.0
- at_utils: 3.0.19

## 6.1.8

- **CHORE**: Updated dependencies
Expand Down
4 changes: 2 additions & 2 deletions packages/at_onboarding_flutter/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_keychain: 01aabf894ffe8b01adfda1d9df21c210c1b4b452
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
Expand Down
8 changes: 4 additions & 4 deletions packages/at_onboarding_flutter/example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ SPEC CHECKSUMS:
at_file_saver: 1fc6ed722f17c7a20ce79cce168d1100fcad4b95
biometric_storage: 43caa6e7ef00e8e19c074216e7e1786dacda9e76
device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720
file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2
file_selector_macos: cc3858c981fe6889f364731200d6232dac1d812d
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c
package_info_plus: 12f1c5c2cfe8727ca46cbd0b26677728972d9a5b
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
share_plus: 36537c04ce0c3e3f5bd297ce4318b6d5ee5fd6cf
share_plus: 1fa619de8392a4398bfaf176d441853922614e89
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399
url_launcher_macos: c82c93949963e55b228a30115bd219499a6fe404
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4

PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ class AtOnboardingGenerateScreen extends StatefulWidget {
}) : super(key: key);

@override
State<AtOnboardingGenerateScreen> createState() =>
_AtOnboardingGenerateScreenState();
State<AtOnboardingGenerateScreen> createState() => _AtOnboardingGenerateScreenState();
}

class _AtOnboardingGenerateScreenState
extends State<AtOnboardingGenerateScreen> {
class _AtOnboardingGenerateScreenState extends State<AtOnboardingGenerateScreen> {
final TextEditingController _atsignController = TextEditingController();
final FreeAtsignService _freeAtsignService = FreeAtsignService();
late AtSyncDialog _inprogressDialog;
Expand Down Expand Up @@ -80,16 +78,14 @@ class _AtOnboardingGenerateScreenState
if (widget.config.tutorialDisplay == AtOnboardingTutorialDisplay.always) {
await Future.delayed(const Duration(milliseconds: 300));
_showTutorial();
} else if (widget.config.tutorialDisplay ==
AtOnboardingTutorialDisplay.never) {
} else if (widget.config.tutorialDisplay == AtOnboardingTutorialDisplay.never) {
return;
} else {
final result = await AtOnboardingTutorialService.checkShowTutorial();
if (!result) {
await Future.delayed(const Duration(milliseconds: 300));

final result =
await AtOnboardingTutorialService.hasShowTutorialSignUp();
final result = await AtOnboardingTutorialService.hasShowTutorialSignUp();
if (!result) {
_showTutorial();
}
Expand Down Expand Up @@ -218,9 +214,8 @@ class _AtOnboardingGenerateScreenState
child: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(
color: theme.primaryColor.withOpacity(0.1),
borderRadius:
BorderRadius.circular(AtOnboardingDimens.borderRadius)),
color: theme.primaryColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(AtOnboardingDimens.borderRadius)),
padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal),
margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal),
constraints: const BoxConstraints(
Expand All @@ -243,8 +238,7 @@ class _AtOnboardingGenerateScreenState
enabled: false,
validator: (String? value) {
if ((value ?? '').isEmpty) {
return AtOnboardingLocalizations
.current.msg_atSign_cannot_empty;
return AtOnboardingLocalizations.current.msg_atSign_cannot_empty;
}
return null;
},
Expand All @@ -260,8 +254,7 @@ class _AtOnboardingGenerateScreenState
color: theme.primaryColor,
),
),
contentPadding: const EdgeInsets.symmetric(
horizontal: AtOnboardingDimens.paddingSmall),
contentPadding: const EdgeInsets.symmetric(horizontal: AtOnboardingDimens.paddingSmall),
),
),
const SizedBox(height: 20),
Expand Down Expand Up @@ -355,8 +348,7 @@ class _AtOnboardingGenerateScreenState
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
child: Text(
AtOnboardingLocalizations
.current.btn_already_have_atSign,
AtOnboardingLocalizations.current.btn_already_have_atSign,
key: keyHaveAnAtSign,
style: TextStyle(
fontSize: AtOnboardingDimens.fontNormal,
Expand Down Expand Up @@ -402,10 +394,8 @@ class _AtOnboardingGenerateScreenState
}

Future<void> showErrorDialog(dynamic errorMessage, {String? title}) async {
String? messageString =
AtOnboardingErrorToString().getErrorMessage(errorMessage);
return AtOnboardingDialog.showError(
context: context, message: messageString);
String? messageString = AtOnboardingErrorToString().getErrorMessage(errorMessage);
return AtOnboardingDialog.showError(context: context, message: messageString);
}

void _showReferenceWebview() {
Expand Down Expand Up @@ -467,8 +457,7 @@ class _AtOnboardingGenerateScreenState

if (isExist) {
_inprogressDialog.close();
await _showAlertDialog(
AtOnboardingErrorToString().pairedAtsign(verifiedAtSign));
await _showAlertDialog(AtOnboardingErrorToString().pairedAtsign(verifiedAtSign));
return;
}

Expand All @@ -492,8 +481,7 @@ class _AtOnboardingGenerateScreenState
);

if (!mounted) return;
Navigator.pop(
context, AtOnboardingResult.success(atsign: verifiedAtSign));
Navigator.pop(context, AtOnboardingResult.success(atsign: verifiedAtSign));
} else if (authResponse == AtOnboardingResponseStatus.serverNotReached) {
await _showAlertDialog(
AtOnboardingLocalizations.current.msg_atSign_unreachable,
Expand Down Expand Up @@ -531,9 +519,7 @@ class _AtOnboardingGenerateScreenState
}

Future<void> _showAlertDialog(dynamic errorMessage, {String? title}) async {
String? messageString =
AtOnboardingErrorToString().getErrorMessage(errorMessage);
return AtOnboardingDialog.showError(
context: context, title: title, message: messageString);
String? messageString = AtOnboardingErrorToString().getErrorMessage(errorMessage);
return AtOnboardingDialog.showError(context: context, title: title, message: messageString);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class _AtOnboardingHomeScreenState extends State<AtOnboardingHomeScreen> {
child: Container(
// width: _dialogWidth,
decoration: BoxDecoration(
color: theme.primaryColor.withOpacity(0.1),
color: theme.primaryColor.withValues(alpha: .1),
borderRadius: BorderRadius.circular(AtOnboardingDimens.borderRadius)),
padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal),
margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal),
Expand Down
Loading
Loading