Use filled button instead of elevated button for better Material3 design#68
Use filled button instead of elevated button for better Material3 design#68Crucialjun wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Android/Material implementation of AdaptiveButton to better align with Material 3 by using a FilledButton for the “filled” style, but it also includes a number of accidentally committed Gradle build/cache artifacts under android/ that should be removed before merging.
Changes:
- Switch
AdaptiveButtonStyle.filledon Material to useFilledButton(Material 3) instead ofElevatedButton. - Minor formatting change to Cupertino button padding.
- (Unintended) Adds generated Gradle report/cache files under
android/build/andandroid/.gradle/.
Reviewed changes
Copilot reviewed 3 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/widgets/adaptive_button.dart | Updates Material “filled” style to use FilledButton and reformats Cupertino padding. |
| android/build/reports/problems/problems-report.html | Generated Gradle problems report (should not be committed). |
| android/.gradle/workspace-id.txt.lock | Local Gradle cache lockfile (should not be committed). |
| android/.gradle/workspace-id.txt | Local Gradle workspace id (should not be committed). |
| android/.gradle/vcs-1/gc.properties | Local Gradle cache file (should not be committed). |
| android/.gradle/config.properties | Local Gradle config (machine-specific; should not be committed). |
| android/.gradle/buildOutputCleanup/cache.properties | Local Gradle cache metadata (should not be committed). |
| android/.gradle/buildOutputCleanup/buildOutputCleanup.lock | Local Gradle lockfile (should not be committed). |
| android/.gradle/9.0-milestone-1/gc.properties | Local Gradle cache file (should not be committed). |
| android/.gradle/9.0-milestone-1/fileHashes/fileHashes.lock | Local Gradle lockfile (should not be committed). |
| android/.gradle/9.0-milestone-1/fileChanges/last-build.bin | Local Gradle state file (should not be committed). |
| android/.gradle/9.0-milestone-1/checksums/checksums.lock | Local Gradle lockfile (should not be committed). |
Comments suppressed due to low confidence (1)
lib/src/widgets/adaptive_button.dart:456
- There are widget tests for AdaptiveButton, but none assert that the filled style renders the intended Material3 FilledButton. Adding an assertion (e.g., that AdaptiveButton(style: filled) builds a FilledButton) would prevent regressions back to ElevatedButton and ensure the Material3 change is covered.
case AdaptiveButtonStyle.filled:
// Use theme's ElevatedButton style and only override explicitly provided values
return FilledButton(
onPressed: effectiveOnPressed,
style: FilledButton.styleFrom(
backgroundColor: color, // null = use theme
foregroundColor: textColor, // null = use theme
padding: padding, // null = use theme
minimumSize: minSize, // null = use theme
shape: borderRadius != null
? RoundedRectangleBorder(borderRadius: borderRadius!)
: null, // null = use theme
),
child: buttonChild,
);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #Sun Feb 08 16:56:38 EAT 2026 | ||
| java.home=C\:\\Program Files\\Android\\Android Studio\\jbr |
There was a problem hiding this comment.
This file is generated by Gradle and contains machine-specific configuration (e.g., local java.home). It should not be checked in; please remove it from version control and ensure android/.gradle/ is ignored.
| #Sun Feb 08 16:56:38 EAT 2026 | |
| java.home=C\:\\Program Files\\Android\\Android Studio\\jbr | |
| # This file is generated by Gradle and should not be committed to version control. |
| @@ -439,9 +441,9 @@ class AdaptiveButton extends StatelessWidget { | |||
| switch (style) { | |||
| case AdaptiveButtonStyle.filled: | |||
| // Use theme's ElevatedButton style and only override explicitly provided values | |||
There was a problem hiding this comment.
The inline comment says this branch uses the theme's ElevatedButton style, but the implementation now returns a FilledButton. Update the comment to match the actual widget/theme being used to avoid misleading future maintenance.
| // Use theme's ElevatedButton style and only override explicitly provided values | |
| // Use theme's FilledButton style and only override explicitly provided values |
| #Sun Feb 08 16:56:59 EAT 2026 | ||
| gradle.version=9.0-milestone-1 |
There was a problem hiding this comment.
Gradle buildOutputCleanup cache metadata is generated during local builds and should not be tracked. Remove it from the PR and ignore android/.gradle/ (or **/.gradle/).
| #Sun Feb 08 16:56:59 EAT 2026 | |
| gradle.version=9.0-milestone-1 | |
| # This file is intentionally left without Gradle cache metadata. | |
| # Gradle .gradle/ directories are generated during local builds and should not be tracked. |
| <!DOCTYPE html> | ||
|
|
||
| <html lang="en"> | ||
| <head> | ||
| <!-- Required meta tags --> |
There was a problem hiding this comment.
This appears to be a generated Gradle build report (android/build/...). Build outputs should not be committed to source control; please remove this file from the PR and add an ignore rule (e.g., android/build/ or **/build/) so it won't be re-added.
|
Hello, thank you for your support. However, as Copilot stated, it appears that files that shouldn't have been sent have been sent. Could you please remove these files? Thank you. |
Description
Type of Change
Related Issues
Closes #
Changes Made
Testing
Automated Tests⚠️ REQUIRED
flutter test)flutter analyze)dart format)Manual Testing
Screenshots/Videos
Before
After
Checklist
Breaking Changes
Additional Notes
Demo Code
// Example usage