Created
January 13, 2023 15:11
-
-
Save TechieBlossom/db7671994b91dfbef0749484e71991f2 to your computer and use it in GitHub Desktop.
Custom Paint with CustomPainter
This file contains 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
CustomPaint( | |
painter: HexagonPainter(radius: radius), | |
) | |
class HexagonPainter extends CustomPainter { | |
const HexagonPainter({ | |
required this.radius, | |
}); | |
final double radius; | |
@override | |
void paint(Canvas canvas, Size size) { | |
final center = Offset(size.width / 2, size.width / 2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment