FLUTTER ECOSYSTEM

mkiisoft/hover_effect

懸停 - 傾斜 3D 效果 讓任何子組件啟用懸停/傾斜 3D 功能至您的組件。

懸停效果 專案封面
Stars
16
Forks
4
最近推送(UTC)
2021年12月8日
專案狀態
未封存
Mariano Zorrilla GitHub avatar
GITHUB User

Mariano Zorrilla ↗

Android, Flutter & Dart - Tech Lead @ PayPal

PayPalBuenos Aires, Argentina官方網站 ↗
語言DartSwiftHTMLKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

hover_effect

Hover - Tilt 3D Effect

Takes any child widget and enables Hover/Tilt 3D functionality to it

Demo

https://raw.githubusercontent.com/mkiisoft/hover_effect/master/assets/demo.gif

Getting Started

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Hover - Tilt 3D Effect',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: Material(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text(
              'Hover - Tilt 3D Effect',
              style: TextStyle(
                  fontSize: 30,
                  fontWeight: FontWeight.w700,
                  color: Colors.black,
                  letterSpacing: 2),
            ),
            SizedBox(height: 50),
            Container(
              width: 150,
              height: 300,
              child: HoverCard(
                builder: (context, hovering) {
                  return Container(
                    color: Color(0xFFE9E9E9),
                    child: Center(
                      child: FlutterLogo(size: 100),
                    ),
                  );
                },
                depth: 10,
                depthColor: Colors.grey[500],
                onTap: () => print('Hello, World!'),
                shadow: BoxShadow(color: Colors.purple[200], blurRadius: 30, spreadRadius: -20, offset: Offset(0, 40)),
              ),
            ),
          ],
        ),
      ),
    );
  }
}