Dart / Flutter package, which replaces characters in strings that are illegal/unsafe for filenames.

Overview

Dart package, which is a clone of the popular sanitize-filename npm module by Parsha Pourkhomami.

Usage

import 'package:sanitize_filename/sanitize_filename.dart';

void main() {
  const unsafeUserInput = "~/.\u0000ssh/authorized_keys";

  final safeUserInput1 = sanitizeFilename(unsafeUserInput);
  final safeUserInput2 = sanitizeFilename(unsafeUserInput, replacement: '-');

  // "~.sshauthorized_keys"
  print("safeUserInput1: $safeUserInput1");
  // "~-.-ssh-authorized_keys"
  print("safeUserInput2: $safeUserInput2");
}
You might also like...

A Dart package which simulates pass by reference feature

Reference Wrapper is a Dart package which simulates pass by reference feature us

Dec 19, 2021

Dart package to which makes data communication easy among different modules of your application.

Dart package to which makes data communication easy among different modules of your application.

LiveStream - Dart LiveStream is a data holder class which can observe change of data in real-time and emit values too. Here's emitter subscriber patte

Sep 28, 2022

Scouter is a package which was made following the goal to provide a NestJS-like experience to Dart Developers that want to develop Rest APIS

Scouter is a package which was made following the goal to provide a NestJS-like experience to Dart Developers that want to develop Rest APIS

Scouter is a package which was made following the goal to provide a NestJS-like experience to Dart Developers that want to develop Rest APIS Features

Sep 12, 2022

Rock-Paper-Scissor-Game-Using-Dart - This is a repository of Rock Paper Scissor Game which I developed while learning Dart.

Rock-Paper-Scissor-Game-Using-Dart This is a repository of Rock Paper Scissor Game which I developed while learning Dart. The main.dart file consist o

Jan 4, 2022

Telnyx flutter - A Flutter package for both android and iOS which helps developers with Telnyx API services

Telnyx Flutter A Flutter package for both android and iOS which helps developers

Jan 23, 2022

This is flutter package for creating a gender selection widget which allows users to choose a gender with cool animations

This is flutter package for creating a gender selection widget which allows users to choose a gender with cool animations

gender_selection A Flutter package for gender selection. It is an aweome gender selection widget with cool gradients and animation effects Demo Instal

Apr 8, 2022

A new Flutter package customtoggleswitch is used to toggle a setting between on/off which is true/false respectively Created by suryadevsingh.

A new Flutter package customtoggleswitch is used to toggle a setting between on/off which is true/false respectively Created by suryadevsingh.

CustomToggleSwitch A new Flutter package customtoggleswitch is used to toggle a setting between on/off which is true/false respectively Created by sur

Jun 9, 2020

A flutter package which will help you to create a draggable widget that can be dragged around the screen.

A flutter package which will help you to create a draggable widget that can be dragged around the screen.

A flutter package which will help you to create a draggable widget that can be dragged around the screen. Demo Features 💚 Manually Control the positi

Aug 10, 2022
Owner
e.GO Mobile
e.GO was founded by Prof. Dr. Günther Schuh in Aachen. The goal is to develop attractive and particularly durable electric vehicles and produce them in series.
e.GO Mobile
Example de layout in Flutter inspiration in Netflix App + Woody Woodpecker Characters

PicFlix Example de layout in Flutter inspiration in Netflix App + Woody Woodpecker Characters Cover extracted of https://twitter.com/winemcbride/statu

Tiago Danin 3 May 17, 2021
Stroke order animations and quizzes for Chinese characters for use in Flutter apps

Stroke order animator This package implements stroke order animations and quizzes of Chinese characters based on the Make me a Hanzi data. That data i

Felipe Peter 54 Dec 27, 2022
This application displays the characters of the series Breaking Bad, has been used Cubit state and API .

breaking_bad A new Flutter project using bloc. Getting Started This project is a starting point for bloc state_management. A few resources to get you

null 1 Dec 24, 2021
Package provides light widgets [for Linkify, Clean] and extensions for strings that contain bad words/URLs/links/emails/phone numbers

Package provides light widgets [for Linkify, Clean] and extensions for strings that contain bad words/URLs/links/emails/phone numbers

BetterX.io 4 Oct 2, 2022
Chance Dart is a free Open Source project that lets you create random strings, integers, and other things to help with tiresome tasks, especially when building automated tests or wherever else you require anything random.

Chance Dart Random generator helper for Dart Homepage • Documentation Overview Chance Dart is a free Open Source project that lets you create random s

Ayotomide 55 Dec 27, 2022
A class for parsing strings using a sequence of patterns.

This package exposes a StringScanner type that makes it easy to parse a string using a series of Patterns. For example: import 'dart:math' as math; i

Dart 51 Nov 8, 2022
Make localizing hard-coded strings fun!

Flutter Localizer IntelliJ Plugin IntelliJ Plugin to ease the process of localizing hard coded strings in Flutter projects Installation The plugin is

Norbert Kozsir 27 Feb 25, 2022
The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!

SwiftGen SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them ty

null 8.3k Dec 31, 2022
A dart package which provides a lot of helpers functions for easy development.

more_functions A dart package which provides a lot of helpers functions for easy development. Installation Add this to your packages pubspec.yaml file

Talat El Beick 0 Dec 5, 2021