figma_squircle icon indicating copy to clipboard operation
figma_squircle copied to clipboard

SmoothRectangleBorder doesnt complete with the BoderSide of another SmoothRectangleBorder

Open LenWdk opened this issue 3 years ago • 1 comments

Minimal Code Example:

import 'package:figma_squircle/figma_squircle.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class ASection extends StatelessWidget {
  const ASection({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.stretch,
      children: [
        Container(
          decoration: ShapeDecoration(
            color: Colors.blue,
            shape: SmoothRectangleBorder(
              borderRadius: SmoothBorderRadius.only(
                topLeft: SmoothRadius(
                  cornerRadius: 10,
                  cornerSmoothing: 0.5,
                ),
                topRight: SmoothRadius(
                  cornerRadius: 10,
                  cornerSmoothing: 0.5,
                ),
              ),
            ),
          ),
          height: 48,
        ),
        Container(
          decoration: ShapeDecoration(
            color: Colors.white,
            shape: SmoothRectangleBorder(
              side: BorderSide(
                color: Colors.green,
              ),
              borderRadius: SmoothBorderRadius.only(
                bottomLeft: SmoothRadius(
                  cornerRadius: 10,
                  cornerSmoothing: 0.5,
                ),
                bottomRight: SmoothRadius(
                  cornerRadius: 10,
                  cornerSmoothing: 0.5,
                ),
              ),
            ),
          ),
          height: 48,
        )
      ],
    );
  }
}

Bildschirmfoto 2021-11-05 um 16 04 55

If you are using BoxDecorations this does not happen. I think its because SmoothRectangleBorder extends OutlinedBorder

LenWdk avatar Nov 05 '21 15:11 LenWdk

#3

LenWdk avatar Nov 05 '21 15:11 LenWdk