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

Issue with Flutter 3.19 #72

Open
razer-santhosh opened this issue Feb 17, 2024 · 6 comments
Open

Issue with Flutter 3.19 #72

razer-santhosh opened this issue Feb 17, 2024 · 6 comments

Comments

@razer-santhosh
Copy link

when i use the below code

RoundedLoadingButton(
controller: loginBtn,
onPressed: () {
if (formKey.currentState!.validate()) {
loginBtn.success();
} else {
loginBtn.error();
}
Future.delayed(const Duration(seconds: 1), () {
loginBtn.reset();
});
},
successColor: Colors.green,
child: Text('Login'.hardcoded))

the code works fine in flutter 3.16 without any issue and when i upgraded to 3.19 it shows the following error with build failed result.

../../.pub-cache/hosted/pub.dev/rounded_loading_button-2.1.0/lib/rounded_loading_button.dart:197:11: Error: No named parameter with the name 'onSurface'.
onSurface: widget.disabledColor,
^^^^^^^^^
../../Flutter_SDK/packages/flutter/lib/src/material/elevated_button.dart:151:22: Context: Found this candidate, but the arguments don't match.
static ButtonStyle styleFrom({
^^^^^^^^^
Target kernel_snapshot failed: Exception

@yoavslamamobi
Copy link

Got the same problem. Please help

@cpc6128
Copy link

cpc6128 commented Feb 19, 2024

And if you're in a hurry... You can replace in your pubspec.yaml :

  rounded_loading_button:
    git:
      url: https://github.com/scopendo/flutter_rounded_loading_button.git
      ref: master

@PabloCir
Copy link

new version: rounded loading button plus:
https://pub.dev/packages/rounded_loading_button_plus

@Shahabmustafa
Copy link

upgrade your flutter packages

@razer-santhosh
Copy link
Author

razer-santhosh commented Mar 3, 2024

rounded_loading_button.dart

final _btn = ButtonTheme(
shape: RoundedRectangleBorder(borderRadius: _borderAnimation.value),
disabledColor: widget.disabledColor,
padding: const EdgeInsets.all(0),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
// onSurface: widget.disabledColor,
disabledForegroundColor: widget.disabledColor,
minimumSize: Size(_squeezeAnimation.value, widget.height),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(widget.borderRadius),
),
// primary: widget.color,
backgroundColor: widget.color,
elevation: widget.elevation,
padding: const EdgeInsets.all(0),
),
onPressed: widget.onPressed == null ? null : _btnPressed,
child: childStream,
),
);
Instead of onSurface and primary use disabledForegroundColor & backgroundColor - then the problem solved. Then, I wonder why they still didn't do it and give the patch update

@Shahabmustafa
Copy link

Screenshot 2024-03-04 at 1 51 19 PM

this package is not working

rounded_loading_button 2.1.0
[ANALYSIS ISSUE]

use this package
flutter_social_media_button: ^0.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants