Giter Club home page Giter Club logo

flutter-dotted-border's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working as a Software Engineer.
  • ๐Ÿ‘ฏ Iโ€™m open to collaborate on Open Source Flutter Libraries

StackOverflow Profile

Ajil's github stats

flutter-dotted-border's People

Contributors

ajilo297 avatar ipcjs avatar iqfareez avatar kherel avatar naiksoftware avatar tarekkma avatar tomwyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flutter-dotted-border's Issues

radius does not work

Describe the bug
radius does not work.

To Reproduce
Run code below

DottedBorder(
      color: Color.fromARGB(255, 134, 129, 129), // ็‚น็ทšใฎ่‰ฒ
      radius: Radius.circular(12),
      dashPattern: [6.0,4.0],
      strokeWidth: 3.0,
      strokeCap: StrokeCap.round,
      child: ClipRRect(
        borderRadius: BorderRadius.all(Radius.circular(12)),
        child: child),
    )

Expected behavior
Corner rounded

Screenshots
IMG_4D5C44F26878-1

Desktop (please complete the following information):

  • OS: MacOS
  • Browser non
  • Version 2.0.0+3

Smartphone (please complete the following information):

  • Device: iPhone 11
  • OS: iOS
  • Browser non
  • Version 16.0

Allow specifying sides

A feature request: Please allow specifying sides. I wanted to create just dashed line.

Border being drawn before child widget causing it to disappear beneath it when adding padding to borderPadding property

I was using your package, and I wanted to add a border around a TextField. I was going for something like this where the dashed lines are inside the child widget:
TextField
I figured out you can use the borderPadding property to control this, but when I add the padding the border goes beneath the child widget and disappears. This can be easily fixed if you just swap the two child widgets of the stack, I tested it already and it works.
swap
Is there a reason why it is like this?

Please consider update to path_drawing 1.0.0

Hi,

I have other packages that now are using the just recently published stable release of path_drawing 1.0.0.

Dotted border uses 0.5.0, so there will be an unresolvable conflict (because of the major version bump)

Could you please consider update the dependency to also use path_drawing ^1.0.0 ?

conflict with flutter_svg

So, because "some_project" depends on both flutter_svg ^0.22.0 and dotted_border ^2.0.0+3, version solving failed.
pub get failed (1; So, because "some_project" depends on both flutter_svg ^0.22.0 and dotted_border ^2.0.0+3, version solving failed.)

can you upgrade flutter_svg version to resolve it?
thanks for great job!

when update to `2.0.0+2`๏ผŒit will version solving failed with `flutter_html`

Describe the bug
when update to 2.0.0+2๏ผŒit will version solving failed with flutter_html

To Reproduce
Steps to reproduce the behavior:

dependencies:
  flutter_html: ^2.1.2
  dotted_border: ^2.0.0+2

Expected behavior
can use dotted_border 2.0.0+2+ and flutter_html at the same time

Screenshots
image

Desktop (please complete the following information):

  • all

Smartphone (please complete the following information):

  • all

Additional context

Running "flutter pub get" in xilaijian_app...                   
Because flutter_svg >=0.23.0 <1.0.0 depends on path_drawing ^0.5.1 and flutter_svg >=0.21.0 <0.23.0 depends on path_drawing ^0.5.0, flutter_svg >=0.21.0 <1.0.0 requires path_drawing ^0.5.0.
And because dotted_border >=2.0.0+2 depends on path_drawing ^1.0.0 and flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1 depends on flutter_svg >=0.22.0 <1.0.0, dotted_border >=2.0.0+2 is incompatible with flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1.
So, because xilaijian_app depends on both flutter_html ^2.1.2 and dotted_border ^2.0.0+2, version solving failed.
pub get failed (1; So, because xilaijian_app depends on both flutter_html ^2.1.2 and dotted_border ^2.0.0+2, version solving failed.)

BorderType.Circle doesn't place the child Text widget in center if the String length in 1

Hey, this issue still persists in the case of BorderType.Circle.

If we write just one letter in the Text(), it just place it outside the border.

image
See code:

DottedBorder(
      borderType: BorderType.Circle,
      padding: EdgeInsets.all(15),
      child: Text('1'),
)

The same code if I change BorderType.Circle to BorderType.Oval or BorderType.Rect outputs:

image image

I solved this by wrapping DottedBorder inside SizedBox and then wrapping the Text with Center

SizedBox(
      width: 30,
      height: 30,
      child: DottedBorder(
        borderType: BorderType.Circle,
        child: Center(child: Text('1')),
      ),
)

So, here's the output now:

image

Please open this issue.

Originally posted by @rmahmadkhan in #2 (comment)

Pls Upgrade path_drawing

can you upgrade path_drawing?

