A sleek and efficient Flutter application designed to fetch and display Pakistani SIM card ownership details based on a mobile number or CNIC. Built with a clean architecture and a focus on a smooth user experience.
The app features a clean user interface with both light and dark modes, which are saved across sessions.
| Light Mode | Dark Mode |
|---|---|
- SIM Data Search: Quickly find SIM card details by providing a phone number or CNIC.
- Detailed Information: Retrieves Name, CNIC, Address, and Mobile Number.
- Dual Theme Support: Seamlessly switch between a beautiful light and an elegant dark theme. Your preference is saved for the next launch.
- Copy to Clipboard: Easily copy any piece of information (Name, CNIC, etc.) with a single tap.
- User-Friendly Interface: Clean, modern, and intuitive UI designed for ease of use.
- Error Handling: Provides clear, user-friendly feedback for invalid searches or network issues.
- Loading States: Smooth loading indicators provide feedback during network requests.
This project is built with a focus on maintainability and scalability, utilizing a feature-first architecture that separates concerns neatly.
- Framework: Flutter
- Language: Dart
- Architecture:
- Feature-First Structure: Code is organized by features (
paksim) rather than by type (widgets,screens). - Separation of Concerns:
data/: Handles the logic for fetching data (Models, Services).presentation/: Manages the UI (Screens, Widgets) and its state (Controller).
- Simple State Management: Uses Flutter's built-in
ValueNotifierand a customPakSimControllerto manage UI state without external packages, perfect for single-screen complexity.
- Feature-First Structure: Code is organized by features (
- Core Packages:
http: For making network requests to the SIM data service.html: For parsing the HTML response from the server.shared_preferences: To persist the selected theme (light/dark) across app launches.url_launcher: For launching URLs.
The codebase is organized into a clean, feature-driven structure:
lib
├── core/
│ └── theme/ # App-wide theming (light/dark, constants, controller)
│
├── features/
│ ├── data/
│ │ ├── models/ # Data models (SimDataModel)
│ │ └── services/ # API service to fetch data (PakSimService)
│ │
│ └── presentation/
│ ├── controllers/ # UI logic and state management (PakSimController)
│ ├── screens/ # The main screen of the feature
│ └── widgets/ # Reusable widgets for the feature (dialogs, forms, etc.)
│
└── main.dart # App entry point
To get a local copy up and running, follow these simple steps.
- Flutter SDK (v3.0.0 or higher)
- An IDE like Android Studio or VS Code
- Fork the repository.
- Clone your forked repository:
git clone https://github.com/shoaibhassan2/paksimapp.git
- Navigate to the project directory:
cd paksimapp - Install the dependencies:
flutter pub get
- Run the app:
flutter run
While the app is fully functional, the following enhancements could be made:
- Unit & Widget Testing: Implement tests for services and widgets to ensure reliability.
- Input Formatting: Add a
TextInputFormatterto format the phone number/CNIC input in real-time. - Search History: Implement a local database (like Hive or Isar) to save recent searches.
- Caching: Implement a simple caching mechanism to avoid re-fetching data for the same number in a short period.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- Fork the project.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.
---````



