-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Use case
Since #99882, InkSparkle is the default splash animation for M3 apps, only on Android and when the platform is not web, see:
| final bool useInkSparkle = platform == TargetPlatform.android && !kIsWeb; |
Proposal
Because shaders are now supported on the Canvaskit renderer, it would be possible to make InkSparkle the default animation for Flutter web when isCanvasKit is true.
Here is a video showing the InkSparkle shader running on Chrome (Android emulator) :
ThemeDataimplementation was updated to change the default splash factory resolution.- The application was launched using:
flutter run -d web-server --web-renderer=canvaskit --web-port 8080 --web-hostname 0.0.0.0. adb reverse tcp:8080 tcp:8080was runned before accesing the application from the emulator.
InkSplash-AndroidCanvaskit.mp4
Example app used to make the screenshot
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
void main() {
timeDilation = 10.0;
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Material App',
theme: ThemeData.dark(),
home: Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Material(
child: InkWell(
onTap: () {},
child: Container(
width: 400,
height: 100,
decoration: BoxDecoration(
border: Border.all(color: Colors.white),
),
),
),
),
),
),
);
}
}
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttere: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team