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
_paceAnimation = Tween<double>( | |
begin: 0.0, | |
end: messi.pace / 100, | |
).animate(_controller); | |
_shootAnimation = Tween<double>( | |
begin: 0.0, | |
end: messi.shoot / 100, | |
).animate(_controller); | |
... |
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
ClipPath( | |
clipper: HexagonClipper(radius: radius), | |
child: SizedBox( | |
width: diameter, | |
height: diameter, | |
child: ColoredBox( | |
color: Colors.blueAccent.withOpacity(0.7), | |
), | |
), | |
) |
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
// Inner-most hexagon | |
Offset( | |
1/5 * radius * cos(pi * 2 * degree / 360) + center.dx, | |
1/5 * radius * sin(pi * 2 * degree / 360) + center.dy, | |
) | |
//Farthest inner hexagon | |
Offset( | |
5/5 * radius * cos(pi * 2 * degree / 360) + center.dx, | |
5/5 * radius * sin(pi * 2 * degree / 360) + center.dy, |
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
final degree = 60 * i + 30; |
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
for (int i = 0; i < 6; i++) { | |
final degree = 60 * i; | |
canvas.drawLine( | |
Offset( | |
radius * cos(pi * 2 * degree / 360) + center.dx, | |
radius * sin(pi * 2 * degree / 360) + center.dy, | |
), | |
Offset( | |
radius * cos(pi * 2 * (degree + 60) / 360) + center.dx, | |
radius * sin(pi * 2 * (degree + 60) / 360) + center.dy, |
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; |
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
return Scaffold( | |
body: Stack( | |
children: <Widget>[ | |
ProductDetailBackground( | |
screenHeight: screenHeight, | |
screenWidth: screenWidth, | |
), | |
SingleChildScrollView( | |
child: Column( | |
children: <Widget>[ |
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
return Scaffold( | |
body: Stack( | |
children: <Widget>[ | |
ProductDetailBackground( | |
screenHeight: screenHeight, | |
screenWidth: screenWidth, | |
), | |
SingleChildScrollView( | |
child: Column( | |
children: <Widget>[ |
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
GestureDetector( | |
onTap: () { | |
Navigator.pop(context); | |
}, | |
child: Icon( | |
Icons.arrow_back, | |
), | |
) |
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
import 'package:flutter/widgets.dart'; | |
class FadePageRoute extends PageRouteBuilder { | |
final Widget widget; | |
FadePageRoute({this.widget}) | |
: super( | |
pageBuilder: ( | |
BuildContext context, | |
Animation<double> animation, |
NewerOlder