2025年6月27日星期五

最常用的 8 種 Git Commit 類型

 

最常用的 8 種 Git Commit 類型 📜

這 8 種是你在日常開發中最常遇到和使用的類型,涵蓋了絕大多數的變更:
  1. feat: 🚀 - 新增使用者可見的功能。
  2. fix: 🐛 - 修復程式碼中的錯誤。
  3. docs: 📚 - 文件變更(如 README、程式碼註釋)。
  4. style: ✨ - 只影響程式碼格式的變更,不改變邏輯。
  5. refactor: 🏗️ - 重構程式碼,不影響功能,也不修復 Bug。
  6. perf: ⚡ - 效能優化。
  7. test: ✅ - 新增或修改測試。
  8. chore: 🛠️ - 其他維護性任務(如更新依賴、構建工具配置等),不影響生產程式碼或測試。

2025年6月17日星期二

pop all dialog

 Navigator.of(context).popUntil((route) {

  // Check if the current route is NOT a DialogRoute.
// This means we stop popping when we hit a regular page/widget route.
return route is! DialogRoute;
});

2025年6月11日星期三

Flutter Android App Signing

 1- Generate and get .jks from android studio.

2- Create a key.properties under android file as following format.

storePassword=
keyPassword=
keyAlias=
storeFile= //file path of jks

3- Go to your app level build gradle and get key.properties with following code.

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

4- Add signing configurations inside the android tag.

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}

5- Make sure about your signingConfig is release as following ;

buildTypes {
release {
signingConfig signingConfigs.release
}
}

6- Run ‘flutter build appbundle’ command .