wikipedia
0.0.92, released a year ago by an unverified publisher
Search Wikipedia and retrieve page data using Dart and Flutter.
WASM-ready
What it does
A search tool written in Dart that queries Wikipedia, retrieves articles, and fetches full page data using a page ID. It provides structured data like titles, summaries, and links.
AI-written summary of version 0.0.92, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to integrate Wikipedia search capabilities into a Flutter application.
- You want to fetch Wikipedia article summaries and details using page IDs.
Skip it when
- You need an official, heavily maintained SDK directly from Wikimedia.
- You require complex offline caching of Wikipedia database dumps.
Strengths
- Lightweight and fast implementation
- Easy integration with Flutter projects
- Supports Android, iOS, Web, Windows, macOS, and Linux
Weaknesses
- Very early version (0.0.92)
- Limited feature set beyond basic search and page summary retrieval
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add the package dependency to pubspec.yaml and import it.
try{
Wikipedia instance = Wikipedia();
var result = await instance.searchQuery(searchQuery: "What is flutter?",limit: 1);
for(int i=0; i<result!.query!.search!.length; i++){
print(result.query!.search![i].snippet);
if(!(result.query!.search![i].pageid==null)){
var resultDescription = await instance.searchSummaryWithPageId(pageId: result.query!.search![i].pageid!);
print(resultDescription!.title);
print(resultDescription.description);
}
}
}catch(e){
print(e);
}Alternatives
Packages that do the same job and could replace wikipedia.
Works with
Packages commonly used together with wikipedia: ones it builds on, ones built on it, and its own family.