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

weather_animation 封面
套件詳情v1.2.0

weather_animation

該套件包含美麗的天氣動畫。透過天氣設定工具輕鬆設定!

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1040
喜歡數
133
Pub 分數
160

安裝套件

flutter pub add weather_animation

套件介紹

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

weather_animation 套件為 Flutter 應用提供視覺上吸引人的天氣主題動畫,包含雨、雪和雲等動態效果。設計時著重於易用性,內建天氣設定工具,可快速設定與自訂。非常適合用來增強應用背景或在多個平台創造沉浸式天氣體驗。動畫流暢且效能優異,充分發揮 Flutter 的渲染能力。支援 Android、iOS、Web、macOS、Windows 及 Linux,適用於跨平台專案。

適用情境

  • 透過天氣效果增強應用背景
  • 建立沉浸式天氣儀表板
  • 為天氣預報應用增添視覺魅力
  • 透過動畫介面提升使用者參與度
  • 設計主題化的移動或網頁應用

主要特色

  • 預建的天氣動畫(雨、雪、雲)
  • 易用的天氣設定工具
  • 跨平台支援
  • 跨裝置的順暢效能
  • 可自定義的動畫參數
  • 與 Flutter 渲染引擎的整合

適合對象

  • 尋求視覺增強的App開發者
  • 設計天氣主題 UI 的設計師
  • 需要動畫背景效果的專案
  • 跨平台 Flutter 應用程式
  • 希望快速實現豐富視覺效果的開發者

使用建議

  • 可能影響低階裝置的效能
  • 複雜場景需要仔細優化
  • 限於預定義的天氣類型
  • 最適合用於背景層,不適合互動元素
  • 依賴於Flutter的圖形渲染管线進行渲染

原始 README

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

telegram_badge pub_badge configurator_badge repo_star_badge license_badge code_size_badge

all_scenes

🌇 weather_animation

Create weather scenes and animate as your heart desires. Simple and free.

Try the Weathunits configurator for setting weather scenes directly in the WEB!

Put an on Pub and favorite ⭐ on GitHub to keep up with changes and not miss new releases!

Motivation

  • 🎨 colorful weather scenes without using gif/png and stuff source
  • 🆓 free license for use in your projects (including commercial ones)
  • 🎛 easy creation of scenes and easy customization when needed
  • 🌅 configurator for easy creation of weather scenes
  • 😅 enjoy yourself and you with another fun package

Table of Contents

How to use simply?

Import the library:

import 'package:weather_animation/weather_animation.dart';
Use WeatherScene

Check the provided list of ready-made weather scenes in the WeatherScene enumeration and select the desired one through the getter:

@override
Widget build(BuildContext context) {
  return WeatherScene.sunset.sceneWidget;
}

or for more customization, use WrapperScene.weather:

@override
Widget build(BuildContext context) {
  return WrapperScene.weather(scene: WeatherScene.sunset);
}
Use WrapperScene

Specify a list of weather widgets and a list of colors to create a beautiful background gradient:

@override
Widget build(BuildContext context) {
  return const WrapperScene(
      colors: [
        Color(0xff283593),
        Color(0xffff8a65),
      ],
      children: [
        SunWidget(),
        CloudWidget(),
        WindWidget(),
      ],
    );
}

If necessary, specify a configuration file to fine-tune the weather widget:

// ...
SunWidget(
  sunConfig: SunConfig(
    width: 262.0,
    blurSigma: 10.0,
    blurStyle: BlurStyle.solid,
    isLeftLocation: true,
    coreColor: Color(0xffffa726),
    midColor: Color(0xd6ffee58),
    outColor: Color(0xffff9800),
    animMidMill: 2000,
    animOutMill: 1800,
  ),
),
// ...
Use weather_configurator app
  • online in web → Weathunits configurator
  • offline after build project on your gadget (path example/weathunits_configurator. Learn more here)

Library structure

The only point of using the library is to import the following file:

import 'package:weather_animation/weather_animation.dart';

The following weather widgets are available:

Widget weather A configuration class
CloudWidget CloudConfig
RainWidget
RainDropWidget*
RainConfig
SnowWidget
SnowflakeWidget*
SnowConfig
SunWidget SunConfig
ThunderWidget
SingleThunderWidget*
ThunderConfig
WindWidget WindConfig

💡Tip: Widgets under * represent a single weather item. Use these when another Stack setting is required.

Each weather widget accepts an optional configuration parameter to fine-tune the widget.

Configuration files ...Config
  • have correctly toString, operator ==, hashCode
  • have a copyWith method to clone the object
  • have de/serialization handling (toJson and fromJson). Note: not all fields
  • are inherited from class WeatherConfig
About WrapperScene

Also, there is a WrapperScene widget for quick scene adjustment, which allows you to scale the weather scene relative to the specified canvas dimensions. Has a clipper and scene widget decoration.

About BackgroundWidget

The BackgroundWidget class allows you to create a color background in the form of a linear gradient. Specify the desired colors and you're done.

Author

You can contact me or check out my activities on the following platforms:

Additional information

Made with ❤️. Enjoy it!


🏷 tags: weather, animation, weather conditions, weather scenes

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案