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/material.dart'; | |
// TODO edit your app | |
void main() { | |
print('Hello from your Flutter app!'); | |
runApp(MyApp()); | |
} | |
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 'dart:typed_data'; | |
import 'package:meta/meta.dart'; | |
/// Image formats supported by Flutter. | |
enum ImageFormat { | |
/// A Portable Network Graphics format image. | |
png, | |
/// A JPEG format image. | |
/// |
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
double getScaledSize(int index) { | |
return getPropertyValue( | |
index: index, | |
baseValue: baseItemHeight, | |
maxValue: 70, | |
nonHoveredMaxValue: 50, | |
); | |
} | |
double getTranslationY(int index) { |
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
Positioned( | |
height: baseItemHeight, | |
left: 0, | |
right: 0, | |
child: DecoratedBox( | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(8), | |
gradient: const LinearGradient(colors: [ | |
Colors.blueAccent, | |
Colors.greenAccent, |
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
double getPropertyValue({ | |
required int index, | |
required double baseValue, | |
required double maxValue, | |
required double nonHoveredMaxValue, | |
}) { | |
late final double propertyValue; | |
// 1. | |
if (hoveredIndex == null) { |
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
Padding( | |
padding: EdgeInsets.all(verticlItemsPadding), | |
// 1. | |
child : Row( | |
mainAxisSize: MainAxisSize.min, | |
children: List.generate(items.length, (index) { | |
// 2. | |
return MouseRegion( | |
cursor: SystemMouseCursors.click, | |
onEnter: ((event) { |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Flutter: Attach to Process", | |
"type": "dart", | |
"request": "attach", |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/scheduler.dart'; | |
class MyShader extends StatefulWidget { | |
const MyShader({Key? key}) : super(key: key); | |
@override | |
State<MyShader> createState() => _MyShaderState(); |
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
uniform float u_time; | |
vec4 fragment(in vec2 uv,in vec2 fragCoord){ | |
float l=u_time; | |
vec2 uv2,p=uv; | |
uv2=p; | |
p-=.5; | |
l=length(p); | |
uv2+=abs(sin(l*10.-u_time)); |
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
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
void main() { | |