Update your flutter app icons with a custom one

1. Prepare Your Icon Image

  • Create a square PNG image (preferably 1024x1024 pixels) for best quality

2. Use the flutter_launcher_icons Package

Add the package to your pubspec.yaml:

flutter pub add flutter_launcher_icons

3. Configure the Icons

Add this configuration to your pubspec.yaml file:

flutter_launcher_icons:
  android: true
  ios: true
  remove_alpha_ios: true
  image_path: "assets/icon/app_icon.png"  # Path to your icon image
  adaptive_icon_background: "#FFFFFF"  # For Android adaptive icons (optional)

4. Run the Package

Run this command in your terminal:

flutter pub get
dart run flutter_launcher_icons

done!

网友语录 - 第31期 - 想要的东西要争取,不想要的东西要拒绝,感到不爽的事情要反击

这里记录我的一周分享,通常在周六发布。


为什么敢一直挑衅你?因为你一直表现的很软蛋。国家外交如此,个人交往也是。不要老拿实力当借口,当没有决心时,有实力也等于没实力


成功者因它成功,失败者因它失败。它是谁?它是你的习惯


mtfront 今天和朋友聊到了一些传统行业的人觉得厌班的一个原因是工作太 repetitive。只在科技行业干过的我确实完全没有意识到自己确实每天都在处理新的 challenge ,完全不会觉得工作 repetitive 这件事(厌班有别的理由)。

之前一直觉得科技行业不配 getting paid this much,因为做的东西也就是一些草台班子糊弄根本不高级没什么技术含量。但压根没想过可能很多别的工作真的是非常机械重复。从处理新的 challenge 这个角度来看,或许可能 maybe 这些草台班子 bullshit job 里还是有一丝丝含金量的?(not saying it's worth the pay though)

(很多解决方案不需要高级技术一样能甚至更好的解决用户的痛点。有价值的是解决方案不是科技含量。传统行业单调重复的解决方案很可能是不怕苦不怕累的机器人,但那个解决方案会直接导致大量工人失业,会更痛。是坏事也是好事。因为它会逼迫失业的人另找出路,而有些出路的结果会很好。)


郑芝麻『世界就是这样。哭什么呢,举杯吧各位!』 奥斯卡最佳女配得主尹汝贞说。

她的嗓音粗哑,问她是否被人嘲笑过?。 她说:“有过,但他们现在都去世了。那些嘲笑你的人迟早会挂的,又何必在意?!!”


Advice from a tree

  • Stand tall and proud
  • Go out on a limb
  • Remember your roots
  • Drink plenty of water
  • Be content with your natural beauty
  • Enjoy the view
…more

Introducing changesummary: A Git Change Summary Script

The changesummary script is a powerful tool for developers to quickly understand the key changes made between two Git commits. It leverages AI to analyze the diff and provide a concise summary of the modifications.

Functionality

The script takes one or two arguments: the start commit hash and an optional end commit hash. If the end commit hash is not provided, it defaults to HEAD.

Usage

To use changesummary, simply run it in your Git Bash terminal:

./changesummary <start_commit_hash> [<end_commit_hash>]

Example

./changesummary abc123 def456

Result:

The key changes between the specified commit hashes are:

* Renamed `TrmWithRiaSettlementPricingTask` to `TrmWithRiaDetailsPricingTask` and refactored its logic into a base class `TrmConfigPricingTaskBase`.
* Removed `RiaRawRateDataDecorator` and updated `TrmWithRiaDetailsPricingTask` to use `RiaRate` instead of `RiaRawRate`.
* Updated the `RequiredData` enum to remove `RiaRawRate` and updated the `TrmWithRiaDetailsPricingTask` to require `RiaRate`.
* Updated error codes and messages to reflect the changes.

These changes simplify the pricing task logic and improve maintainability.

Benefits

  • Provides a quick and meaningful summary of changes, saving time during code reviews.
  • Helps in understanding the impact of changes made between commits.
  • Easy to integrate into existing Git workflows.
  • Flexible comparison range with optional end commit hash.

By using changesummary, developers can streamline their code review process and focus on the most important changes.

here's the source code:

#!/bin/bash

# Check if commit hash is provided
if [ -z "$1" ]; then
    echo "Error: Commit hash is required as an argument."
    exit 1
fi

convert_to_uppercase() {
    # Enable case-insensitive matching
    shopt -s nocasematch
    
    if [[ $1 =~ ^(HEAD|FETCH_HEAD|ORIG_HEAD|MERGE_HEAD)(\~[0-9]+|\^[0-9]*)* ]]; then
        # Convert to uppercase
        echo "${1^^}"
    else
        # Return original string
        echo "$1"
    fi
    
    # Reset case-sensitivity to default
    shopt -u nocasematch
}

start_hash=$(convert_to_uppercase "$1")
end_hash=$(convert_to_uppercase "${2:-HEAD}")

# Define static prompt text
static_prompt=$(cat <<-END
Analyze the following code diff. Generate a concise summary (under 100 words) of the **key changes** made between the specified commit hashes. Present the changes in a bullet-point list format, focusing on the main modifications and their impact.
Code changes:
END
)

# Define model and system message variables
model="meta-llama/llama-4-maverick:free"
system_message="You are a programmer"

# Execute git diff and pipe its output to the AI model
git diff -w -b $start_hash..$end_hash | jq -R -s --arg model "$model" --arg system_content "$system_message" --arg static_prompt "$static_prompt" \
    '{
        model: $model,
        messages: [
            {role: "system", content: $system_content},
            {role: "user", content: ($static_prompt + .) }
        ],
        max_tokens: 16384,
        temperature: 0
    }' | curl -s --request POST \
        --url https://openrouter.ai/api/v1/chat/completions \
        --header "Authorization: Bearer $OR_FOR_CI_API_KEY" \
        --header "Content-Type: application/json" \
        --data-binary @- | jq -r '.choices[0].message.content'

