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
#include <flutter/runtime_effect.glsl> | |
uniform vec2 uSize; | |
uniform float iTime; | |
vec2 iResolution; | |
out vec4 fragColor; | |
#define PI 3.1415926535897932384626433832795 |
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
#define PI 3.1415926535897932384626433832795 | |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
{ | |
vec2 center = fragCoord/iResolution.xy - vec2(0.5, 0.5); | |
float dist = length(center); | |
float p = (atan(center.y,center.x)) / (2.0 * PI); | |
float numStripes = 12.0; | |
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
class MyPainter extends CustomPainter { | |
final Paint paint; | |
MyPainter(this.paint); | |
@override | |
void paint(Canvas canvas, Size size) { | |
canvas.drawRect( | |
Rect.fromLTRB(0, 0, size.width, size.height), | |
paint, |
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: MyPainter(paint), | |
child: Container(), | |
); |
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
Paint paint = Paint() | |
..shader = Shader.linearGradient( | |
colors: [Colors.red, Colors.blue], | |
begin: Alignment.topLeft, | |
end: Alignment.bottomRight, | |
); |
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( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: CustomScrollView( | |
slivers: [ | |
SliverList(delegate: SliverChildBuilderDelegate( | |
(context, index) { | |
return Text("hello user"); | |
}, |
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( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: SingleChildScrollView( | |
child: ListView( | |
shrinkWrap: true, | |
children: const [ | |
Text("hello user") | |
], |
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( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: SingleChildScrollView( | |
child: Column( | |
children: const [ | |
Text("hello user") | |
], | |
), |
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( | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: SingleChildScrollView( | |
child: ListView( | |
children: const [ | |
Text("hello user") | |
], | |
), |