Skip to content

radius not respected by items #96

@macMikey

Description

@macMikey

Describe the bug
the items in the control are overflowing the border of the border

To Reproduce

ToggleSwitch(
        cornerRadius: 20,
        radiusStyle: true,
        minWidth: 150,
        minHeight: 70.0,
        fontSize: 24.0,
        initialLabelIndex: theme.isBlueTheme ? 0 : 1,
        activeFgColor: Colors.black,
        inactiveFgColor: theme.primary,
        totalSwitches: 2,
        labels: const ['Blue', 'Orange'],
        activeBgColors: [
          [BlueThemeColors.primary],
          [OrangeThemeColors.primary],
        ],
        inactiveBgColor: theme.primaryBackground,
        borderColor: [theme.primaryText],
        borderWidth: 1.0,
        onToggle: (index) {
          if (index != null && index != (theme.isBlueTheme ? 0 : 1)) {
            theme.toggleTheme();
          }

Expected behavior
items contained by border

Screenshots
Screenshot 2024-12-24 at 10 44 10
Screenshot 2024-12-24 at 10 44 03

Additional information

  • toggle_switch version
    2.3.0
  • flutter doctor -v
    [✓] Flutter (Channel stable, 3.27.1, on macOS 13.7.2 22H313 darwin-arm64, locale en-US)
    • Flutter version 3.27.1 on channel stable at /Users/me/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (8 days ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/me/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
• Xcode at /Applications/XCode.app/Contents/Developer
• Build 15A507
• CocoaPods version 1.15.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.96.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.102.0

[✓] Connected device (4 available)
• iPad mini 4 (mobile) • A79CB20F-1F73-4724-B3DE-1B1C3194D0F7 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.7.2 22H313 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 13.7.2 22H313 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.205
! Error: Browsing on the local area network for Mikey’s Old Pro. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
• All expected network resources are available.

• No issues found!

  • Any other additional information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions