패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.0.1

live_icon

실시간으로 앱 아이콘과 레이블을 변경할 수 있는 플러터 플러그인입니다.

AndroidiOS
30일 다운로드
8
좋아요
37
Pub 점수
150

패키지 설치

flutter pub add live_icon

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Live Icon은 디바이스 홈 화면에서 앱 아이콘과 레이블을 실시간으로 변경할 수 있도록 해주는 Flutter 플러그인입니다. 개발자가 런타임 중에 앱의 시각적 정체성을 동적으로 업데이트할 수 있게 하며, 테마, 브랜딩 업데이트 또는 인터랙티브한 사용자 경험에 유용합니다. 이 플러그인은 Android 및 iOS 플랫폼을 모두 지원하며, Flutter 애플리케이션과 원활하게 통합됩니다. 재시작 없이도 네이티브 플랫폼 기능을 활용하여 앱 아이콘을 새로 고칠 수 있습니다. 사용자 선호도나 앱 상태에 따라 개인화되거나 상황에 맞는 아이콘을 제공하고자 하는 앱에 적합합니다.

사용 사례

  • 다이나믹 앱 브랜딩
  • 테마 앱 아이콘
  • 사용자 선호도 기반 아이콘 변경
  • 인터랙티브 앱 경험
  • 실시간 아이콘 업데이트

주요 기능

  • 실시간 아이콘 및 레이블 업데이트
  • Android 및 iOS 지원
  • 앱 재시작 필요 없음
  • 간단한 API 통합
  • 네이티브 플랫폼 호환성

적합한 대상

  • 동적 브랜딩을 갖춘 앱
  • 테마 사용 애플리케이션
  • 인터랙티브 사용자 인터페이스
  • 사용자 정의 가능한 앱 식별자
  • 홈 화면 사용자 정의를 원하는 개발자

고려 사항

  • 플랫폼별 설정이 필요합니다
  • 지원되는 장치에 한정
  • 모든 런처에서 작동하지 않을 수 있습니다
  • 일부 안드로이드 버전에서는 권한이 필요할 수 있습니다
  • 동작은 iOS 및 Android 구현 간에 다릅니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Live Icon

Live_Icon

GitHub GitHub code size in bytes GitHub top language GitHub language count GitHub tag (latest by date) GitHub issues

GitHub Repo stars GitHub forks

Compatibility

✅   Android
❌   iOS (active issue: iOS support)

Features

All the features listed below can be performed at the runtime.

✅   Change App Icons
✅   Change App Label

Quick Start

Step 1: Include plugin to your project
dependencies:
  live_icon: <latest version>
Step 2: Add activity-alias in AndroidManifest.xml
...
...
<application
    android:label="live_icon_example"
    android:icon="@mipmap/ic_launcher">
    <activity
        android:name=".MainActivity"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize">
        <meta-data
            android:name="io.flutter.embedding.android.NormalTheme"
            android:resource="@style/NormalTheme"
            />
        <meta-data
            android:name="io.flutter.embedding.android.SplashScreenDrawable"
            android:resource="@drawable/launch_background"
            />
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>

    <!-- Live Icon Addition -->
    <activity-alias
        android:name=".DarkTheme"
        android:enabled="false"
        android:icon="@mipmap/dark_theme"
        android:label="DarkThemeLabel"
        android:targetActivity=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity-alias>

    <activity-alias
        android:name=".LightTheme"
        android:enabled="false"
        android:icon="@mipmap/light_theme"
        android:label="LightThemeLabel"
        android:targetActivity=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity-alias>
    <!-- Live Icon Addition -->

    <meta-data
        android:name="flutterEmbedding"
        android:value="2" />

</application>
...
...
Step 3: Create classes

Create java/kotlin files with the same name as provided in activity-alias.

In the above AndroidManifest.xml example, 2 activity-alias are provided, so the number of java/kotlin files will be 2. Example:

1. DarkTheme.java
package com.hackthedeveloper.live_icon_example;

public class DarkTheme {
}
2. LightTheme.java
package com.hackthedeveloper.live_icon_example;

public class LightTheme {
}

One thing to note here is that, we have added two extra activity as activity-alias, and we now have 3 activity in total.

Step 4: Initialise plugin

List all the activity-alias class names. NOTE: MainActivity will also be added here as it containes the launch intent.

LiveIcon.initialize(
    classNames: ['MainActivity', 'DarkTheme', 'LightTheme'],
);
Step 5: Switch App icon

Use switchIconTo to switch app icons. It takes in the className that must match the desired activity-alias android:name.

await liveIcon.switchIconTo(
    className: 'DarkTheme',
);

Project Created & Maintained By

Subham Praharaj

GitHub followers

Divyanshu Shekhar

GitHub followers

Contributions

Contributions are welcomed!

If you feel that a hook is missing, feel free to open a pull-request.

For a custom-hook to be merged, you will need to do the following:

Describe the use-case.

  • Open an issue explaining why we need this hook, how to use it, ... This is important as a hook will not get merged if the hook doens't appeal to a large number of people.

  • If your hook is rejected, don't worry! A rejection doesn't mean that it won't be merged later in the future if more people shows an interest in it. In the mean-time, feel free to publish your hook as a package on https://pub.dev.

  • A hook will not be merged unles fully tested, to avoid breaking it inadvertendly in the future.

Copyright & License

Code and documentation Copyright (c) 2021 Devs On Flutter. Code released under the BSD 3-Clause License.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.