Because no versions of dotted_border match >1.0.7 <2.0.0 and dotted_border 1.0.7 depends on path_drawing ^0.4.1, dotted_border ^1.0.7 requires path_drawing ^0.4.1.
And because flutter_html >=1.3.0 <2.0.0-nullsafety.0 depends on flutter_svg ^0.20.0-nullsafety.3 which depends on path_drawing ^0.5.0-nullsafety.0, dotted_border ^1.0.7 is incompatible with flutter_html >=1.3.0 <2.0.0-nullsafety.0.

Whats app story like featue

Hey. I have used this in one of my projects where I needed dashed border.
Now in my other project, I was thinking to use it to show the count of the stories which the user has uploaded, something similar to the WhatsApp story feature.
Is there a way that dashes that are displayed automatically render on the basis of story number?

strange behavior when using BorderType.Circle

                                DottedBorder(
                                  borderType: BorderType.Circle,
                                  radius: Radius.circular(12),
                                  dashPattern: [4, 4],
                                  color: Colors.grey[400],
                                  child: Padding(
                                    padding: const EdgeInsets.all(16),
                                    child: Column(
                                      mainAxisSize: MainAxisSize.min,
                                      children: [
                                        Text(
                                          '25:34',
                                          style: TextStyle(
                                            fontSize: 32,
                                            fontWeight: FontWeight.bold,
                                          ),
                                          textAlign: TextAlign.center,
                                        ),
                                        Text(
                                          'ุฏู‚ุงุฆู‚',
                                          style: textTheme.subhead,
                                          textAlign: TextAlign.end,
                                        ),
                                      ],
                                    ),
                                  ),
                                )

the same code when using BorderType.RRect it works as expected

image
image

Missing tags in repo

We are using ort for automatic software compliance checks.

dotted_border is one of our dependencies and we use it in version 2.1.0. Now, ort fails in scanning this repo, as this version is not tagged on GitHub.

Could you please add the missing tag "2.1.0" to GitHub and keep these tags in sync with upcoming releases?

Provide a means to override StackFit.loose

A big thanks for your package: it saved us the time and trouble of having to develop a custom border ourselves.

It would greatly improve the usability of your widget, if it would allow to control the constraints that DottedBorder would pass to its child widget. Currently, the inner stack always loosens the constraints passed to the child (the default value of Stack.fit); that might be what some of the users want, but certainly not wat all of them want to happen. In our particular case, we want DottedBorder.child to respect a minimal height imposed on the DottedBorder widget itself -- something that the Stack allows by setting it's fit property to StackFit.passthrough.

Doesn't work on Web

The package claims it's compatible with Web, but unfortunately it doesn't. path_drawing's dashPath method throws Unimplemented error.

Setting dashPattern: [0,0] or [0] crashes hot reload, and requires restart of simulator + Android Studio

In an attempt to use the same widget for a solid border and dashed border, I stumbled into a weird bug where setting dashPattern to [0,0] or [0] brings down the whole iOS simulator + Android studio. For anything to work again, I have to restart both the simulator and Android studio.

I haven't tried much with other devices, but I assume something similar will happen.

I have a widget where I want the border to be dotted in one state, but solid in another.
Is there a safe way of setting a non-dashed border other than using a different widget altogether?

Flutter Web : Border is not coming

DottedBorder(
dashPattern: [6, 3, 2, 3],
padding: EdgeInsets.all(6),
color: Colors.black,
strokeWidth: 1,
child:Container())
Issue :


โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by rendering library โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
The following UnimplementedError was thrown during paint():
UnimplementedError

When the exception was thrown, this was the stack
throw_ (package:dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart:196:49)
extractPath (package:build_web_compilers/lib/_engine/engine/surface/path_metrics.dart:131:7)
dashPath
package:path_drawing/src/dash_path.dart:34
[_getPath]
package:dotted_border/dash_painter.dart:62
paint
package:dotted_border/dash_painter.dart:39
...
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#332c2
RenderObject: RenderCustomPaint#332c2
    parentData: top=0.0; right=0.0; bottom=0.0; left=0.0; offset=Offset(0.0, 0.0) (can use size)
    constraints: BoxConstraints(w=777.0, h=369.0)
    size: Size(777.0, 369.0)
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by rendering library โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
UnimplementedError
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by scheduler library โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/bitmap_canvas.dart:593:12
_saveCount == 0
is not true

Canvas memory exceeded in Safari's iOS

Describe the bug
Having many dotted borders drawn at once can cause issues in iOS devices with large screens when rendered to web platform.

To Reproduce
Steps to reproduce the behavior:

  1. render 20+ dotted borders in and an iOS device with a large resolution (Happened in Ipad 10th gen originally)

Expected behavior
The widgets render correctly.

Screenshots
Screenshot 2024-06-12 at 14 42 05

Screenshot 2024-06-12 at 14 42 17

Smartphone (please complete the following information):

  • Device: Ipad 10th gen
  • OS: iOS 16.1
  • Browser Safari
  • Version ^2.1.0

Additional context
It appears to create a canvas of the entire screen size for each widget which takes up too much memory on large resolution devices, which causes the total canvas memory to be exceeded

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.