andoriyaprashant / OpSo

OpSo is a Flutter app that provides comprehensive information about various open-source programs
MIT License
35 stars 59 forks source link

Update: Improved Code Quality and Added Search Functionality #74

Closed anuragJoshi05 closed 1 month ago

anuragJoshi05 commented 1 month ago

Changes Made:

  1. Removed Unnecessary Imports:

    • Removed package:url_launcher/link.dart import as it was not used in the provided code.
  2. Removed Unnecessary Material and Ink Widgets:

    • Removed the outer Material and Ink widgets from both AppBarWidget and MenuOption.
  3. Simplified InkWell Usage:

    • Removed the InkWell widget from MenuOption as it was redundant due to the GestureDetector.
  4. Removed Unnecessary Padding:

    • Removed some unnecessary padding to simplify the widget tree. The Padding inside the Container of MenuOption suffices for spacing.
  5. Used Spacer Instead of SizedBox:

    • Replaced SizedBox with Spacer to make the layout more flexible and readable.
  6. Simplified Navigator Call:

    • Added const to AboutScreen() in the Navigator.push call since it is a stateless widget and doesn't require any dynamic parameters.
  7. Added Search Functionality:

    • Added a search icon button in the AppBar which triggers the showSearch function with a custom SearchDelegate.
    • Implemented a custom SearchDelegate to handle search queries, suggestions, and results.
    • Added functionality to clear the search query using a clear button in the search bar.