पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरण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.

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।