shader_transitions 1.0.0 copy "shader_transitions: ^1.0.0" to clipboard
shader_transitions: ^1.0.0 copied to clipboard

GPU-accelerated shader page transitions for Flutter — diamond, circle iris, and wipe with eight sweep directions, optional cover color, and a cinematic hold.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:shader_transitions/shader_transitions.dart';

import 'screens/gallery_screen.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Compile all fragment shaders before the first frame is drawn.
  // This prevents GPU compilation jank on the very first transition.
  await ShaderTransitions.preload();

  runApp(const ShaderTransitionsDemo());
}

class ShaderTransitionsDemo extends StatelessWidget {
  const ShaderTransitionsDemo({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Shader Transitions',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(
          seedColor: const Color(0xFF6750A4),
          brightness: Brightness.dark,
        ),
        useMaterial3: true,
      ),
      home: const GalleryScreen(),
    );
  }
}
1
likes
160
points
13
downloads

Documentation

API reference

Publisher

verified publisherjohnpatrickprieto.com

Weekly Downloads

GPU-accelerated shader page transitions for Flutter — diamond, circle iris, and wipe with eight sweep directions, optional cover color, and a cinematic hold.

Homepage
Repository (GitHub)
View/report issues

Topics

#transitions #shaders #animation #navigation #ui

License

MIT (license)

Dependencies

flutter

More

Packages that depend on shader_transitions