1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Flutter 3.29 beta (#2571)

This commit is contained in:
Eric Windmill
2025-02-12 18:08:01 -05:00
committed by GitHub
parent d62c784789
commit 719fd72c38
685 changed files with 76244 additions and 53721 deletions

View File

@@ -14,9 +14,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Simple Shader Demo',
theme: ThemeData(
colorSchemeSeed: Colors.blue,
),
theme: ThemeData(colorSchemeSeed: Colors.blue),
home: const MyHomePage(),
);
}
@@ -28,20 +26,14 @@ class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Simple Shader Demo'),
),
appBar: AppBar(title: const Text('Simple Shader Demo')),
body: ShaderBuilder(
assetKey: 'shaders/simple.frag',
(context, shader, child) => CustomPaint(
size: MediaQuery.of(context).size,
painter: ShaderPainter(
shader: shader,
),
),
child: const Center(
child: CircularProgressIndicator(),
painter: ShaderPainter(shader: shader),
),
child: const Center(child: CircularProgressIndicator()),
),
);
}
@@ -57,10 +49,7 @@ class ShaderPainter extends CustomPainter {
shader.setFloat(1, size.height);
final paint = Paint()..shader = shader;
canvas.drawRect(
Rect.fromLTWH(0, 0, size.width, size.height),
paint,
);
canvas.drawRect(Rect.fromLTWH(0, 0, size.width, size.height), paint);
}
@override

View File

@@ -4,7 +4,7 @@ publish_to: 'none'
version: 1.0.0+1
environment:
sdk: ^3.5.0
sdk: ^3.7.0-0
dependencies:
flutter: