Skip to content

Flutter Package 🤖 : utility for working with quotes like motivations,entrepreneurial,love etc. and provides access to the top 500 English quotes as of now.

License

Notifications You must be signed in to change notification settings

rohanprasadofficial/quotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buy Me A Coffee Donate Donate License: MIT

quotes

Utility for working with quotes like motivational, entrepreneurial , love etc. and provides access to the top 500 English quotes as of now.

Usage

Example

To use this package :

  dependencies:
    flutter:
      sdk: flutter
    quotes:

How to use

// Import the Package 

import 'package:quotes/quotes.dart';

//Then you can use it :

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: FlatButton(child: Text("CLICK"),onPressed: (){
          
              //Getting the First quote that is same everytime
                print(Quotes.getFirst().getId());
                print(Quotes.getFirst().getContent());
                print(Quotes.getFirst().getAuthor());
                print(Quotes.getFirst().getAuthorId());
                print(Quotes.getFirst().getTags());
                print(Quotes.getFirst().getLength());
                
               //Getting the Last  quote that is same everytime
                print(Quotes.getLast().getId());
                print(Quotes.getLast().getContent());
                print(Quotes.getLast().getAuthor());
                print(Quotes.getLast().getAuthorId());
                print(Quotes.getLast().getTags());
                print(Quotes.getLast().getLength());
                          
              //Getting the random quote
                print(Quotes.getRandom().getId());
                print(Quotes.getRandom().getContent());
                print(Quotes.getRandom().getAuthor());
                print(Quotes.getRandom().getAuthorId());
                print(Quotes.getRandom().getTags());
                print(Quotes.getRandom().getLength());
             
              
          },),
        ),
      ),
    );
  }
}


  
  
 

Pull Requests

Every PRs are welcome , i will definitely look into and accept it.

Two things to PR on:

  1. Adding more quotes to the library
    • For this you can add a files new_quotes.json in the data folder , i will review it and add it to main files.
  2. Technical Addition
    • Can includes various other functions code like top authors , more written quotes author etc..

Created & Maintained By

Rohan Prasad

Show some ❤️ and star the repo to support the project

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

About

Flutter Package 🤖 : utility for working with quotes like motivations,entrepreneurial,love etc. and provides access to the top 500 English quotes as of now.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages