搜尋套件、儲存庫與 APP 分類

drop_shadow_image 封面
套件詳情v0.9.1

drop_shadow_image

一個用於創建圖像陰影的新Flutter套件,具有許多屬性,讓外觀更佳。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
192
喜歡數
59
Pub 分數
160

安裝套件

flutter pub add drop_shadow_image

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,讓開發者能夠為影像加入可自訂的陰影效果,並提供廣泛的樣式選項。它提供對陰影屬性(例如模糊半徑、偏移量、顏色和擴展)的細緻控制,可在多個平台實現視覺上吸引人的影像效果。非常適合透過深度與維度增強 UI 元素,可無縫整合至 Flutter 應用程式中。此套件為開源且持續維護,支援 Android、iOS、Web、macOS、Windows 與 Linux。

適用情境

  • 透過深度增強圖像卡片
  • 建立視覺豐富的 UI 組件
  • 在應用介面中新增動態陰影
  • 改善版面中的視覺層次
  • 設計現代應用程式的美學

主要特色

  • 可自訂的陰影模糊半徑
  • 可調整的陰影偏移
  • 支援陰影顏色與擴展
  • 跨平台相容性
  • 與現有組件的輕鬆整合
  • 對陰影外觀的細微控制

適合對象

  • 尋求視覺深度的UI設計師
  • 開發現代 Flutter 應用的開發者
  • 需要精緻影像效果的專案
  • 針對多個平台的應用程式
  • 創意數位產品介面

使用建議

  • 使用大量陰影時的性能影響
  • 需要仔細調整才能獲得最佳渲染效果
  • 可能需要在低階設備上進行優化
  • 僅限圖像裝飾,不包含完整小部件陰影

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

drop_shadow_image

Package for creating drop shadow effect of an image, with lots of properties to apply.

Example

Installation

  1. Add this to your package's pubspec.yaml file:
dependencies:
  drop_shadow_image: ^0.9.0
  1. Import the package into your dart file:
import 'package:drop_shadow_image/drop_shadow_image.dart';

Example

import 'dart:ui';

import 'package:drop_shadow_image/drop_shadow_lib.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body:
        Center(
          child: DropShadowImage(
            offset: Offset(10,10),
            scale: 1,
            blurRadius: 12,
            borderRadius: 20,
            image: Image.asset('assets/cat.png',
            width: 300,),
          ),
        )
      ),
    );
  }
}

Properties of the lass

1. Key key
 
2. double scale  // Size to parent. 

3. Offset offset  // Position of shadow. (dx) for horizontal displacement (dy) for vertical displacement.

4. double blurRadius // Amount of blur in the shadow. 0 means no blur.

5. double borderRadius //  border radius of image

6. Image image (@required) // The image.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。