Created
September 17, 2024 09:05
-
-
Save EsinShadrach/3a0bea06fd5b40bf3df1bfe4b5e8a1a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import "package:flutter/material.dart"; | |
| class DottedBackgroundPainter extends CustomPainter { | |
| @override | |
| void paint(Canvas canvas, Size size) { | |
| final paint = Paint() | |
| ..color = Colors.white10 | |
| ..style = PaintingStyle.fill; | |
| double spacing = 10; | |
| double dotRadius = 1.5; | |
| for (double x = 0; x < size.width; x += spacing) { | |
| for (double y = 0; y < size.height; y += spacing) { | |
| canvas.drawCircle(Offset(x, y), dotRadius, paint); | |
| } | |
| } | |
| } | |
| @override | |
| bool shouldRepaint(covariant CustomPainter oldDelegate) { | |
| return false; | |
| } | |
| } |
Author
Cool stuff. I wish I write flutter
Author
🤣
Learn gee if you really want to.
…On Tue, 17 Sept 2024 at 23:44, Fasakin Henry ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Cool stuff. I wish I write flutter
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/EsinShadrach/3a0bea06fd5b40bf3df1bfe4b5e8a1a3#gistcomment-5195309>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMHL3BCTK5J3JWDWBIRISDZXCWFTBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTGMRXGQZDMMJYU52HE2LHM5SXFJTDOJSWC5DF>
.
You are receiving this email because you authored the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
Author
@fasakinhenry you could always learn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make a background Dotted with the CustomPainter widget