Code Monkey home page Code Monkey logo

cricket-fever's Introduction

ReadMeSupportPalestine

Website Preview

StackOverflow Stats

Asad's StackOverflow stats

Open Source Projects

Firestore Search File Case Dialogs

Asad's Github stats

cricket-fever's People

Contributors

asadamatic avatar

Watchers

 avatar

cricket-fever's Issues

Hi thert

[https://github.com/asadamatic/legacy_progress_dialog/workflows/pub_publish/badge.svg]

Firestore Search Scaffold - firestore_search

This package helps developers in implementation of search on Cloud FireStore. This package comes with the implementation of widgets essential for performing search on a database.

Pub Version
GitHub Workflow Status
Codecov
CodeFactor Grade

GitHub
OSS Lifecycle
Gitter

Saves You from following implementations

  • Search AppBar - An AppBar that turns into a TextInputField that takes search queries from users
  • Search Body - A body that shoes up when user starts typing in the Search AppBar
  • Cloud FireStore Queries - Takes user's input and queries the requested CloudFirestore collection

Simple Usage

To use this plugin, add firestore_search as a
dependency in your pubspec.yaml file.

###Implementation:

  • Import import 'package:firestore_search/firestore_search.dart';

  • Create a data model, for the data you want retrieve from Cloud FireStore (Your data model class must contain a function to convert QuerySnapshot from Cloud Firestore to a list of objects of your data model)

class DataModel {
  final String name;
  final String description;

  DataModel({this.name, this.description});

  //Create a method to convert QuerySnapshot from Cloud Firestore to a list of objects of this DataModel
  //This function in essential to the working of FirestoreSearchScaffold

  List<DataModel> **dataListFromSnapshot**(QuerySnapshot querySnapshot) {
    return querySnapshot.docs.map((snapshot) {
      final Map<String, dynamic> dataMap = snapshot.data();

      return DataModel(
          name: dataMap['name'], description: dataMap['description']);
    }).toList();
  }
}
  • Use class FirestoreSearchScaffold and provide the required parameters
FirestoreSearchScaffold(
        dataListFromSnapshot: UserData().userListFromSnapshot,
        firestoreCollectionName: 'users',
        builder: (context, snapshot) {
          if (snapshot.hasData) {
            return Center(
              child: Text('Snapshot has data'),
            );
          } else if (snapshot.hasError) {
            return Center(
              child: Text('Snapshot has data'),
            );
          }
          return Center(
            child: CircularProgressIndicator(),
          );
        },
        ));
                                                                                  ##You are good to go!

In order to add the FirestoreSearchScaffold in your app, there are several attributes that are important and neglecting them or treating them roughly might throw errors:

Attribute Type Default Required Description
scaffoldBody Widget Widget No This widget will appear in the body of Scaffold.
appBarBottom PreferredSizeWidget null No This widget will appear at the bottom of Search AppBar.
firestoreCollectionName String `` Yes Determines the Cloud Firestore collection You want to search in.
dataListFromSnapshot List Function(QuerySnapshot) null Yes This function converts QuerySnapshot to A List of required data.
builder Widget Function(BuildContext, AsyncSnapshot) null No This is the builder function of StreamBuilder used by this widget to show search results.
limitOfRetrievedData int 10 No Determines the number of documents returned by the search query.

CREDITS

Contributors

Made with contributors-img.

Using issues to create readme.

Hey ๐Ÿ‘‹, I'm Asad Hameed!

Linkedin Badge
Website Badge
Twitter Badge
Instagram Badge
Telegram Badge

Glad to see you here! ย 

I'm a final year student pursuing Bachelors's in Computer Engineering ๐ŸŽ“ from UET, and I have deep love for programming, and related domains ๐Ÿ’ก and this took me through a lot of developer ventures ever since I began writing computer programs. I'm currently practicing hybrid-app development using flutter. Let me take you through the technologies I have used in three years as a programmer,

Languages and Tools:

cpp
python
javascript
nodejs
expressjs
react
firebase
sql
mongodb
git
terminal

Talking about Personal Stuffs:

  • ๐Ÿ›  ย  Iโ€™m currently working with Nodejs, Express, React,
    Graphql, Mongodb, Javascript, etc.
  • ๐Ÿš€ ย  Iโ€™m currently learning Full Stack Development.
  • ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป ย  Most of my projects are available on Github.
  • ๐Ÿ’ฌ ย  Ask me about anything here! I am happy to help.
  • ๐Ÿ‘พ ย  Fun fact: Equal is Not Always Equal in Javascript.
  • ๐Ÿ“ซ ย  How to reach me: [email protected].
  • ๐Ÿ“ ย  Checkout my Resume.

My Absolute Favorites:

  • ๐Ÿ’ป ย  I love exploring new tech stack and building cool stuffs.
  • ๐Ÿ“ฐ ย  Reading & writing tech blogs whenever possible.
  • ๐Ÿ• ย  Hackathons, meetups & tech events.

Projects and Dev Stuffs:

โšก Github Stats
โ˜„๏ธ Github Streaks
๐Ÿง‘โ€๐Ÿš€ Open Source Projects
๐Ÿ’ป Projects ๐ŸŒŸ Stars ๐Ÿด Forks ๐Ÿ› Issues ๐Ÿ”” Pull Requests ๐Ÿ‘จโ€๐Ÿ’ป Language
๐Ÿš€ Gitwar Stars Forks Issues Pull Requests Language
๐Ÿ’ธ TradeByte Stars Forks Issues Pull Requests Language
๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป TheNodeCourse Stars Forks Issues Pull Requests Language
๐Ÿค“ asadamatic Stars Forks Issues Pull Requests Language


โš™๏ธ Things I use to get stuff done
  • OS: Ubuntu 20.04
  • Laptop: HP Elitebook (i5)
  • Browser: Firefox Developer Edition
  • Terminal: ZSH: Oh My Zsh (PowerLevel10k)
  • Code Editor: VSCode - The best editor out there.
  • To Stay Updated: Dev.to, Medium, Linkedin and Twitter.

  • โš›๏ธ Checkout My VSCode Configrations Here.

Show some โค๏ธ by starring some of the repositories!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.