asadamatic / cricket-fever Goto Github PK
View Code? Open in Web Editor NEWRepo for practice.
Repo for practice.
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,
๐ป Projects | ๐ Stars | ๐ด Forks | ๐ Issues | ๐ Pull Requests | ๐จโ๐ป Language |
๐ Gitwar | |||||
๐ธ TradeByte | |||||
๐จ๐ปโ๐ป TheNodeCourse | |||||
๐ค asadamatic |
[https://github.com/asadamatic/legacy_progress_dialog/workflows/pub_publish/badge.svg]
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.
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();
}
}
FirestoreSearchScaffold
and provide the required parametersFirestoreSearchScaffold(
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. |
Made with contributors-img.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.