Skip to content

Commit

Permalink
fix: Replace depreciated withOpacity method with withValues.
Browse files Browse the repository at this point in the history
  • Loading branch information
CurtlyCritchlow committed Nov 20, 2024
1 parent 7554f3d commit 8732c8a
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 145 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ class AtOnboardingInputAtSignScreen extends StatefulWidget {
}) : super(key: key);

@override
State<AtOnboardingInputAtSignScreen> createState() =>
_AtOnboardingInputAtSignScreenState();
State<AtOnboardingInputAtSignScreen> createState() => _AtOnboardingInputAtSignScreenState();
}

class _AtOnboardingInputAtSignScreenState
extends State<AtOnboardingInputAtSignScreen> {
class _AtOnboardingInputAtSignScreenState extends State<AtOnboardingInputAtSignScreen> {
final TextEditingController _atsignController = TextEditingController();

@override
Expand Down Expand Up @@ -55,9 +53,8 @@ class _AtOnboardingInputAtSignScreenState
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 @@ -77,8 +74,7 @@ class _AtOnboardingInputAtSignScreenState
),
const SizedBox(height: 2),
Text(
AtOnboardingLocalizations
.current.enter_atSign_need_to_activate,
AtOnboardingLocalizations.current.enter_atSign_need_to_activate,
style: const TextStyle(
fontSize: AtOnboardingDimens.fontSmall,
),
Expand All @@ -88,8 +84,7 @@ class _AtOnboardingInputAtSignScreenState
enabled: true,
validator: (String? value) {
if ((value ?? '').isEmpty) {
return AtOnboardingLocalizations
.current.msg_atSign_cannot_empty;
return AtOnboardingLocalizations.current.msg_atSign_cannot_empty;
}
return null;
},
Expand All @@ -105,8 +100,7 @@ class _AtOnboardingInputAtSignScreenState
color: theme.primaryColor,
),
),
contentPadding: const EdgeInsets.symmetric(
horizontal: AtOnboardingDimens.paddingSmall),
contentPadding: const EdgeInsets.symmetric(horizontal: AtOnboardingDimens.paddingSmall),
),
),
const SizedBox(height: 20),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ class AtOnboardingIntroScreen extends StatefulWidget {
}) : super(key: key);

@override
State<AtOnboardingIntroScreen> createState() =>
_AtOnboardingIntroScreenState();
State<AtOnboardingIntroScreen> createState() => _AtOnboardingIntroScreenState();
}

class _AtOnboardingIntroScreenState extends State<AtOnboardingIntroScreen> {
Expand Down Expand Up @@ -59,9 +58,8 @@ class _AtOnboardingIntroScreenState extends State<AtOnboardingIntroScreen> {
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 @@ -85,8 +83,7 @@ class _AtOnboardingIntroScreenState extends State<AtOnboardingIntroScreen> {
color: theme.primaryColor,
decoration: TextDecoration.underline,
),
recognizer: TapGestureRecognizer()
..onTap = _showReferenceWebview,
recognizer: TapGestureRecognizer()..onTap = _showReferenceWebview,
),
],
),
Expand Down
Loading

0 comments on commit 8732c8a

Please sign in to comment.