reflection_effect 2.0.0 copy "reflection_effect: ^2.0.0" to clipboard
reflection_effect: ^2.0.0 copied to clipboard

Reflectable is a Flutter package that provides a customizable widget designed to create a reflective effect on its child widget, is inspired by CSS box-reflect.

example/lib/main.dart

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

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Example Reflection Widget',
      home: Scaffold(
        body: Stack(
          children: [
            Center(child: Image.asset('images/backgraund.png')),
            Center(
              child: Row(
                children: [
                  const Spacer(),
                  Reflection(
                    settingReflection: SettingReflection(
                      skewX: 0.2,
                      scaleY: 0.5,
                      opacity: 0.9,
                      reflectionLength: 0.4,
                      positionX: 0.2,
                      expandRight: 10,
                      below: -32,
                    ),
                    child: const Text('Hello World ',
                        style: TextStyle(
                            fontSize: 60,
                            color: Color.fromARGB(255, 15, 35, 90))),
                  ),
                  Reflection(
                    settingReflection: SettingReflectionEnum.image.setting,
                    child: Container(
                      color: Colors.red,
                      height: 50,
                      width: 50,
                    ),
                  ),
                  const Spacer()
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
140
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

Reflectable is a Flutter package that provides a customizable widget designed to create a reflective effect on its child widget, is inspired by CSS box-reflect.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on reflection_effect