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

套件詳情v1.0.2

motion_widget

一個簡單又強大的組件,用來建立酷炫的過渡效果。它處理初始化、狀態變更、程式碼清理以及其他所有動畫樣板程式碼,讓您在每個時段都能控制動畫,始終掌握主導權。

近 30 天下載
14
喜歡數
66
Pub 分數
20

安裝套件

flutter pub add motion_widget

套件介紹

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

MotionWidget 是一個 Flutter 套件,旨在簡化順暢、動態過渡的建立。它抽象掉了常見的動畫範本程式碼——例如初始化、狀態管理與清除——同時讓開發者完全掌控動畫間隔。透過直覺式的 API,開發者能專注於設計與行為,而非底層動畫邏輯。非常適合建立具有流暢互動的響應式 UI,透過精緻的視覺反饋提升使用者體驗。

適用情境

  • 建立動畫按鈕狀態
  • 建構滑動面板過渡效果
  • 實現淡入/淡出效果
  • 設計互動式表單元素
  • 動畫列表項目進入
  • 向UI組件添加微互動

主要特色

  • 自動動畫生命週期管理
  • 對動畫間隔的細粒度控制
  • 最小化樣板程式碼
  • 支援複雜的過渡序列
  • 與現有組件的輕鬆整合
  • 乾淨、易讀的 API

適合對象

  • 尋求高效動畫解決方案的Flutter開發者
  • UI/UX 設計師實施互動式原型
  • 需要豐富、響應式動畫的應用程式
  • 注重乾淨、可維護的動畫程式碼的團隊
  • 開發人員避免手動管理 AnimationController

使用建議

  • 需要了解基本的動畫概念
  • 除了核心範例之外,文件內容有限
  • 在簡單使用案例中可能會引入額外負擔
  • 未針對極高頻率動畫進行優化
  • 最適合中到複雜的過渡需求

原始 README

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

motion_widget

A simple, powerful widget to build cool transitions

Features

  • Fine-grained control with Interval
  • Lightweight & fully customizable
  • No boilerplate code
  • Works with Row & Column
  • Support for Translate & Fade modes
  • Provides Exit transitions
  • No code clean-up required
Screenshots

Screenshot

Usage

To use this plugin :

  • Add the dependency
  dependencies:
    flutter:
      sdk: flutter
    motion_widget:
  • Use the widget as a Row or a Column
Motion<Row>(
    children: <Widget>[]
)
  • Wrap its child with MotionElement
MotionElement(
    interval: Interval(0.3, 0.9)
    mode: MotionMode.FADE
    child: Container()
    orientation: MotionOrientation.HORIZONTAL_LEFT
)
  • Provide exitConfigurations for exit transitions
Motion(
    exitConfigurations: MotionExitConfigurations(
        displacement: 200,
        orientation: MotionOrientation.HORIZONTAL_LEFT,
        durationMs: 400
    )
)

Pull Requests

All the pull requests are welcomed. Please feel free to make valuable additions in the code.

Created by

Sumeet Rukeja (LinkedIn)

License

Copyright 2020 Sumeet Rukeja

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。