A user-friendly API for KDE's KRunner application.

Overview

A user-friendly API for KDE's KRunner application.

Features

  • Create KRunner plugins ("runners")
    • Type safe
    • Null safe
    • Named parameters
    • Documentation explaining the various parts

Usage

Creating plugins

import 'package:krunner/krunner.dart';

Future<void> main() async {
  /// Create a runner instance.
  final runner = KRunnerPlugin(
    identifier: 'com.example.plugin_name',
    name: '/plugin_name',
    matchQuery: (String query) async {
      /// If the KRunner query matches exactly `hello` we return a match.
      if (query == 'hello') {
        return [
          QueryMatch(
            id: 'uniqueMatchId',
            title: 'This is presented to the user',
            icon: 'checkmark',
            rating: QueryMatchRating.exact,
            relevance: 1.0,
            properties: QueryMatchProperties(subtitle: 'Subtitle for match'),
          ),
        ];
      } else {
        return []; // Empty response (no matches).
      }
    },
    retrieveActions: () async => [
      SecondaryAction(
        id: 'uniqueActionId',
        text: 'hoverText',
        icon: 'addressbook-details',
      ),
    ],
    runAction: ({required String actionId, required String matchId}) async {
      if (actionId == 'uniqueActionId') {
        print('User clicked secondary action!');
      }
    },
  );

  /// Start the runner.
  await runner.init();
}

Refer to the example directory for a complete example, including instructions for debugging and installing plugins.

For a real-world example of a plugin made with this API see VSCode Runner.

Additional Information

API Documentation

You might also like...

A Flutter step_tracker plugin is collect information from user and display progress through a sequence of steps. this plugin also have privilege for fully customization from user side. like flipkart, amazon, myntra, meesho.

A Flutter step_tracker plugin is collect information from user and display progress through a sequence of steps. this plugin also have privilege for fully customization from user side. like flipkart, amazon, myntra, meesho.

step_tracker plugin A Flutter step_tracker plugin is collect information from user and display progress through a sequence of steps. this plugin also

Oct 21, 2022

Bhagavad Gita app using flutter & Bhagavad-Gita-API is A lightweight Node.js based Bhagavad Gita API [An open source rest api on indian Vedic Scripture Shrimad Bhagavad Gita].

Bhagavad Gita app using flutter & Bhagavad-Gita-API is A lightweight Node.js based Bhagavad Gita API [An open source rest api on indian Vedic Scripture Shrimad Bhagavad Gita].

Gita Bhagavad Gita flutter app. Download App - Playstore Web Application About Bhagavad Gita app using flutter & Bhagavad-Gita-API is A lightweight No

Apr 5, 2022

Beautiful Weather App using API with support for dark mode. Created by Jakub Sobański ( API ) and Martin Gogołowicz (UI, API help)

Beautiful Weather App using API with support for dark mode. Created by Jakub Sobański ( API ) and Martin Gogołowicz (UI, API help)

Flutter Weather App using API with darkmode support Flutter 2.8.1 Null Safety Beautiful Weather App using https://github.com/MonsieurZbanowanYY/Weathe

Nov 29, 2022

This is an auction application just like eBay. Using firebase as the backend for signup & sign-in functionality. In addition to that, it's a two pages application with user bid in input and count down view.

This is an auction application just like eBay. Using firebase as the backend for signup & sign-in functionality.  In addition to that, it's a two pages application with user bid in input and count down view.

Nilam This is an auction application just like eBay. Using firebase as the backend for signup & sign-in functionality. In addition to that, it's a two

Nov 9, 2022

A Demo application📱 which stores User feedback from 💙Flutter application into Google Sheets🗎 using Google AppScript.

A Demo application📱  which stores User feedback from 💙Flutter application into Google Sheets🗎 using Google AppScript.

📱 Flutter 💙 to Google Sheets 📊 A Demo application which stores User feedback from Flutter application into Google Sheets using Google AppScript. Yo

Dec 28, 2022

Flutter plugin that implements Android's SMS User Consent API

Flutter plugin that implements Android's SMS User Consent API

sms_user_consent Request user's phone number (supports dual sim) and/or consent to read SMS without adding any permissions, using Android's SMS User C

Sep 7, 2022

A most easily usable RESAS API wrapper in Dart. With this library, you can easily integrate your application with the RESAS API.

A most easily usable RESAS API wrapper library in Dart! 1. About 1.1. What Is RESAS? 1.2. Introduction 1.2.1. Install Library 1.2.2. Import It 1.2.3.

Apr 7, 2022

Api-Call - A basic mobile application for Networking in Flutter(API)

Api-Call - A basic mobile application for Networking in Flutter(API)

Github Api Call 📞 📲 📌 Introduction This project is an basic mobile applicatio

Nov 11, 2022

In this video we will learn how to Create CRUD Rest API for our Flutter application using NODEJS API.

In this video we will learn how to Create CRUD Rest API for our Flutter application using NODEJS API.

Flutter CRUD Using NodeJS API In this video we will learn how to Create CRUD Rest API for our Flutter application using NODEJS API. 📎 Packages Used h

Dec 30, 2022
Releases(v0.1.0)
A user-friendly money management app which allows you to keep track of transactions seamlessly

See the first version of 'Mvelopes' - Money Management Application which I completed as my first project and published on Play Store. 'Mvelopes' is a user-friendly money management app which allows you to keep track of transactions seamlessly. - Features - Technology • Reminder • Flutter • Notification • Hive • Manage income & expenses

Mushthak 16 Dec 8, 2022
Win32 registry - A package that provides a friendly Dart API for accessing the Windows registry

A package that provides a friendly Dart API for accessing the Windows registry.

Tim Sneath 20 Dec 23, 2022
A privacy-friendly Twitter frontend for mobile devices

Fritter A privacy-friendly Twitter frontend for mobile devices. Features Device-local subscriptions and groups, Newpipe-style, including a feed view D

Jonjo McKay 1k Jan 3, 2023
Fluent System Icons are a collection of familiar, friendly and modern icons from Microsoft.

Fluent UI System Icons Fluent UI System Icons are a collection of familiar, friendly and modern icons from Microsoft. Icon List View the full list of

Microsoft 4.3k Dec 29, 2022
A simple, open and privacy friendly plant watering reminder for Android

Water Me ?? A simple, open and privacy friendly plant watering reminder for Android. Water me is a mobile application written in Flutter to remind you

Andrin Bertschi 31 Dec 29, 2022
Flutter's [FlatList] widget for React Native friendly developers

FlatList for Flutter [FlatList] widget in Flutter which will be familiar to React Native developers. Motivation While there are opinionated ways to bu

Hyo 5 Dec 21, 2022
Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flutter app.

Flutter Tutorial - User Profile Page UI 1/2 Create a Flutter User Profile Page UI where you can access and edit your user's information within your Fl

Johannes Milke 46 Dec 6, 2022
Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flutter app.

Flutter Tutorial - User Profile Page UI #2 Create a Flutter User Profile Page UI where you can access and edit your user's information within your Flu

Johannes Milke 45 Dec 15, 2022
Let's create a complete Flutter User Profile Page with SharedPreferences to persist the user's information in Flutter.

Flutter Tutorial - User Profile & SharedPreferences Let's create a complete Flutter User Profile Page with SharedPreferences to persist the user's inf

Johannes Milke 21 Dec 3, 2022
User auth form - Signup and signin user auth form with ability to stay signed in and have an option to signout.

user_auth_form SIgnup and signin user authentification form Getting Started This project is a starting point for a Flutter application. A few resource

null 0 Jan 6, 2022