网友语录 - 第 30 期 - 预测未来最好的方法是去创造未来。

这里记录我的一周分享,通常在周六发布。


萧覃含 不要因为熟悉而不珍惜。


老爷爷/学习汉语很开心 @shushuglad 不要为明天担心。明天自有明天的烦恼,今天的烦恼已经够多


所有人的焦虑都来自一个词:“怕来不及”。


懂是第一步,践行是第二步,只有第三步不需要努力,它是收获。丰收还是欠收就看你的前两步


被窝哲学家 在一起马上就9年了,我才习惯他几乎不口头表露心意这个事情。爱表达又直率的我一直默认,对方不说出口就是没有,不说想念就是不想、不说爱就是不爱。但我又确实接收到了实实在在的关心、照顾和珍视。好像有人的爱情就跟面包一样,我拿到手里就是我的了,面包确实也不会说话


一个人学会拒绝了,也就长大了。


求达即求信。信而不达,读者不能通过译文了解作者的真实意思,是假的忠于原文,还不如不译。


要让自己的人生道路越走越光明,需要改变的不是运气也不是社会,而是自己。所有的问题都出在自己身上。


…more

网友语录 - 第29期 - 微笑能解决很多问题,沉默能避免许多问题

这里记录我的一周分享,通常在周六发布。


人生若梦为欢几何 周六的时候去魔都复诊,去的路上,A事情困扰着我,烦躁了一路。回来的路上,因为医生对我恢复情况很满意,导致我也很开心,再想起A事情,觉得也无所谓了。(A本身没有变化,但因为我心境变了,痛苦度变了。)然后我悟了一个道理,痛苦不是源于事情本身,痛苦是源于思维方式。我要尝试改变。


我们一生的时间,大部分用于错误及种种恶行;很大一部分虚抛浪掷,无所事事。我们整个一生,几乎都没有用来干应当干的事。


米饭 安全=确定=时间的凝固 转@胖三儿. 过分的安全是一种生命力的死亡。


李佳佳Audrey: 她们在乎礼物在乎电话在乎每个纪念日,我都不在乎。我的要求多么卑微啊,我的要求多么贪婪啊,我要一个知己。年少时我总幻想有人对我说<冬季到台北来看雨>那句"没有人比我更懂你"。想象生活在文革,整个世界揪斗我们,我们彼此看上一眼,然后对黑压压血淋淋的世界

…more