This plugin allows Flutter desktop apps to Auto launch on startup / login.

Overview

launch_at_startup

pub version

This plugin allows Flutter desktop apps to Auto launch on startup / login.

Discord


Platform Support

Linux macOS Windows
✔️ ✔️ ✔️

⚠️ macOS only supports non-sandbox mode.

Quick Start

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  launch_at_startup: ^0.1.1

Or

dependencies:
  launch_at_startup:
    git:
      url: https://github.com/leanflutter/launch_at_startup.git
      ref: main

Usage

import 'dart:io';

import 'package:launch_at_startup/launch_at_startup.dart';
import 'package:package_info_plus/package_info_plus.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  PackageInfo packageInfo = await PackageInfo.fromPlatform();

  LaunchAtStartup.instance.setup(
    appName: packageInfo.appName,
    appPath: Platform.resolvedExecutable,
  );

  
  await LaunchAtStartup.instance.enable();
  await LaunchAtStartup.instance.disable();
  bool isEnabled = await LaunchAtStartup.instance.isEnabled();

  runApp(const MyApp());
}

// ...

Please see the example app of this plugin for a full example.

License

MIT License

Copyright (c) 2021 LiJianying 
   
    

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

   
Issues
  • fix: use correct max length of registry key

    fix: use correct max length of registry key

    I have very little knowledge about windows registry, but it seems like _kRegValueMaxLength was incorrect for some path. I changed it to codeUnits length multiplied by 2, so there is no space left for some random bytes.

    opened by jakub-stefaniak 2
  • flutter build web error

    flutter build web error

    Error: Only JS interop members may be 'external'.
      external int wBitsPerSample;
    ....
    ....
    /D:/tmp/.pub/cache/hosted/pub.flutter-io.cn/win32-2.3.1/lib/src/combase.dart:24:37:
    Error: Only JS interop members may be 'external'.
      external Pointer<Pointer<IntPtr>> lpVtbl;
                                        ^
    Error: Compilation failed.
    
    opened by sleepreading 2
  • [windows] Add MSIX app support

    [windows] Add MSIX app support

    The issue is when I enable launch at startup for my app which is installed using MSIX, literally nothing happens. I found a workaround, which is running a batch / ps script to remove / add app shortcut to startup apps:

    @echo off
    SET currentDirectory=%~dp0
    PUSHD %currentDirectory%
    CD ..
    CD ..
    CD ..
    CD ..
    SET MNIST_DIR=%CD%
    SET appExeDir=%MNIST_DIR%
    powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%userprofile%\Start Menu\Programs\Startup\WTNews.lnk');$s.TargetPath='%appExeDir%\wtnews.exe';$s.Arguments='connect';$s.IconLocation='%userprofile%\Start Menu\Programs\WTNews.lnk';$s.WorkingDirectory='%appExeDir%';$s.WindowStyle=7;$s.Save()"
    

    This works without a flaw, and isEnabled and isDisabled booleans can return existence of the shortcut.

    opened by Vonarian 0
Releases(v0.1.7)
Owner
LeanFlutter
To make the flutter even simpler
LeanFlutter
This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut).

hotkey_manager This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut). hotkey_manager Platform Support Quick Star

LeanFlutter 61 Jun 16, 2022
SKSE plugin for replacing Skyrim SE shaders at launch.

Plugin for SSE Parallax Shader Fix. Requirements CMake Add this to your PATH PowerShell Vcpkg Add the environment variable VCPKG_ROOT with the value a

null 6 Jun 10, 2022
A Flutter package that makes it easy to customize and work with your Flutter desktop app's system tray.

system_tray A Flutter package that that enables support for system tray menu for desktop flutter apps. on Windows, macOS and Linux. Features: - Modify

AnTler 103 Jun 24, 2022
Filter and launch links in a browser of your choice!

Link Launcher Filter links with regular expressions and launch them into your favourite browsers Have you ever wanted to open a youtube link from othe

null 5 Aug 20, 2021
Windows file startup creator write in c++

startup-creator Language Simple program written in c++, for you to place your programs at windows startup. ?? Requirements Latest Mingw-64 or Mingw-32

Dio brando 6 Jan 22, 2022
OpenGL Template Engine - a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects.

OpenGL Template Engine is a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects. This is the template I personally use for my own projects and provides me with the general OpenGL 3D render setup with model import and UI.

Marcus Nesse Madland 2 May 16, 2022
SDK for building cross-platform desktop apps in ANSI-C

NAppGUI Cross-Platform C SDK. Build portable desktop applications for Windows, macOS and Linux, using just C. Quick start in Windows Prerequisites Vis

Francisco García Collado 194 Jun 23, 2022
Native context menu for Flutter apps

native_context_menu Native context menu for flutter apps Installation flutter pub add native_context_menu Usage import 'package:native_context_menu/na

Andrei Lesnitsky 132 Jun 4, 2022
An app that allows you to edit/create apps in Dash

AppAdder On Ubuntu, have you ever run a program or AppImage and the app not had an icon? This is a personal pet peeve. I've used AppImageLauncher to i

Camden 5 Jun 25, 2022
Flutter-Clock-and-Reminder-App - a highly functional clock and reminder app developed on flutter framework.

clock_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Umar Baloch 5 Dec 27, 2021
The package allows to use H3 library directly in your Flutter application

The package allows to use H3 library directly in your Flutter application

Ilya Beregovskiy 9 Jun 17, 2022
Steals plaguecheat.cc login information and sends them over Discord webhook

PlagueStealer DO NOT USE THIS!!! I TAKE NO RESPONSIBILITY FOR ANY DAMAGE CAUSED How to use: Make a Discord webhook (watch this if you dont know how: h

Sinner 3 Dec 28, 2021
Login & Registration system using leveldb in C++

LoginAndRegistration ?? Clone repo git clone https://github.com/dev-cetus/LoginAndRegistration.git cd LoginAndRegistration ?? Install leveldb via vcp

Cetus 2 Dec 18, 2021
Creates an XDG_RUNTIME_DIR on login and never removes it.

dumb_runtime_dir Creates an XDG_RUNTIME_DIR directory on login per the freedesktop.org base directory spec. Flaunts the spec and never removes it, eve

Isaac Freund 12 Jun 5, 2022
REGISTRATION / LOGIN SYSTEM USING C++

REGISTRATION / LOGIN SYSTEM USING C++ Used File Handling / Manipulations / Storing extensively.

null 0 Feb 6, 2022
This is a imgui login that runs with keyauth with only uses the key and has tabs for you to paste your stuff in c++

KeyAuth-Imgui-key-Login This is a imgui login that runs with keyauth with only uses the key and has tabs for you to paste your stuff in c++ KeyAuth CP

Lucent 9 Jun 21, 2022
A desktop (supports macOS and Windows) implementation of uni_links plugin.

uni_links_desktop A desktop (supports macOS and Windows) implementation of uni_links plugin. uni_links_desktop Platform Support Quick Start Installati

LeanFlutter 10 May 23, 2022
A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via `dart:ffi`

cronet_flutter A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via dart:ffi

null 20 Jun 15, 2022
A Flutter Web Plugin to display Text Widget as Html for SEO purpose

SEO Renderer A flutter plugin (under development) to render text widgets as html elements for SEO purpose. Created specifically for issue https://gith

Sahdeep Singh 88 Jun 17, 2022