flutter_tilt_widget_widget 0.1.1 flutter_tilt_widget_widget: ^0.1.1 copied to clipboard
You can use this package to make your widget using tilt effect.
import 'package:flutter/material.dart';
import 'package:flutter_tilt_widget_widget/flutter_tilt.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.black,
body: Center(
child: FlutterTilt(
child: Container(
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: Colors.white.withOpacity(0.5),
blurRadius: 10,
offset: Offset(0, 5),
),
],
),
width: 200,
height: 200,
child: Image.asset('assets/images/dash.png')),
),
)));
}
}