Skip to content

andrellopes/aClock

Repository files navigation

Digital Clock ⏰

A simple, full-screen, customizable digital clock app built with Flutter for Android.

Play Store: aClock on Google Play

Settings Screen About Screen


✨ Features

  • Immersive Full Screen: The clock occupies the entire screen, without status bars or navigation.
  • High Customization:
    • Change background color.
    • Change font color.
    • Adjust font size.
  • Subtle Animation: An optional smooth sliding animation for the clock.
  • Persistence: Your customization settings are saved on the device.
  • Clean Interface: Tap the screen to reveal the settings button and credits.
  • Discrete Monetization: An ad banner is displayed only on the settings screen.

🛠️ Technologies Used


🚀 How to Run the Project

Prerequisites

  • Have the Flutter SDK installed.
  • An Android emulator or physical device.

Steps

  1. Clone the repository:

    git clone https://github.com/andrellopes/aClock.git
  2. Install dependencies:

    flutter pub get
  3. Run the app:

    flutter run

🔐 Publishing as a public repository (without leaking secrets)

This app is already in production (Google Play). To keep the code open source without exposing credentials, some precautions have been taken:

  • The .gitignore file has been strengthened to NOT version:

    • android/key.properties, android/app/release-key.jks, *.jks, *.keystore, *.p12
    • android/local.properties
    • **/google-services.json (Android) and **/GoogleService-Info.plist (iOS/macOS)
    • lib/firebase_options.dart (generated by FlutterFire)

    Note: lib/secrets.dart is intentionally kept in the repository but only with Google's TEST AdMob IDs. This keeps the app runnable without exposing real credentials. Do not place production IDs directly in this file.

Steps to run locally

  1. AdMob (without exposing real IDs):

    • Option A — override via flag (quick):
    flutter build appbundle --release --dart-define=ADMOB_BANNER_ANDROID=ca-app-pub-XXXXXXXXXXXXXXX/ZZZZZZZZZZ

    The flag doesn't leak anything to the repository. Useful for one-off builds.

    • Option B — local file (recommended, no flags):
    1. Copy the example and edit with your real IDs:

      Copy-Item assets\config\admob.json.example assets\config\admob.json -Force
    2. Open assets/config/admob.json and fill in:

      {
          "bannerAndroid": "ca-app-pub-XXXXXXXXXXXXXXX/AAAAAAA",
          "bannerSettingsAndroid": "ca-app-pub-XXXXXXXXXXXXXXX/BBBBBBB"
      }
    3. Run normally (without --dart-define). The app will read this file at runtime.

    Important notes:

    • assets/config/admob.json is already in .gitignore — it won't be committed.
    • If the file doesn't exist, we automatically use Google's TEST IDs (safe).
    • The Android AdMob App ID still comes from android/local.properties (see item 4 below).
  2. Firebase (Android/Windows):

    • Generate files with FlutterFire CLI (don't commit them):

      dart pub global activate flutterfire_cli
      flutterfire configure
    • This will create lib/firebase_options.dart and android/app/google-services.json (both ignored by git).

  3. Android signing (keystore):

    • Keep android/key.properties and android/app/release-key.jks only locally.
    • They are already ignored in .gitignore.
    • For convenience, you can create a template from the example file:
    Copy-Item android\key.properties.example android\key.properties -Force
  4. AdMob App ID in AndroidManifest:

    • The AndroidManifest.xml uses a placeholder ${ADMOB_APP_ID}.

    • Set the real value in android/local.properties (not versioned):

      admob.app.id=ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY
    • If not set, the build uses Google's TEST App ID by default.

    • Tip: there's a template in android/local.properties.example. You can copy with:

    Copy-Item android\local.properties.example android\local.properties -Force

Optional secrets verification before push

You can use a tool like gitleaks to scan the repository:

gitleaks detect --no-banner --redact

This helps avoid accidentally pushing keys.


🧩 Platforms and build

  • Android: supported (Play Store). See scripts quick_build.bat and build_aab.bat for local builds.

🌐 Localization

Portuguese, English, and Spanish. Files in l10n/ and l10n.yaml.


🤝 How to contribute

Contributions are welcome! Suggestions for improvements, issues, and PRs help a lot.

Suggested steps:

  1. Open an Issue describing the change.
  2. Create a fork and a branch.
  3. Keep secrets out of commit (follow the 🔐 section above).
  4. Open the PR with a clear summary of changes.

📝 License

Distributed under the license of the LICENSE file in this repository.


🔏 Privacy

This app uses ads (AdMob), in-app purchases, and Crashlytics. For details, maintain a public Privacy Policy (e.g., docs/PRIVACY.md) and reference it in the Play Store.


🧑‍💻 Developed by

allc 🚀

About

A simple, full-screen, customizable digital clock app built with Flutter for Android.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published