Skip to content

Restore marketplace - #229

Merged
JuliusCaesarCrypto merged 2 commits into
devfrom
restore-marketplace
Jul 13, 2026
Merged

Restore marketplace#229
JuliusCaesarCrypto merged 2 commits into
devfrom
restore-marketplace

Conversation

@JuliusCaesarCrypto

Copy link
Copy Markdown
Contributor

Change Description

Briefly describe what this PR does and why. Keep it short and clear.


Related Platforms

Which platforms are affected by your changes? Check only the ones you actually tested.

  • Android
  • iOS
  • iPad
  • Windows
  • Linux
  • Android TV
  • OpenWrt

Verification Checklist

Make sure the things you checked actually work. It's okay if you didn't test everything.

  • Project builds successfully
  • App runs without crashes on tested platforms
  • VPN connection works correctly
  • No obvious regressions observed
  • Documentation updated (if needed)

Optional (for bigger changes)

  • Added or updated unit / E2E tests
  • Checked security and edge cases

Related Links

Closes #ID.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores/introduces a “marketplace”-style section on the Settings screen by adding horizontally scrollable Premium and Donate widgets, including helper logic to auto-scroll the slider so a tapped card is brought into view before executing its action.

Changes:

  • Added Premium/Donate widgets to SettingsScreen via a new horizontal slider section.
  • Introduced horizontal ScrollController plus visibility/auto-scroll helpers to support “tap to reveal then act”.
  • Adjusted vertical spacing around the header/settings content to accommodate the new section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +100 to +120
final size = renderBox.size;
final offset = renderBox.localToGlobal(Offset.zero);

// Get the scroll position
final scrollOffset = _horizontalSliderScrollController.offset;

// The widget's center in content coordinates
final widgetCenterInContent = offset.dx + scrollOffset + (size.width / 2);

// Get the viewport bounds
final viewportLeft = scrollOffset;
final viewportRight =
scrollOffset +
_horizontalSliderScrollController.position.viewportDimension;

// Check if widget's CENTER is within viewport (more lenient, allows partial visibility)
final isVisible =
widgetCenterInContent >= viewportLeft &&
widgetCenterInContent <= viewportRight;

return isVisible;
Comment on lines +276 to +296
final size = renderBox.size;
final offset = renderBox.localToGlobal(Offset.zero);
final scrollOffset = _horizontalSliderScrollController.offset;
final viewportWidth =
_horizontalSliderScrollController.position.viewportDimension;

// Widget's position in content coordinates
final widgetLeftInContent = offset.dx + scrollOffset;
final widgetCenterInContent = widgetLeftInContent + (size.width / 2);

// Calculate scroll offset to center the widget
final newScrollOffset = widgetCenterInContent - (viewportWidth / 2);

_horizontalSliderScrollController.animateTo(
newScrollOffset.clamp(
_horizontalSliderScrollController.position.minScrollExtent,
_horizontalSliderScrollController.position.maxScrollExtent,
),
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut,
);
Comment on lines +321 to +327
return Listener(
onPointerMove: (event) {},
onPointerSignal: (event) {},
child: NotificationListener<ScrollUpdateNotification>(
onNotification: (notification) {
return false;
},
@JuliusCaesarCrypto JuliusCaesarCrypto added the bug Something isn't working label Jul 13, 2026
@JuliusCaesarCrypto
JuliusCaesarCrypto merged commit 3b3f2a7 into dev Jul 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants